changed MM engine to use explosion phase array from main engine
authorHolger Schemel <info@artsoft.org>
Wed, 4 Jan 2023 23:00:13 +0000 (00:00 +0100)
committerHolger Schemel <info@artsoft.org>
Wed, 4 Jan 2023 23:00:13 +0000 (00:00 +0100)
src/game_mm/export.h
src/game_mm/mm_game.c
src/game_mm/mm_main.h

index bb9617a30104bb2bdf57df6b3376ca721c2898f4..07ebf934e92d01804b5ac6151de36a51b1fdba1a 100644 (file)
@@ -184,7 +184,6 @@ struct EngineSnapshotInfo_MM
   short Hit[MAX_PLAYFIELD_WIDTH][MAX_PLAYFIELD_HEIGHT];
   short Box[MAX_PLAYFIELD_WIDTH][MAX_PLAYFIELD_HEIGHT];
   short Angle[MAX_PLAYFIELD_WIDTH][MAX_PLAYFIELD_HEIGHT];
-  short Frame[MAX_PLAYFIELD_WIDTH][MAX_PLAYFIELD_HEIGHT];
 
   short LX,LY, XS,YS, ELX,ELY;
   short CT,Ct;
index 7ab1c98a3b8be997de2b995266bf14a0bf4df134..8e0ab22a65eb2db45ac750a068fb243e98aa5796 100644 (file)
@@ -663,7 +663,6 @@ void InitGameEngine_MM(void)
       Angle[x][y] = 0;
       MovPos[x][y] = MovDir[x][y] = MovDelay[x][y] = 0;
       Store[x][y] = Store2[x][y] = 0;
-      Frame[x][y] = 0;
       Stop[x][y] = FALSE;
 
       InitField(x, y);
@@ -2514,12 +2513,12 @@ static void Explode_MM(int x, int y, int phase, int mode)
     Store2[x][y] = mode;
     Tile[x][y] = EL_EXPLODING_OPAQUE;
     MovDir[x][y] = MovPos[x][y] = MovDelay[x][y] = 0;
-    Frame[x][y] = 1;
+    ExplodePhase[x][y] = 1;
 
     return;
   }
 
-  Frame[x][y] = (phase < last_phase ? phase + 1 : 0);
+  ExplodePhase[x][y] = (phase < last_phase ? phase + 1 : 0);
 
   if (phase == half_phase)
   {
@@ -3161,7 +3160,7 @@ static void GameActions_MM_Ext(void)
     else if (IS_MOVING(x, y))
       ContinueMoving_MM(x, y);
     else if (IS_EXPLODING(element))
-      Explode_MM(x, y, Frame[x][y], EX_NORMAL);
+      Explode_MM(x, y, ExplodePhase[x][y], EX_NORMAL);
     else if (element == EL_EXIT_OPENING)
       OpenExit(x, y);
     else if (element == EL_GRAY_BALL_OPENING)
@@ -4014,7 +4013,6 @@ void SaveEngineSnapshotValues_MM(void)
       engine_snapshot_mm.Hit[x][y]   = Hit[x][y];
       engine_snapshot_mm.Box[x][y]   = Box[x][y];
       engine_snapshot_mm.Angle[x][y] = Angle[x][y];
-      engine_snapshot_mm.Frame[x][y] = Frame[x][y];
     }
   }
 
@@ -4057,7 +4055,6 @@ void LoadEngineSnapshotValues_MM(void)
       Hit[x][y]   = engine_snapshot_mm.Hit[x][y];
       Box[x][y]   = engine_snapshot_mm.Box[x][y];
       Angle[x][y] = engine_snapshot_mm.Angle[x][y];
-      Frame[x][y] = engine_snapshot_mm.Frame[x][y];
     }
   }
 
index 468b543281afb03b614b1e49948913757be0b2d1..29e68592c2fb966175d77c0f2360d600d0aa9776 100644 (file)
@@ -205,6 +205,7 @@ extern boolean              Stop[MAX_LEV_FIELDX][MAX_LEV_FIELDY];
 extern short           AmoebaNr[MAX_LEV_FIELDX][MAX_LEV_FIELDY];
 extern short           AmoebaCnt[MAX_NUM_AMOEBA];
 extern short           AmoebaCnt2[MAX_NUM_AMOEBA];
+extern short           ExplodePhase[MAX_LEV_FIELDX][MAX_LEV_FIELDY];
 
 extern unsigned int    Elementeigenschaften[MAX_ELEMENTS];