From: Holger Schemel Date: Wed, 4 Jan 2023 23:00:13 +0000 (+0100) Subject: changed MM engine to use explosion phase array from main engine X-Git-Tag: 4.3.5.0~54 X-Git-Url: https://git.artsoft.org/?a=commitdiff_plain;h=ce96e81e781cb2b275dedf2a15711d836748bf4d;p=rocksndiamonds.git changed MM engine to use explosion phase array from main engine --- diff --git a/src/game_mm/export.h b/src/game_mm/export.h index bb9617a3..07ebf934 100644 --- a/src/game_mm/export.h +++ b/src/game_mm/export.h @@ -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; diff --git a/src/game_mm/mm_game.c b/src/game_mm/mm_game.c index 7ab1c98a..8e0ab22a 100644 --- a/src/game_mm/mm_game.c +++ b/src/game_mm/mm_game.c @@ -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]; } } diff --git a/src/game_mm/mm_main.h b/src/game_mm/mm_main.h index 468b5432..29e68592 100644 --- a/src/game_mm/mm_main.h +++ b/src/game_mm/mm_main.h @@ -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];