static unsigned int seed;
static int score;
-static const byte is_blank[TILE_MAX] =
+static const byte is_blank[GAME_TILE_MAX] =
{
[Xblank] = 1,
[Xsplash_e] = 1,
[Xfake_acid_8] = 1
};
-static const byte is_blank_or_acid[TILE_MAX] =
+static const byte is_blank_or_acid[GAME_TILE_MAX] =
{
[Xblank] = 1,
[Xsplash_e] = 1,
[Xacid_8] = 1
};
-static const byte is_fake_acid[TILE_MAX] =
+static const byte is_fake_acid[GAME_TILE_MAX] =
{
[Xfake_acid_1] = 1,
[Xfake_acid_2] = 1,
[Xfake_acid_8] = 1
};
-static const byte is_amoeba[TILE_MAX] =
+static const byte is_amoeba[GAME_TILE_MAX] =
{
[Xfake_amoeba] = 1,
[Yfake_amoeba] = 1,
[Xamoeba_8] = 1
};
-static const byte is_android_walkable[TILE_MAX] =
+static const byte is_android_walkable[GAME_TILE_MAX] =
{
[Xblank] = 1,
[Xsplash_e] = 1,
int x = ply->x;
int y = ply->y;
- ply->alive = 0;
+ ply->alive = FALSE;
switch (cave[x][y-1])
{
ply->joy_stick = 1;
ply->joy_n = ply->joy_e = ply->joy_s = ply->joy_w = 0;
ply->dynamite_cnt = 0; /* reset dynamite timer if we move */
- ply->joy_spin = !ply->joy_spin;
if (ply->joy_snap == 0) /* player wants to move */
{
for (i = 0; i < MAX_PLAYERS; i++)
{
+ if (!ply[i].alive)
+ continue;
+
/* check for wrap-around movement */
if (ply[i].x < lev.left ||
ply[i].x > lev.right - 1)
game.centered_player_nr_next = i;
game.set_centered_player = TRUE;
- game.set_centered_player_fast = TRUE;
+ game.set_centered_player_wrap = TRUE;
}
- ply[i].oldx = ply[i].x;
- ply[i].oldy = ply[i].y;
+ ply[i].prev_x = ply[i].x;
+ ply[i].prev_y = ply[i].y;
ply[i].anim = PLY_still;
}
if (!ply[i].alive)
continue;
- if (cave[ply[i].oldx][ply[i].oldy] == Zplayer)
+ if (cave[ply[i].prev_x][ply[i].prev_y] == Zplayer)
{
- cave[ply[i].oldx][ply[i].oldy] = Xblank;
- next[ply[i].oldx][ply[i].oldy] = Xblank;
+ cave[ply[i].prev_x][ply[i].prev_y] = Xblank;
+ next[ply[i].prev_x][ply[i].prev_y] = Xblank;
}
if (cave[ply[i].x][ply[i].y] == Xblank)