From: Holger Schemel Date: Sat, 11 Mar 2017 16:56:33 +0000 (+0100) Subject: fixed bug with overwriting variables by same named struct in MM engine X-Git-Tag: 4.1.0.0~161 X-Git-Url: https://git.artsoft.org/?a=commitdiff_plain;h=1b1c9e4c5724af074b368b8815e6603f8a759a6b;p=rocksndiamonds.git fixed bug with overwriting variables by same named struct in MM engine --- diff --git a/src/game_mm/mm_game.c b/src/game_mm/mm_game.c index fbd23b43..97dc986b 100644 --- a/src/game_mm/mm_game.c +++ b/src/game_mm/mm_game.c @@ -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; diff --git a/src/game_mm/mm_main.h b/src/game_mm/mm_main.h index aa76e7c3..46d65bea 100644 --- a/src/game_mm/mm_main.h +++ b/src/game_mm/mm_main.h @@ -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; diff --git a/src/game_mm/mm_tools.c b/src/game_mm/mm_tools.c index aa09879e..a2b7e451 100644 --- a/src/game_mm/mm_tools.c +++ b/src/game_mm/mm_tools.c @@ -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); }