fixed bug with overwriting variables by same named struct in MM engine
authorHolger Schemel <info@artsoft.org>
Sat, 11 Mar 2017 16:56:33 +0000 (17:56 +0100)
committerHolger Schemel <info@artsoft.org>
Fri, 23 Mar 2018 22:21:10 +0000 (23:21 +0100)
src/game_mm/mm_game.c
src/game_mm/mm_main.h
src/game_mm/mm_tools.c

index fbd23b43498a2120609cd6c3496920bffa3500ef..97dc986b20ea1fba1c617dbffb010cb660319b5c 100644 (file)
@@ -292,9 +292,6 @@ void InitGameEngine_MM()
 {
   int i, x, y;
 
-  /* set global editor control values */
-  editor.draw_walls_masked = FALSE;
-
   /* set global game control values */
   game_mm.num_cycle = 0;
   game_mm.num_pacman = 0;
index aa76e7c3204d7921476cc6139444ef298bc3f021..46d65beaa08283e4c1cecd9efbe675d3c8975da6 100644 (file)
@@ -167,11 +167,6 @@ struct HiScore
   int Score;
 };
 
-struct EditorInfo
-{
-  boolean draw_walls_masked;
-};
-
 extern Bitmap         *pix[];
 extern DrawBuffer      *fieldbuffer;
 extern DrawBuffer      *drawto_field;
@@ -232,7 +227,6 @@ extern struct TapeInfo              tape;
 extern struct SetupInfo                setup;
 extern struct GameInfo_MM      game_mm;
 extern struct LaserInfo                laser;
-extern struct EditorInfo       editor;
 extern struct GlobalInfo       global;
 
 extern short           LX, LY, XS, YS, ELX, ELY;
index aa09879e0c4690c34148371202e1ba5be35262d7..a2b7e4510f3b41bff021f538a531c42161306c89 100644 (file)
@@ -420,8 +420,7 @@ void DrawWallsExt_MM(int x, int y, int element, int draw_mask)
 
   getMiniGraphicSource(graphic, &bitmap, &gx, &gy);
 
-  if (game_status != LEVELED || !editor.draw_walls_masked)
-    DrawGraphic_MM(x, y, IMG_EMPTY);
+  DrawGraphic_MM(x, y, IMG_EMPTY);
 
   /*
   if (IS_WALL_WOOD(element) || IS_WALL_AMOEBA(element) ||
@@ -442,7 +441,7 @@ void DrawWallsExt_MM(int x, int y, int element, int draw_mask)
     if (element & (1 << i))
       BlitBitmap(bitmap, drawto, gx, gy, MINI_TILEX, MINI_TILEY,
                 dest_x, dest_y);
-    else if (!editor.draw_walls_masked)
+    else
       ClearRectangle(drawto, dest_x, dest_y, MINI_TILEX, MINI_TILEY);
   }