projects
/
rocksndiamonds.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
white space changes
[rocksndiamonds.git]
/
src
/
game_bd
/
bd_caveengine.c
diff --git
a/src/game_bd/bd_caveengine.c
b/src/game_bd/bd_caveengine.c
index 407c7b1ee9dcb3ed668432cd059281222daf7577..b3723b9b5b12852e867ec59257ce201421c64f13 100644
(file)
--- a/
src/game_bd/bd_caveengine.c
+++ b/
src/game_bd/bd_caveengine.c
@@
-152,7
+152,7
@@
static void play_sound_of_element(GdCave *cave, GdElement element, int x, int y)
case O_NITRO_PACK:
case O_NITRO_PACK_F:
case O_NITRO_PACK:
case O_NITRO_PACK_F:
- gd_sound_play(cave, GD_S_NITRO, element, x, y);
+ gd_sound_play(cave, GD_S_NITRO
_PACK
, element, x, y);
break;
case O_FALLING_WALL:
break;
case O_FALLING_WALL:
@@
-181,7
+181,7
@@
static void play_sound_of_element(GdCave *cave, GdElement element, int x, int y)
break;
case O_PRE_CLOCK_1:
break;
case O_PRE_CLOCK_1:
- gd_sound_play(cave, GD_S_BLADDER_CONVERT, element, x, y);
+ gd_sound_play(cave, GD_S_BLADDER_CONVERT
ING
, element, x, y);
break;
case O_SLIME:
break;
case O_SLIME:
@@
-193,18
+193,18
@@
static void play_sound_of_element(GdCave *cave, GdElement element, int x, int y)
break;
case O_ACID:
break;
case O_ACID:
- gd_sound_play(cave, GD_S_ACID_SPREAD, element, x, y);
+ gd_sound_play(cave, GD_S_ACID_SPREAD
ING
, element, x, y);
break;
case O_BLADDER:
break;
case O_BLADDER:
- gd_sound_play(cave, GD_S_BLADDER_MOV
E
, element, x, y);
+ gd_sound_play(cave, GD_S_BLADDER_MOV
ING
, element, x, y);
break;
case O_BITER_1:
case O_BITER_2:
case O_BITER_3:
case O_BITER_4:
break;
case O_BITER_1:
case O_BITER_2:
case O_BITER_3:
case O_BITER_4:
- gd_sound_play(cave, GD_S_BITER_EAT, element, x, y);
+ gd_sound_play(cave, GD_S_BITER_EAT
ING
, element, x, y);
break;
case O_DIRT_BALL:
break;
case O_DIRT_BALL:
@@
-488,7
+488,7
@@
static void creature_explode(GdCave *cave, int x, int y, GdElement explode_to)
/* the processing of an explosion took pretty much time: processing 3x3 = 9 elements */
cave->ckdelay += 1200;
/* the processing of an explosion took pretty much time: processing 3x3 = 9 elements */
cave->ckdelay += 1200;
- gd_sound_play(cave, GD_S_EXPLO
SION
, get(cave, x, y), x, y);
+ gd_sound_play(cave, GD_S_EXPLO
DING
, get(cave, x, y), x, y);
for (yy = y - 1; yy <= y + 1; yy++)
for (xx = x - 1; xx <= x + 1; xx++)
for (yy = y - 1; yy <= y + 1; yy++)
for (xx = x - 1; xx <= x + 1; xx++)
@@
-501,7
+501,7
@@
static void nitro_explode(GdCave *cave, int x, int y)
/* the processing of an explosion took pretty much time: processing 3x3 = 9 elements */
cave->ckdelay += 1200;
/* the processing of an explosion took pretty much time: processing 3x3 = 9 elements */
cave->ckdelay += 1200;
- gd_sound_play(cave, GD_S_NITRO_
EXPLOSION
, get(cave, x, y), x, y);
+ gd_sound_play(cave, GD_S_NITRO_
PACK_EXPLODING
, get(cave, x, y), x, y);
for (yy = y - 1; yy <= y + 1; yy++)
for (xx = x - 1; xx <= x + 1; xx++)
for (yy = y - 1; yy <= y + 1; yy++)
for (xx = x - 1; xx <= x + 1; xx++)
@@
-520,7
+520,7
@@
static void voodoo_explode(GdCave *cave, int x, int y)
/* the processing of an explosion took pretty much time: processing 3x3 = 9 elements */
cave->ckdelay += 1000;
/* the processing of an explosion took pretty much time: processing 3x3 = 9 elements */
cave->ckdelay += 1000;
- gd_sound_play(cave, GD_S_VOODOO_EXPLO
SION
, get(cave, x, y), x, y);
+ gd_sound_play(cave, GD_S_VOODOO_EXPLO
DING
, get(cave, x, y), x, y);
if (cave->voodoo_any_hurt_kills_player)
cave->voodoo_touched = TRUE;
if (cave->voodoo_any_hurt_kills_player)
cave->voodoo_touched = TRUE;
@@
-555,7
+555,7
@@
static void explode_try_skip_voodoo(GdCave *cave, const int x, const int y, cons
/* X shaped ghost explosion; does not touch voodoo! */
static void ghost_explode(GdCave *cave, const int x, const int y)
{
/* X shaped ghost explosion; does not touch voodoo! */
static void ghost_explode(GdCave *cave, const int x, const int y)
{
- gd_sound_play(cave, GD_S_GHOST_EXPLO
SION
, get(cave, x, y), x, y);
+ gd_sound_play(cave, GD_S_GHOST_EXPLO
DING
, get(cave, x, y), x, y);
/* the processing of an explosion took pretty much time: processing 5 elements */
cave->ckdelay += 650;
/* the processing of an explosion took pretty much time: processing 5 elements */
cave->ckdelay += 650;
@@
-570,7
+570,7
@@
static void ghost_explode(GdCave *cave, const int x, const int y)
/* +shaped bomb explosion; does not touch voodoo! */
static void bomb_explode(GdCave *cave, const int x, const int y)
{
/* +shaped bomb explosion; does not touch voodoo! */
static void bomb_explode(GdCave *cave, const int x, const int y)
{
- gd_sound_play(cave, GD_S_BOMB_EXPLO
SION
, get(cave, x, y), x, y);
+ gd_sound_play(cave, GD_S_BOMB_EXPLO
DING
, get(cave, x, y), x, y);
/* the processing of an explosion took pretty much time: processing 5 elements */
cave->ckdelay += 650;
/* the processing of an explosion took pretty much time: processing 5 elements */
cave->ckdelay += 650;
@@
-673,8
+673,7
@@
static void explode(GdCave *cave, int x, int y)
}
}
}
}
-static void inline
-explode_dir(GdCave *cave, const int x, const int y, GdDirection dir)
+static void inline explode_dir(GdCave *cave, const int x, const int y, GdDirection dir)
{
explode(cave, x + gd_dx[dir], y + gd_dy[dir]);
}
{
explode(cave, x + gd_dx[dir], y + gd_dy[dir]);
}
@@
-685,7
+684,7
@@
explode_dir(GdCave *cave, const int x, const int y, GdDirection dir)
returns other element if something other appears there and he can't move.
cave pointer is needed to know the diamond values.
*/
returns other element if something other appears there and he can't move.
cave pointer is needed to know the diamond values.
*/
-static GdElement player_get_element
(GdCave* cave, const GdElement object, int x, int y)
+static GdElement player_get_element(GdCave* cave, const GdElement object, int x, int y)
{
int i;
{
int i;
@@
-693,43
+692,43
@@
static GdElement player_get_element (GdCave* cave, const GdElement object, int x
{
case O_DIAMOND_KEY:
cave->diamond_key_collected = TRUE;
{
case O_DIAMOND_KEY:
cave->diamond_key_collected = TRUE;
- gd_sound_play(cave, GD_S_DIAMOND_KEY_COLLECT, object, x, y);
+ gd_sound_play(cave, GD_S_DIAMOND_KEY_COLLECT
ING
, object, x, y);
return O_SPACE;
/* KEYS AND DOORS */
case O_KEY_1:
return O_SPACE;
/* KEYS AND DOORS */
case O_KEY_1:
- gd_sound_play(cave, GD_S_KEY_COLLECT, object, x, y);
+ gd_sound_play(cave, GD_S_KEY_COLLECT
ING
, object, x, y);
cave->key1++;
return O_SPACE;
case O_KEY_2:
cave->key1++;
return O_SPACE;
case O_KEY_2:
- gd_sound_play(cave, GD_S_KEY_COLLECT, object, x, y);
+ gd_sound_play(cave, GD_S_KEY_COLLECT
ING
, object, x, y);
cave->key2++;
return O_SPACE;
case O_KEY_3:
cave->key2++;
return O_SPACE;
case O_KEY_3:
- gd_sound_play(cave, GD_S_KEY_COLLECT, object, x, y);
+ gd_sound_play(cave, GD_S_KEY_COLLECT
ING
, object, x, y);
cave->key3++;
return O_SPACE;
case O_DOOR_1:
if (cave->key1 == 0)
return object;
cave->key3++;
return O_SPACE;
case O_DOOR_1:
if (cave->key1 == 0)
return object;
- gd_sound_play(cave, GD_S_DOOR_OPEN, object, x, y);
+ gd_sound_play(cave, GD_S_DOOR_OPEN
ING
, object, x, y);
cave->key1--;
return O_SPACE;
case O_DOOR_2:
if (cave->key2 == 0)
return object;
cave->key1--;
return O_SPACE;
case O_DOOR_2:
if (cave->key2 == 0)
return object;
- gd_sound_play(cave, GD_S_DOOR_OPEN, object, x, y);
+ gd_sound_play(cave, GD_S_DOOR_OPEN
ING
, object, x, y);
cave->key2--;
return O_SPACE;
case O_DOOR_3:
if (cave->key3 == 0)
return object;
cave->key2--;
return O_SPACE;
case O_DOOR_3:
if (cave->key3 == 0)
return object;
- gd_sound_play(cave, GD_S_DOOR_OPEN, object, x, y);
+ gd_sound_play(cave, GD_S_DOOR_OPEN
ING
, object, x, y);
cave->key3--;
return O_SPACE;
cave->key3--;
return O_SPACE;
@@
-777,22
+776,22
@@
static GdElement player_get_element (GdCave* cave, const GdElement object, int x
case O_DIRT_SLOPED_DOWN_RIGHT:
case O_DIRT_BALL:
case O_DIRT_LOOSE:
case O_DIRT_SLOPED_DOWN_RIGHT:
case O_DIRT_BALL:
case O_DIRT_LOOSE:
- gd_sound_play(cave, GD_S_
WALK_EARTH
, object, x, y);
+ gd_sound_play(cave, GD_S_
DIRT_WALKING
, object, x, y);
return O_SPACE;
case O_SWEET:
return O_SPACE;
case O_SWEET:
- gd_sound_play(cave, GD_S_SWEET_COLLECT, object, x, y);
+ gd_sound_play(cave, GD_S_SWEET_COLLECT
ING
, object, x, y);
cave->sweet_eaten = TRUE;
return O_SPACE;
case O_PNEUMATIC_HAMMER:
cave->sweet_eaten = TRUE;
return O_SPACE;
case O_PNEUMATIC_HAMMER:
- gd_sound_play(cave, GD_S_PNEUMATIC_COLLECT, object, x, y);
+ gd_sound_play(cave, GD_S_PNEUMATIC_COLLECT
ING
, object, x, y);
cave->got_pneumatic_hammer = TRUE;
return O_SPACE;
case O_CLOCK:
/* bonus time */
cave->got_pneumatic_hammer = TRUE;
return O_SPACE;
case O_CLOCK:
/* bonus time */
- gd_sound_play(cave, GD_S_CLOCK_COLLECT, object, x, y);
+ gd_sound_play(cave, GD_S_CLOCK_COLLECT
ING
, object, x, y);
cave->time += cave->time_bonus * cave->timing_factor;
if (cave->time > cave->max_time * cave->timing_factor)
cave->time -= cave->max_time * cave->timing_factor;
cave->time += cave->time_bonus * cave->timing_factor;
if (cave->time > cave->max_time * cave->timing_factor)
cave->time -= cave->max_time * cave->timing_factor;
@@
-803,7
+802,7
@@
static GdElement player_get_element (GdCave* cave, const GdElement object, int x
case O_FLYING_DIAMOND:
// prevent diamond sounds for O_SKELETON (see below)
if (x != -1 && y != -1)
case O_FLYING_DIAMOND:
// prevent diamond sounds for O_SKELETON (see below)
if (x != -1 && y != -1)
- gd_sound_play(cave, GD_S_DIAMOND_COLLECT, object, x, y);
+ gd_sound_play(cave, GD_S_DIAMOND_COLLECT
ING
, object, x, y);
cave->score += cave->diamond_value;
cave->diamonds_collected++;
cave->score += cave->diamond_value;
cave->diamonds_collected++;
@@
-816,8
+815,8
@@
static GdElement player_get_element (GdCave* cave, const GdElement object, int x
cave->diamond_value = cave->extra_diamond_value;
cave->gate_open_flash = 1;
cave->diamond_value = cave->extra_diamond_value;
cave->gate_open_flash = 1;
- cave->sound3 = GD_S_CRACK;
- gd_sound_play(cave, GD_S_CRACK, O_OUTBOX, x, y);
+ cave->sound3 = GD_S_CRACK
ING
;
+ gd_sound_play(cave, GD_S_CRACK
ING
, O_OUTBOX, x, y);
}
return O_SPACE;
}
return O_SPACE;
@@
-829,7
+828,7
@@
static GdElement player_get_element (GdCave* cave, const GdElement object, int x
player_get_element(cave, O_DIAMOND, -1, -1);
/* _after_ calling get_element for the fake diamonds, so we overwrite its sounds */
player_get_element(cave, O_DIAMOND, -1, -1);
/* _after_ calling get_element for the fake diamonds, so we overwrite its sounds */
- gd_sound_play(cave, GD_S_SKELETON_COLLECT, object, x, y);
+ gd_sound_play(cave, GD_S_SKELETON_COLLECT
ING
, object, x, y);
return O_SPACE;
case O_OUTBOX:
return O_SPACE;
case O_OUTBOX:
@@
-839,7
+838,7
@@
static GdElement player_get_element (GdCave* cave, const GdElement object, int x
case O_SPACE:
case O_LAVA: /* player goes into lava, as if it was space */
case O_SPACE:
case O_LAVA: /* player goes into lava, as if it was space */
- gd_sound_play(cave, GD_S_
WALK_EMPTY
, object, x, y);
+ gd_sound_play(cave, GD_S_
EMPTY_WALKING
, object, x, y);
return O_SPACE;
default:
return O_SPACE;
default:
@@
-1066,7
+1065,7
@@
static boolean do_push(GdCave *cave, int x, int y, GdDirection player_move, bool
/* yes, so push. */
store_dir(cave, x, y, player_move + GD_MV_TWICE, O_BOX);
result = TRUE;
/* yes, so push. */
store_dir(cave, x, y, player_move + GD_MV_TWICE, O_BOX);
result = TRUE;
- gd_sound_play(cave, GD_S_BOX_PUSH, what, x, y);
+ gd_sound_play(cave, GD_S_BOX_PUSH
ING
, what, x, y);
}
break;
}
break;
@@
-1202,7
+1201,7
@@
static boolean do_fall_try_crack_nut(GdCave *cave, int x, int y,
store(cave, x, y, bouncing);
store_dir(cave, x, y, fall_dir, cave->nut_turns_to_when_crushed);
store(cave, x, y, bouncing);
store_dir(cave, x, y, fall_dir, cave->nut_turns_to_when_crushed);
- gd_sound_play(cave, GD_S_NUT_CRACK, O_NUT, x, y);
+ gd_sound_play(cave, GD_S_NUT_CRACK
ING
, O_NUT, x, y);
return TRUE;
}
return TRUE;
}
@@
-1480,7
+1479,7
@@
void gd_cave_iterate(GdCave *cave, GdDirection player_move, boolean player_fire,
if (cave->hammered_reappear[y][x] == 0)
{
store(cave, x, y, O_BRICK);
if (cave->hammered_reappear[y][x] == 0)
{
store(cave, x, y, O_BRICK);
- gd_sound_play(cave, GD_S_WALL_REAPPEAR, O_BRICK, x, y);
+ gd_sound_play(cave, GD_S_WALL_REAPPEAR
ING
, O_BRICK, x, y);
}
}
}
}
}
}
@@
-1594,7
+1593,7
@@
void gd_cave_iterate(GdCave *cave, GdDirection player_move, boolean player_fire,
/* if its a bomb, remember he now has one. */
/* we do not change the "remains" and "what" variables,
so that part of the code will be ineffective */
/* if its a bomb, remember he now has one. */
/* we do not change the "remains" and "what" variables,
so that part of the code will be ineffective */
- gd_sound_play(cave, GD_S_BOMB_COLLECT, what, x, y);
+ gd_sound_play(cave, GD_S_BOMB_COLLECT
ING
, what, x, y);
store_dir(cave, x, y, player_move, O_SPACE);
if (player_fire)
store_dir(cave, x, y, player_move, O_SPACE);
if (player_fire)
@@
-1689,7
+1688,7
@@
void gd_cave_iterate(GdCave *cave, GdDirection player_move, boolean player_fire,
/* placed bomb, he is normal player again */
store(cave, x, y, O_PLAYER);
/* placed bomb, he is normal player again */
store(cave, x, y, O_PLAYER);
- gd_sound_play(cave, GD_S_BOMB_PLAC
E
, O_BOMB, x, y);
+ gd_sound_play(cave, GD_S_BOMB_PLAC
ING
, O_BOMB, x, y);
}
break;
}
}
break;
}
@@
-3386,7
+3385,7
@@
void gd_cave_iterate(GdCave *cave, GdDirection player_move, boolean player_fire,
if (cave->gravity_will_change == 0)
{
cave->gravity = cave->gravity_next_direction;
if (cave->gravity_will_change == 0)
{
cave->gravity = cave->gravity_next_direction;
- gd_sound_play(cave, GD_S_GRAVITY_CHANG
E
, O_GRAVITY_SWITCH, -1, -1); /* takes precedence over amoeba and magic wall sound */
+ gd_sound_play(cave, GD_S_GRAVITY_CHANG
ING
, O_GRAVITY_SWITCH, -1, -1); /* takes precedence over amoeba and magic wall sound */
}
}
}
}
@@
-3495,7
+3494,7
@@
void gd_cave_iterate(GdCave *cave, GdDirection player_move, boolean player_fire,
cave->creatures_backwards = !cave->creatures_backwards;
}
cave->creatures_backwards = !cave->creatures_backwards;
}
- gd_sound_play(cave, GD_S_CRACK, O_INBOX, -1, -1);
+ gd_sound_play(cave, GD_S_CRACK
ING
, O_INBOX, -1, -1);
}
/* for biters */
}
/* for biters */