projects
/
rocksndiamonds.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
rnd-20030730-1-src
[rocksndiamonds.git]
/
src
/
game.c
diff --git
a/src/game.c
b/src/game.c
index 5b22dcbd4f7d511af5972303033fe20a6f5bae44..2c577f2fe3fa8db757c460a06a51b3a8a529fe7f 100644
(file)
--- a/
src/game.c
+++ b/
src/game.c
@@
-1893,7
+1893,7
@@
void Explode(int ex, int ey, int phase, int mode)
PlaySoundLevelAction(ex, ey, ACTION_EXPLODING);
/* remove things displayed in background while burning dynamite */
PlaySoundLevelAction(ex, ey, ACTION_EXPLODING);
/* remove things displayed in background while burning dynamite */
- if (!IS_INDESTRUCTIBLE(Back[ex][ey]))
+ if (
Back[ex][ey] != EL_EMPTY &&
!IS_INDESTRUCTIBLE(Back[ex][ey]))
Back[ex][ey] = 0;
if (IS_MOVING(ex, ey) || IS_BLOCKED(ex, ey))
Back[ex][ey] = 0;
if (IS_MOVING(ex, ey) || IS_BLOCKED(ex, ey))
@@
-1927,7
+1927,7
@@
void Explode(int ex, int ey, int phase, int mode)
#if 1
#if 1
-#if
1
+#if
0
if (IS_EXPLOSION_PROOF(element))
continue;
#else
if (IS_EXPLOSION_PROOF(element))
continue;
#else
@@
-1958,11
+1958,11
@@
void Explode(int ex, int ey, int phase, int mode)
}
/* save walkable background elements while explosion on same tile */
}
/* save walkable background elements while explosion on same tile */
-#if
1
+#if
0
if (IS_INDESTRUCTIBLE(element))
Back[x][y] = element;
#else
if (IS_INDESTRUCTIBLE(element))
Back[x][y] = element;
#else
- if (IS_
INDESTRUCTIBLE(element) && IS_WALKA
BLE(element))
+ if (IS_
WALKABLE(element) && IS_INDESTRUCTI
BLE(element))
Back[x][y] = element;
#endif
Back[x][y] = element;
#endif
@@
-2136,6
+2136,9
@@
void Explode(int ex, int ey, int phase, int mode)
InitMovDir(x, y);
DrawLevelField(x, y);
InitMovDir(x, y);
DrawLevelField(x, y);
+ if (CAN_BE_CRUMBLED(element))
+ DrawLevelFieldCrumbledSandNeighbours(x, y);
+
if (IS_PLAYER(x, y) && !PLAYERINFO(x,y)->present)
StorePlayer[x][y] = 0;
}
if (IS_PLAYER(x, y) && !PLAYERINFO(x,y)->present)
StorePlayer[x][y] = 0;
}
@@
-2695,7
+2698,7
@@
void Impact(int x, int y)
return;
}
#if 1
return;
}
#if 1
- else if (impact && CheckElementChange(x, y, element,
ACTION
_IMPACT))
+ else if (impact && CheckElementChange(x, y, element,
CE
_IMPACT))
{
PlaySoundLevelElementAction(x, y, element, ACTION_IMPACT);
{
PlaySoundLevelElementAction(x, y, element, ACTION_IMPACT);
@@
-3840,7
+3843,9
@@
void StartMoving(int x, int y)
return;
}
return;
}
+#if 0
GfxAction[x][y] = ACTION_MOVING;
GfxAction[x][y] = ACTION_MOVING;
+#endif
}
/* now make next step */
}
/* now make next step */
@@
-4053,7
+4058,8
@@
void StartMoving(int x, int y)
TurnRound(x, y);
#if 1
TurnRound(x, y);
#if 1
- DrawLevelElementAnimation(x, y, element);
+ if (GFX_ELEMENT(element) != EL_SAND)
+ DrawLevelElementAnimation(x, y, element);
#else
if (element == EL_BUG ||
element == EL_SPACESHIP ||
#else
if (element == EL_BUG ||
element == EL_SPACESHIP ||
@@
-5226,6
+5232,8
@@
static void ChangeElementNow(int x, int y, int element)
if (!change->only_complete || complete_change)
{
if (!change->only_complete || complete_change)
{
+ boolean something_has_changed = FALSE;
+
if (change->only_complete && change->use_random_change &&
RND(100) < change->random)
return;
if (change->only_complete && change->use_random_change &&
RND(100) < change->random)
return;
@@
-5243,17
+5251,24
@@
static void ChangeElementNow(int x, int y, int element)
ChangeElementNowExt(ex, ey, change->content[xx][yy]);
ChangeElementNowExt(ex, ey, change->content[xx][yy]);
+ something_has_changed = TRUE;
+
/* for symmetry reasons, stop newly created border elements */
if (ex != x || ey != y)
Stop[ex][ey] = TRUE;
}
}
/* for symmetry reasons, stop newly created border elements */
if (ex != x || ey != y)
Stop[ex][ey] = TRUE;
}
}
- return;
+ if (something_has_changed)
+ PlaySoundLevelElementAction(x, y, element, ACTION_CHANGING);
}
}
}
}
+ else
+ {
+ ChangeElementNowExt(x, y, change->target_element);
- ChangeElementNowExt(x, y, change->target_element);
+ PlaySoundLevelElementAction(x, y, element, ACTION_CHANGING);
+ }
}
static void ChangeElement(int x, int y)
}
static void ChangeElement(int x, int y)