added configurable delay times for some MM style elements (MM engine)
[rocksndiamonds.git] / src / game_mm / mm_game.c
index e2a2e5f8745093c0387e208640e44a1128d6c26f..bb579712588767f19b1536b968c009973a61e1b9 100644 (file)
@@ -606,6 +606,7 @@ void InitGameEngine_MM()
   game_mm.game_over_cause = 0;
 
   game_mm.laser_overload_value = 0;
+  game_mm.laser_enabled = FALSE;
 
   /* set global laser control values (must be set before "InitLaser()") */
   laser.start_edge.x = 0;
@@ -1329,6 +1330,13 @@ void DrawLaser(int start_edge, int mode)
   {
     DrawLaserExt(start_edge, laser.num_edges - start_edge, mode);
   }
+
+  game_mm.laser_enabled = mode;
+}
+
+void DrawLaser_MM()
+{
+  DrawLaser(0, game_mm.laser_enabled);
 }
 
 boolean HitElement(int element, int hit_mask)
@@ -3295,7 +3303,7 @@ static void GameActions_MM_Ext(struct MouseActionInfo action, boolean warp_mode)
 
   CT -= Ct;
 
-  if (element == EL_BOMB && CT > 75)
+  if (element == EL_BOMB && CT > native_mm_level.time_bomb)
   {
     if (game_mm.cheat_no_explosion)
       return;
@@ -3333,7 +3341,7 @@ static void GameActions_MM_Ext(struct MouseActionInfo action, boolean warp_mode)
     return;
   }
 
-  if (element == EL_FUSE_ON && CT > 25)
+  if (element == EL_FUSE_ON && CT > native_mm_level.time_fuse)
   {
     laser.fuse_off = TRUE;
     laser.fuse_x = ELX;
@@ -3343,7 +3351,7 @@ static void GameActions_MM_Ext(struct MouseActionInfo action, boolean warp_mode)
     DrawGraphic_MM(ELX, ELY, IMG_MM_FUSE);
   }
 
-  if (element == EL_BALL_GRAY && CT > 75)
+  if (element == EL_BALL_GRAY && CT > native_mm_level.time_ball)
   {
     static int new_elements[] =
     {
@@ -3630,7 +3638,7 @@ static void GameActions_MM_Ext(struct MouseActionInfo action, boolean warp_mode)
   }
 
   if ((element == EL_BLOCK_WOOD || element == EL_BLOCK_STONE) &&
-      laser.stops_inside_element && CT > 75)
+      laser.stops_inside_element && CT > native_mm_level.time_block)
   {
     int x, y;
     int k;