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,
}
}
-void logic_players(void)
+static void logic_players(void)
{
int start_check_nr;
int i;
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)
}
}
-void logic_objects(void)
+static void logic_objects(void)
{
int x, y;
lev.draw = temp;
}
-void logic_globals(void)
+static void logic_globals(void)
{
int x;
int y;
for (x = lev.left; x < lev.right; x++)
next[x][y] = cave[x][y];
}
+
+void logic(void)
+{
+ if (frame == 0)
+ {
+ logic_players();
+ logic_objects();
+ }
+
+ if (frame == 1)
+ {
+ logic_globals();
+ }
+}