projects
/
rocksndiamonds.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
rnd-20030801-1-src
[rocksndiamonds.git]
/
src
/
game.c
diff --git
a/src/game.c
b/src/game.c
index 2c577f2fe3fa8db757c460a06a51b3a8a529fe7f..718b1fff062877878666bddd6e2109a08c845ffc 100644
(file)
--- a/
src/game.c
+++ b/
src/game.c
@@
-2215,6
+2215,7
@@
void DynaExplode(int ex, int ey)
Explode(x, y, EX_PHASE_START, EX_BORDER);
Explode(x, y, EX_PHASE_START, EX_BORDER);
+ /* !!! extend EL_SAND to anything diggable (but maybe not SP_BASE) !!! */
if (element != EL_EMPTY &&
element != EL_SAND &&
element != EL_EXPLOSION &&
if (element != EL_EMPTY &&
element != EL_SAND &&
element != EL_EXPLOSION &&
@@
-2525,14
+2526,16
@@
static int getInvisibleActiveFromInvisibleElement(int element)
{
return (element == EL_INVISIBLE_STEELWALL ? EL_INVISIBLE_STEELWALL_ACTIVE :
element == EL_INVISIBLE_WALL ? EL_INVISIBLE_WALL_ACTIVE :
{
return (element == EL_INVISIBLE_STEELWALL ? EL_INVISIBLE_STEELWALL_ACTIVE :
element == EL_INVISIBLE_WALL ? EL_INVISIBLE_WALL_ACTIVE :
- EL_INVISIBLE_SAND_ACTIVE);
+ element == EL_INVISIBLE_SAND ? EL_INVISIBLE_SAND_ACTIVE :
+ element);
}
static int getInvisibleFromInvisibleActiveElement(int element)
{
return (element == EL_INVISIBLE_STEELWALL_ACTIVE ? EL_INVISIBLE_STEELWALL :
element == EL_INVISIBLE_WALL_ACTIVE ? EL_INVISIBLE_WALL :
}
static int getInvisibleFromInvisibleActiveElement(int element)
{
return (element == EL_INVISIBLE_STEELWALL_ACTIVE ? EL_INVISIBLE_STEELWALL :
element == EL_INVISIBLE_WALL_ACTIVE ? EL_INVISIBLE_WALL :
- EL_INVISIBLE_SAND);
+ element == EL_INVISIBLE_SAND_ACTIVE ? EL_INVISIBLE_SAND :
+ element);
}
static void RedrawAllLightSwitchesAndInvisibleElements()
}
static void RedrawAllLightSwitchesAndInvisibleElements()
@@
-4058,7
+4061,7
@@
void StartMoving(int x, int y)
TurnRound(x, y);
#if 1
TurnRound(x, y);
#if 1
- if (GFX_ELEMENT(element) != EL_SAND)
+ if (GFX_ELEMENT(element) != EL_SAND)
/* !!! FIX THIS (crumble) !!! */
DrawLevelElementAnimation(x, y, element);
#else
if (element == EL_BUG ||
DrawLevelElementAnimation(x, y, element);
#else
if (element == EL_BUG ||
@@
-4553,6
+4556,7
@@
void AmoebeAbleger(int ax, int ay)
if (!IN_LEV_FIELD(x, y))
return;
if (!IN_LEV_FIELD(x, y))
return;
+ /* !!! extend EL_SAND to anything diggable (but maybe not SP_BASE) !!! */
if (IS_FREE(x, y) ||
Feld[x][y] == EL_SAND || Feld[x][y] == EL_QUICKSAND_EMPTY)
{
if (IS_FREE(x, y) ||
Feld[x][y] == EL_SAND || Feld[x][y] == EL_QUICKSAND_EMPTY)
{
@@
-4577,6
+4581,7
@@
void AmoebeAbleger(int ax, int ay)
if (!IN_LEV_FIELD(x, y))
continue;
if (!IN_LEV_FIELD(x, y))
continue;
+ /* !!! extend EL_SAND to anything diggable (but maybe not SP_BASE) !!! */
if (IS_FREE(x, y) ||
Feld[x][y] == EL_SAND || Feld[x][y] == EL_QUICKSAND_EMPTY)
{
if (IS_FREE(x, y) ||
Feld[x][y] == EL_SAND || Feld[x][y] == EL_QUICKSAND_EMPTY)
{
@@
-4721,6
+4726,7
@@
void Life(int ax, int ay)
changed = TRUE;
}
}
changed = TRUE;
}
}
+ /* !!! extend EL_SAND to anything diggable (but maybe not SP_BASE) !!! */
else if (IS_FREE(xx, yy) || Feld[xx][yy] == EL_SAND)
{ /* free border field */
if (nachbarn >= life[2] && nachbarn <= life[3])
else if (IS_FREE(xx, yy) || Feld[xx][yy] == EL_SAND)
{ /* free border field */
if (nachbarn >= life[2] && nachbarn <= life[3])
@@
-5810,6
+5816,7
@@
void GameActions()
#endif
element = Feld[x][y];
#endif
element = Feld[x][y];
+ /* !!! extend EL_SAND to anything diggable (but maybe not SP_BASE) !!! */
if (!IS_PLAYER(x,y) &&
(element == EL_EMPTY ||
element == EL_SAND ||
if (!IS_PLAYER(x,y) &&
(element == EL_EMPTY ||
element == EL_SAND ||
@@
-6097,6
+6104,7
@@
static void CheckGravityMovement(struct PlayerInfo *player)
(IN_LEV_FIELD(new_jx, new_jy) &&
(Feld[new_jx][new_jy] == EL_SP_BASE ||
Feld[new_jx][new_jy] == EL_SAND));
(IN_LEV_FIELD(new_jx, new_jy) &&
(Feld[new_jx][new_jy] == EL_SP_BASE ||
Feld[new_jx][new_jy] == EL_SAND));
+ /* !!! extend EL_SAND to anything diggable !!! */
if (field_under_player_is_free &&
!player_is_moving_to_valid_field &&
if (field_under_player_is_free &&
!player_is_moving_to_valid_field &&
@@
-7072,6
+7080,12
@@
int DigField(struct PlayerInfo *player,
!IS_FREE(nextx, nexty))
return MF_NO_ACTION;
!IS_FREE(nextx, nexty))
return MF_NO_ACTION;
+ if (element == EL_SP_GRAVITY_PORT_LEFT ||
+ element == EL_SP_GRAVITY_PORT_RIGHT ||
+ element == EL_SP_GRAVITY_PORT_UP ||
+ element == EL_SP_GRAVITY_PORT_DOWN)
+ level.gravity = !level.gravity;
+
/* automatically move to the next field with double speed */
player->programmed_action = move_direction;
DOUBLE_PLAYER_SPEED(player);
/* automatically move to the next field with double speed */
player->programmed_action = move_direction;
DOUBLE_PLAYER_SPEED(player);
@@
-7202,8
+7216,12
@@
int DigField(struct PlayerInfo *player,
if (mode != DF_SNAP)
{
if (mode != DF_SNAP)
{
+#if 1
+ GfxElement[x][y] = GFX_ELEMENT(element);
+#else
GfxElement[x][y] =
(CAN_BE_CRUMBLED(element) ? EL_SAND : GFX_ELEMENT(element));
GfxElement[x][y] =
(CAN_BE_CRUMBLED(element) ? EL_SAND : GFX_ELEMENT(element));
+#endif
player->is_digging = TRUE;
}
player->is_digging = TRUE;
}