added variable to store if level uses McDuffin in MM game engine
authorHolger Schemel <info@artsoft.org>
Sun, 12 Mar 2023 14:23:27 +0000 (15:23 +0100)
committerHolger Schemel <info@artsoft.org>
Sun, 12 Mar 2023 14:23:27 +0000 (15:23 +0100)
src/game_mm/export.h
src/game_mm/mm_game.c

index 1cbf0b6a1f4e067ba2cb6431e2f85362109d3ae7..6fbe1aa9a9b3c750f4a74db8c7f53f628849a725 100644 (file)
@@ -143,6 +143,7 @@ struct GameInfo_MM
   int ball_choice_pos;         // current content element choice position
   boolean laser_red, laser_green, laser_blue;
 
+  boolean has_mcduffin;
   boolean level_solved;
   boolean game_over;
   int game_over_cause;
index 1542db1a16da1a34e6b111d7fca4ff754d45799b..8cc08bc47527ed8dd825ac912233a32b631f4d93 100644 (file)
@@ -570,6 +570,8 @@ static void InitField(int x, int y, boolean init_game)
           game_mm.laser_green = native_mm_level.df_laser_green;
           game_mm.laser_blue  = native_mm_level.df_laser_blue;
         }
+
+       game_mm.has_mcduffin = (IS_MCDUFFIN(element));
       }
 
       break;
@@ -662,6 +664,7 @@ void InitGameEngine_MM(void)
   game_mm.laser_red = FALSE;
   game_mm.laser_green = FALSE;
   game_mm.laser_blue = TRUE;
+  game_mm.has_mcduffin = TRUE;
 
   game_mm.level_solved = FALSE;
   game_mm.game_over = FALSE;