projects
/
rocksndiamonds.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
renamed and removed some variables
[rocksndiamonds.git]
/
src
/
game_em
/
logic.c
diff --git
a/src/game_em/logic.c
b/src/game_em/logic.c
index 2e959ffeeea12a38deb8a2f9113463a9b54fbcef..f4968eed725dda990023b36aef1f7c7820be4293 100644
(file)
--- a/
src/game_em/logic.c
+++ b/
src/game_em/logic.c
@@
-20,7
+20,7
@@
static short **cave, **next, **boom;
static unsigned int seed;
static int score;
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,
{
[Xblank] = 1,
[Xsplash_e] = 1,
@@
-35,7
+35,7
@@
static const byte is_blank[TILE_MAX] =
[Xfake_acid_8] = 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,
{
[Xblank] = 1,
[Xsplash_e] = 1,
@@
-58,7
+58,7
@@
static const byte is_blank_or_acid[TILE_MAX] =
[Xacid_8] = 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_1] = 1,
[Xfake_acid_2] = 1,
@@
-70,7
+70,7
@@
static const byte is_fake_acid[TILE_MAX] =
[Xfake_acid_8] = 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,
{
[Xfake_amoeba] = 1,
[Yfake_amoeba] = 1,
@@
-84,7
+84,7
@@
static const byte is_amoeba[TILE_MAX] =
[Xamoeba_8] = 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,
{
[Xblank] = 1,
[Xsplash_e] = 1,
@@
-340,7
+340,7
@@
static void kill_player(struct PLAYER *ply)
int x = ply->x;
int y = ply->y;
int x = ply->x;
int y = ply->y;
- ply->alive =
0
;
+ ply->alive =
FALSE
;
switch (cave[x][y-1])
{
switch (cave[x][y-1])
{
@@
-1390,7
+1390,6
@@
static void check_player(struct PLAYER *ply)
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_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 */
{
if (ply->joy_snap == 0) /* player wants to move */
{
@@
-7290,6
+7289,9
@@
static void logic_players(void)
for (i = 0; i < MAX_PLAYERS; 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)
/* check for wrap-around movement */
if (ply[i].x < lev.left ||
ply[i].x > lev.right - 1)
@@
-7298,11
+7300,11
@@
static void logic_players(void)
game.centered_player_nr_next = i;
game.set_centered_player = TRUE;
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].
old
x = ply[i].x;
- ply[i].
old
y = ply[i].y;
+ ply[i].
prev_
x = ply[i].x;
+ ply[i].
prev_
y = ply[i].y;
ply[i].anim = PLY_still;
}
ply[i].anim = PLY_still;
}
@@
-7322,10
+7324,10
@@
static void logic_players(void)
if (!ply[i].alive)
continue;
if (!ply[i].alive)
continue;
- if (cave[ply[i].
oldx][ply[i].old
y] == Zplayer)
+ if (cave[ply[i].
prev_x][ply[i].prev_
y] == Zplayer)
{
{
- cave[ply[i].
oldx][ply[i].old
y] = Xblank;
- next[ply[i].
oldx][ply[i].old
y] = 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)
}
if (cave[ply[i].x][ply[i].y] == Xblank)