projects
/
rocksndiamonds.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (from parent 1:
41e9053
)
changed code for more generic explosion for MM engine
author
Holger Schemel
<info@artsoft.org>
Thu, 23 Feb 2023 18:01:21 +0000
(19:01 +0100)
committer
Holger Schemel
<info@artsoft.org>
Thu, 23 Feb 2023 18:01:21 +0000
(19:01 +0100)
src/game_mm/mm_game.c
patch
|
blob
|
history
diff --git
a/src/game_mm/mm_game.c
b/src/game_mm/mm_game.c
index 81bbe9d0ea577d63477bbf35129774f7687f19c2..cda5e6aee9db15eba2061ac419ba873fe2125ae9 100644
(file)
--- a/
src/game_mm/mm_game.c
+++ b/
src/game_mm/mm_game.c
@@
-2710,12
+2710,13
@@
static void Explode_MM(int x, int y, int phase, int mode)
int num_phase = 9, delay = 2;
int last_phase = num_phase * delay;
int half_phase = (num_phase / 2) * delay;
int num_phase = 9, delay = 2;
int last_phase = num_phase * delay;
int half_phase = (num_phase / 2) * delay;
+ int center_element;
laser.redraw = TRUE;
if (phase == EX_PHASE_START) // initialize 'Store[][]' field
{
laser.redraw = TRUE;
if (phase == EX_PHASE_START) // initialize 'Store[][]' field
{
-
int
center_element = Tile[x][y];
+ center_element = Tile[x][y];
if (IS_MOVING(x, y) || IS_BLOCKED(x, y))
{
if (IS_MOVING(x, y) || IS_BLOCKED(x, y))
{
@@
-2726,8
+2727,8
@@
static void Explode_MM(int x, int y, int phase, int mode)
Tile[x][y] = center_element;
}
Tile[x][y] = center_element;
}
- Store[x][y] =
center_element
;
- Store2[x][y] =
mode
;
+ Store[x][y] =
EL_EMPTY
;
+ Store2[x][y] =
center_element
;
Tile[x][y] = EL_EXPLODING_OPAQUE;
Tile[x][y] = EL_EXPLODING_OPAQUE;
@@
-2747,7
+2748,9
@@
static void Explode_MM(int x, int y, int phase, int mode)
ExplodePhase[x][y] = (phase < last_phase ? phase + 1 : 0);
ExplodePhase[x][y] = (phase < last_phase ? phase + 1 : 0);
- if (phase == half_phase)
+ center_element = Store2[x][y];
+
+ if (phase == half_phase && Store[x][y] == EL_EMPTY)
{
Tile[x][y] = EL_EXPLODING_TRANSP;
{
Tile[x][y] = EL_EXPLODING_TRANSP;
@@
-2757,7
+2760,7
@@
static void Explode_MM(int x, int y, int phase, int mode)
if (phase == last_phase)
{
if (phase == last_phase)
{
- if (
Store[x][y]
== EL_BOMB_ACTIVE)
+ if (
center_element
== EL_BOMB_ACTIVE)
{
DrawLaser(0, DL_LASER_DISABLED);
InitLaser();
{
DrawLaser(0, DL_LASER_DISABLED);
InitLaser();
@@
-2768,12
+2771,12
@@
static void Explode_MM(int x, int y, int phase, int mode)
laser.overloaded = FALSE;
}
laser.overloaded = FALSE;
}
- else if (IS_MCDUFFIN(
Store[x][y]
))
+ else if (IS_MCDUFFIN(
center_element
))
{
GameOver_MM(GAME_OVER_BOMB);
}
{
GameOver_MM(GAME_OVER_BOMB);
}
- Tile[x][y] =
EL_EMPTY
;
+ Tile[x][y] =
Store[x][y]
;
Store[x][y] = Store2[x][y] = 0;
MovDir[x][y] = MovPos[x][y] = MovDelay[x][y] = 0;
Store[x][y] = Store2[x][y] = 0;
MovDir[x][y] = MovPos[x][y] = MovDelay[x][y] = 0;