From 6f6af05b1d4b9671bc115ab9ab2fa3b9d516a652 Mon Sep 17 00:00:00 2001 From: Holger Schemel Date: Mon, 27 Sep 2004 20:50:02 +0200 Subject: [PATCH] rnd-20040927-3-src --- src/conftime.h | 2 +- src/files.c | 2 +- src/game_em/init.c | 7 ++++ src/game_em/main_em.h | 38 ++++++++++++++++++++++ src/game_em/sample.h | 72 +++++++++++++++++++++++------------------ src/game_em/sound.c | 37 +++++++++++++++++---- src/game_em/synchro_1.c | 61 ++++++++++++++++++---------------- src/game_em/synchro_2.c | 49 +++++++++++++++------------- 8 files changed, 178 insertions(+), 90 deletions(-) diff --git a/src/conftime.h b/src/conftime.h index c06a7d10..c0d96d9c 100644 --- a/src/conftime.h +++ b/src/conftime.h @@ -1 +1 @@ -#define COMPILE_DATE_STRING "[2004-09-27 19:23]" +#define COMPILE_DATE_STRING "[2004-09-27 20:49]" diff --git a/src/files.c b/src/files.c index 08785811..20eadecd 100644 --- a/src/files.c +++ b/src/files.c @@ -1820,7 +1820,7 @@ void CopyNativeLevel_RND_to_EM(struct LevelInfo *level) ply2->x_initial = 0; ply2->y_initial = 0; - /* at last, set the two players at their positions in the playfield */ + /* at last, set the two players to their positions in the playfield */ for (y = 0; y < lev->height; y++) for (x = 0; x < lev->width; x++) { if (level->field[x][y] == EL_PLAYER_1) diff --git a/src/game_em/init.c b/src/game_em/init.c index 7f775a05..c92ebd36 100644 --- a/src/game_em/init.c +++ b/src/game_em/init.c @@ -57,6 +57,7 @@ static const char *sound_names[SAMPLE_MAX] = "12.collect.au", "13.diamond.au", "14.squash.au", + "14.squash.au", "15.drip.au", "16.push.au", "17.dirt.au", @@ -97,6 +98,7 @@ static const int sound_volume[SAMPLE_MAX] = 100, 100, 100, + 100, 20, 100, 100, @@ -293,6 +295,11 @@ void play_sound(int x, int y, int sample) #endif } +void play_element_sound(int x, int y, int sample, int element) +{ + play_sound(x, y, sample); +} + void sound_play(void) { #if 0 diff --git a/src/game_em/main_em.h b/src/game_em/main_em.h index e1173bcb..38320ef6 100644 --- a/src/game_em/main_em.h +++ b/src/game_em/main_em.h @@ -425,6 +425,44 @@ enum TILE_MAX }; +enum +{ + SAMPLE_blank = 0, /* player walks on blank */ + SAMPLE_roll, /* player pushes stone/bomb/nut/spring */ + SAMPLE_stone, /* stone hits ground */ + SAMPLE_nut, /* nut hits ground */ + SAMPLE_crack, /* stone hits nut */ + SAMPLE_bug, /* bug moves */ + SAMPLE_tank, /* tank moves */ + SAMPLE_android, /* android places something */ + SAMPLE_spring, /* spring hits ground/wall/bumper, stone hits spring */ + SAMPLE_slurp, /* spring kills alien */ + SAMPLE_eater, /* eater sits/eats diamond */ + SAMPLE_alien, /* alien moves */ + SAMPLE_collect, /* player collects object */ + SAMPLE_diamond, /* diamond/emerald hits ground */ + SAMPLE_squash, /* stone squashes diamond */ + SAMPLE_wonderfall, /* object falls thru wonderwall */ + SAMPLE_drip, /* drip hits ground */ + SAMPLE_push, /* player pushes balloon/android */ + SAMPLE_dirt, /* player walks on dirt */ + SAMPLE_acid, /* acid splashes */ + SAMPLE_ball, /* ball places something */ + SAMPLE_grow, /* growing wall grows */ + SAMPLE_wonder, /* wonderwall moves (is active) */ + SAMPLE_door, /* player goes thru door */ + SAMPLE_exit, /* player goes in exit */ + SAMPLE_dynamite, /* player places dynamite */ + SAMPLE_tick, /* dynamite ticks */ + SAMPLE_press, /* player presses wheel/wind/switch */ + SAMPLE_wheel, /* wheel moves */ + SAMPLE_boom, /* explosion */ + SAMPLE_time, /* time runs out */ + SAMPLE_die, /* player dies */ + + SAMPLE_MAX +}; + struct LEVEL { unsigned int home_initial; /* number of players (initial) */ diff --git a/src/game_em/sample.h b/src/game_em/sample.h index e6bfa369..f84531c2 100644 --- a/src/game_em/sample.h +++ b/src/game_em/sample.h @@ -1,51 +1,59 @@ #ifndef SAMPLE_H #define SAMPLE_H +#include "main_em.h" + +#if 0 + enum { - SAMPLE_blank = 0, /* player walks on blank */ - SAMPLE_roll, /* player pushes stone/bomb/nut */ - SAMPLE_stone, /* stone hits ground */ - SAMPLE_nut, /* nut hits ground */ - SAMPLE_crack, /* stone hits nut */ - SAMPLE_bug, /* bug moves */ - SAMPLE_tank, /* tank moves */ - SAMPLE_android, /* android places something */ - SAMPLE_spring, /* spring hits ground/wall/bumper, stone hits spring */ - SAMPLE_slurp, /* spring kills alien */ - SAMPLE_eater, /* eater sits/eats diamond */ - SAMPLE_alien, /* alien moves */ - SAMPLE_collect, /* player collects object */ - SAMPLE_diamond, /* diamond/emerald hits ground */ - SAMPLE_squash, /* stone squashes diamond; object falls thru wonderwall */ - SAMPLE_drip, /* drip hits ground */ - SAMPLE_push, /* player pushes spring/balloon/android */ - SAMPLE_dirt, /* player walks on dirt */ - SAMPLE_acid, /* acid splashes */ - SAMPLE_ball, /* ball places something */ - SAMPLE_grow, /* growing wall grows */ - SAMPLE_wonder, /* wonderwall moves */ - SAMPLE_door, /* player goes thru door */ - SAMPLE_exit, /* player goes in exit */ - SAMPLE_dynamite, /* player places dynamite */ - SAMPLE_tick, /* dynamite ticks */ - SAMPLE_press, /* player presses wheel/wind/switch */ - SAMPLE_wheel, /* wheel moves */ - SAMPLE_boom, /* explosion */ - SAMPLE_time, /* time runs out */ - SAMPLE_die, /* player dies */ + SAMPLE_blank = 0, /* player walks on blank */ + SAMPLE_roll, /* player pushes stone/bomb/nut/spring */ + SAMPLE_stone, /* stone hits ground */ + SAMPLE_nut, /* nut hits ground */ + SAMPLE_crack, /* stone hits nut */ + SAMPLE_bug, /* bug moves */ + SAMPLE_tank, /* tank moves */ + SAMPLE_android, /* android places something */ + SAMPLE_spring, /* spring hits ground/wall/bumper, stone hits spring */ + SAMPLE_slurp, /* spring kills alien */ + SAMPLE_eater, /* eater sits/eats diamond */ + SAMPLE_alien, /* alien moves */ + SAMPLE_collect, /* player collects object */ + SAMPLE_diamond, /* diamond/emerald hits ground */ + SAMPLE_squash, /* stone squashes diamond */ + SAMPLE_wonderfall, /* object falls thru wonderwall */ + SAMPLE_drip, /* drip hits ground */ + SAMPLE_push, /* player pushes balloon/android */ + SAMPLE_dirt, /* player walks on dirt */ + SAMPLE_acid, /* acid splashes */ + SAMPLE_ball, /* ball places something */ + SAMPLE_grow, /* growing wall grows */ + SAMPLE_wonder, /* wonderwall moves (is active) */ + SAMPLE_door, /* player goes thru door */ + SAMPLE_exit, /* player goes in exit */ + SAMPLE_dynamite, /* player places dynamite */ + SAMPLE_tick, /* dynamite ticks */ + SAMPLE_press, /* player presses wheel/wind/switch */ + SAMPLE_wheel, /* wheel moves */ + SAMPLE_boom, /* explosion */ + SAMPLE_time, /* time runs out */ + SAMPLE_die, /* player dies */ SAMPLE_MAX }; +#endif + extern void play_sound(int, int, int); +extern void play_element_sound(int, int, int, int); extern char play[SAMPLE_MAX]; extern int sound_pipe[2]; extern short *sound_data[SAMPLE_MAX]; extern long sound_length[SAMPLE_MAX]; -#define MIXER_MAX 4 /* maximum number of samples we can play at once */ +#define MIXER_MAX 4 /* maximum number of samples we can play at once */ #if defined(AUDIO_UNIX_NATIVE) diff --git a/src/game_em/sound.c b/src/game_em/sound.c index 7d971f5f..78a293c5 100644 --- a/src/game_em/sound.c +++ b/src/game_em/sound.c @@ -27,12 +27,37 @@ static char audioname[] = "/dev/audio"; static const int sound_priority[SAMPLE_MAX] = { - SAMPLE_exit, SAMPLE_die, SAMPLE_time, SAMPLE_boom, SAMPLE_tick, - SAMPLE_collect, SAMPLE_roll, SAMPLE_push, SAMPLE_dynamite, SAMPLE_press, - SAMPLE_door, SAMPLE_dirt, SAMPLE_blank, SAMPLE_android, SAMPLE_ball, - SAMPLE_grow, SAMPLE_squash, SAMPLE_crack, SAMPLE_slurp, SAMPLE_drip, - SAMPLE_wonder, SAMPLE_wheel, SAMPLE_stone, SAMPLE_spring, SAMPLE_diamond, - SAMPLE_nut, SAMPLE_bug, SAMPLE_tank, SAMPLE_eater, SAMPLE_alien, + SAMPLE_exit, + SAMPLE_die, + SAMPLE_time, + SAMPLE_boom, + SAMPLE_tick, + SAMPLE_collect, + SAMPLE_roll, + SAMPLE_push, + SAMPLE_dynamite, + SAMPLE_press, + SAMPLE_door, + SAMPLE_dirt, + SAMPLE_blank, + SAMPLE_android, + SAMPLE_ball, + SAMPLE_grow, + SAMPLE_squash, + SAMPLE_wonderfall, + SAMPLE_crack, + SAMPLE_slurp, + SAMPLE_drip, + SAMPLE_wonder, + SAMPLE_wheel, + SAMPLE_stone, + SAMPLE_spring, + SAMPLE_diamond, + SAMPLE_nut, + SAMPLE_bug, + SAMPLE_tank, + SAMPLE_eater, + SAMPLE_alien, SAMPLE_acid }; diff --git a/src/game_em/synchro_1.c b/src/game_em/synchro_1.c index e83a38f7..0ff540e3 100644 --- a/src/game_em/synchro_1.c +++ b/src/game_em/synchro_1.c @@ -84,6 +84,9 @@ static int test(struct PLAYER *ply) register unsigned int x = ply->x; register unsigned int y = ply->y; + if (!ply->alive) + return 0; + if (lev.time == 0) return(1); @@ -410,6 +413,8 @@ static void player(struct PLAYER *ply) if (ply->joy_fire == 0) { + int element = Cave[y][x]; + switch(Cave[y][x]) { /* fire is released */ @@ -459,7 +464,7 @@ static void player(struct PLAYER *ply) Cave[y][x] = (dy ? (dy < 0 ? Ygrass_nB : Ygrass_sB) : (dx > 0 ? Ygrass_eB : Ygrass_wB)); Next[y][x] = Zplayer; - play_sound(x, y, SAMPLE_dirt); + play_element_sound(x, y, SAMPLE_dirt, Xgrass); ply->anim = SPR_walk + anim; ply->x = x; ply->y = y; @@ -469,7 +474,7 @@ static void player(struct PLAYER *ply) Cave[y][x] = (dy ? (dy < 0 ? Ydirt_nB : Ydirt_sB) : (dx > 0 ? Ydirt_eB : Ydirt_wB)); Next[y][x] = Zplayer; - play_sound(x, y, SAMPLE_dirt); + play_element_sound(x, y, SAMPLE_dirt, Xdirt); ply->anim = SPR_walk + anim; ply->x = x; ply->y = y; @@ -479,7 +484,7 @@ static void player(struct PLAYER *ply) case Xdiamond_pause: Cave[y][x] = Ydiamond_eat; Next[y][x] = Zplayer; - play_sound(x, y, SAMPLE_collect); + play_element_sound(x, y, SAMPLE_collect, element); lev.score += lev.diamond_score; lev.required = lev.required < 3 ? 0 : lev.required - 3; ply->anim = SPR_walk + anim; @@ -491,7 +496,7 @@ static void player(struct PLAYER *ply) case Xemerald_pause: Cave[y][x] = Yemerald_eat; Next[y][x] = Zplayer; - play_sound(x, y, SAMPLE_collect); + play_element_sound(x, y, SAMPLE_collect, element); lev.score += lev.emerald_score; lev.required = lev.required < 1 ? 0 : lev.required - 1; ply->anim = SPR_walk + anim; @@ -502,7 +507,7 @@ static void player(struct PLAYER *ply) case Xdynamite: Cave[y][x] = Ydynamite_eat; Next[y][x] = Zplayer; - play_sound(x, y, SAMPLE_collect); + play_element_sound(x, y, SAMPLE_collect, element); lev.score += lev.dynamite_score; ply->dynamite = ply->dynamite > 9998 ? 9999 : ply->dynamite + 1; ply->anim = SPR_walk + anim; @@ -546,7 +551,7 @@ static void player(struct PLAYER *ply) Cave[y][x] = Yball_eat; Next[y][x] = Zplayer; - play_sound(x, y, SAMPLE_collect); + play_element_sound(x, y, SAMPLE_collect, element); lev.score += lev.key_score; ply->anim = SPR_walk + anim; ply->x = x; @@ -556,7 +561,7 @@ static void player(struct PLAYER *ply) case Xlenses: Cave[y][x] = Yball_eat; Next[y][x] = Zplayer; - play_sound(x, y, SAMPLE_collect); + play_element_sound(x, y, SAMPLE_collect, element); lev.score += lev.lenses_score; lev.lenses_cnt = lev.lenses_time; ply->anim = SPR_walk + anim; @@ -567,7 +572,7 @@ static void player(struct PLAYER *ply) case Xmagnify: Cave[y][x] = Yball_eat; Next[y][x] = Zplayer; - play_sound(x, y, SAMPLE_collect); + play_element_sound(x, y, SAMPLE_collect, element); lev.score += lev.magnify_score; lev.magnify_cnt = lev.magnify_time; ply->anim = SPR_walk + anim; @@ -606,7 +611,7 @@ static void player(struct PLAYER *ply) Cave[y][x] = dx > 0 ? Ystone_eB : Ystone_wB; Next[y][x] = Zplayer; - play_sound(x, y, SAMPLE_roll); + play_element_sound(x, y, SAMPLE_roll, Xstone); ply->x = x; } @@ -644,7 +649,7 @@ static void player(struct PLAYER *ply) Cave[y][x] = dx > 0 ? Ybomb_eB : Ybomb_wB; Next[y][x] = Zplayer; - play_sound(x, y, SAMPLE_roll); + play_element_sound(x, y, SAMPLE_roll, Xbomb); ply->x = x; } @@ -682,7 +687,7 @@ static void player(struct PLAYER *ply) Cave[y][x] = dx > 0 ? Ynut_eB : Ynut_wB; Next[y][x] = Zplayer; - play_sound(x, y, SAMPLE_roll); + play_element_sound(x, y, SAMPLE_roll, Xnut); ply->x = x; } @@ -730,7 +735,7 @@ static void player(struct PLAYER *ply) spring_walk: Cave[y][x] = dx > 0 ? Yspring_eB : Yspring_wB; Next[y][x] = Zplayer; - play_sound(x, y, SAMPLE_roll); + play_element_sound(x, y, SAMPLE_roll, Xspring); ply->x = x; } @@ -780,7 +785,7 @@ static void player(struct PLAYER *ply) Cave[y][x] = (dy ? (dy < 0 ? Yballoon_nB : Yballoon_sB) : (dx > 0 ? Yballoon_eB : Yballoon_wB)); Next[y][x] = Zplayer; - play_sound(x, y, SAMPLE_push); + play_element_sound(x, y, SAMPLE_push, Xballoon); ply->x = x; ply->y = y; } @@ -826,7 +831,7 @@ static void player(struct PLAYER *ply) Cave[y][x] = (dy ? (dy < 0 ? Yandroid_nB : Yandroid_sB) : (dx > 0 ? Yandroid_eB : Yandroid_wB)); Next[y][x] = Zplayer; - play_sound(x, y, SAMPLE_push); + play_element_sound(x, y, SAMPLE_push, Xandroid); ply->x = x; ply->y = y; } @@ -896,14 +901,14 @@ static void player(struct PLAYER *ply) Cave[y+dy][x+dx] = Zplayer; Next[y+dy][x+dx] = Zplayer; - play_sound(x, y, SAMPLE_door); + play_element_sound(x, y, SAMPLE_door, element); ply->anim = SPR_walk + anim; ply->x = x + dx; ply->y = y + dy; break; case Xwheel: - play_sound(x, y, SAMPLE_press); + play_element_sound(x, y, SAMPLE_press, element); lev.wheel_cnt = lev.wheel_time; lev.wheel_x = x; lev.wheel_y = y; @@ -930,17 +935,17 @@ static void player(struct PLAYER *ply) goto wind_walk; wind_walk: - play_sound(x, y, SAMPLE_press); + play_element_sound(x, y, SAMPLE_press, element); lev.wind_cnt = lev.wind_time; break; case Xwind_stop: - play_sound(x, y, SAMPLE_press); + play_element_sound(x, y, SAMPLE_press, element); lev.wind_cnt = 0; break; case Xswitch: - play_sound(x, y, SAMPLE_press); + play_element_sound(x, y, SAMPLE_press, element); lev.ball_cnt = lev.ball_time; lev.ball_state = !lev.ball_state; break; @@ -948,7 +953,7 @@ static void player(struct PLAYER *ply) case Xplant: Cave[y][x] = Yplant; Next[y][x] = Xplant; - play_sound(x, y, SAMPLE_blank); + play_element_sound(x, y, SAMPLE_blank, Xplant); ply->anim = SPR_walk + anim; ply->x = x; ply->y = y; @@ -968,6 +973,8 @@ static void player(struct PLAYER *ply) } else { + int element = Cave[y][x]; + switch(Cave[y][x]) { /* fire is pressed */ @@ -976,7 +983,7 @@ static void player(struct PLAYER *ply) case Xdirt: Cave[y][x] = Yball_eat; Next[y][x] = Xblank; - play_sound(x, y, SAMPLE_dirt); + play_element_sound(x, y, SAMPLE_dirt, element); ply->anim = SPR_spray + anim; break; @@ -984,7 +991,7 @@ static void player(struct PLAYER *ply) case Xdiamond_pause: Cave[y][x] = Ydiamond_eat; Next[y][x] = Xblank; - play_sound(x, y, SAMPLE_collect); + play_element_sound(x, y, SAMPLE_collect, element); lev.score += lev.diamond_score; lev.required = lev.required < 3 ? 0 : lev.required - 3; ply->anim = SPR_walk + anim; @@ -994,7 +1001,7 @@ static void player(struct PLAYER *ply) case Xemerald_pause: Cave[y][x] = Yemerald_eat; Next[y][x] = Xblank; - play_sound(x, y, SAMPLE_collect); + play_element_sound(x, y, SAMPLE_collect, element); lev.score += lev.emerald_score; lev.required = lev.required < 1 ? 0 : lev.required - 1; ply->anim = SPR_walk + anim; @@ -1003,7 +1010,7 @@ static void player(struct PLAYER *ply) case Xdynamite: Cave[y][x] = Ydynamite_eat; Next[y][x] = Xblank; - play_sound(x, y, SAMPLE_collect); + play_element_sound(x, y, SAMPLE_collect, element); lev.score += lev.dynamite_score; ply->dynamite = ply->dynamite > 9998 ? 9999 : ply->dynamite + 1; ply->anim = SPR_walk + anim; @@ -1044,7 +1051,7 @@ static void player(struct PLAYER *ply) key_shoot: Cave[y][x] = Yball_eat; Next[y][x] = Xblank; - play_sound(x, y, SAMPLE_collect); + play_element_sound(x, y, SAMPLE_collect, element); lev.score += lev.key_score; ply->anim = SPR_walk + anim; break; @@ -1052,7 +1059,7 @@ static void player(struct PLAYER *ply) case Xlenses: Cave[y][x] = Yball_eat; Next[y][x] = Xblank; - play_sound(x, y, SAMPLE_collect); + play_element_sound(x, y, SAMPLE_collect, element); lev.score += lev.lenses_score; lev.lenses_cnt = lev.lenses_time; ply->anim = SPR_walk + anim; @@ -1061,7 +1068,7 @@ static void player(struct PLAYER *ply) case Xmagnify: Cave[y][x] = Yball_eat; Next[y][x] = Xblank; - play_sound(x, y, SAMPLE_collect); + play_element_sound(x, y, SAMPLE_collect, element); lev.score += lev.magnify_score; lev.magnify_cnt = lev.magnify_time; ply->anim = SPR_walk + anim; diff --git a/src/game_em/synchro_2.c b/src/game_em/synchro_2.c index c8a50916..d8f7913c 100644 --- a/src/game_em/synchro_2.c +++ b/src/game_em/synchro_2.c @@ -27,10 +27,13 @@ void synchro_2(void) unsigned int temp = 0; /* initialized to make compilers happy */ unsigned int dx; /* only needed to find closest player */ unsigned int dy; + int element; loop: - switch (cave_cache[++x]) + element = cave_cache[++x]; + + switch (element) { default: goto loop; @@ -746,7 +749,7 @@ void synchro_2(void) } Next[y][x] = Xblank; - play_sound(x, y, SAMPLE_squash); + play_element_sound(x, y, SAMPLE_wonderfall, Xstone); goto loop; } @@ -2858,7 +2861,7 @@ void synchro_2(void) { Cave[y][x+1] = Ydiamond_eat; Next[y][x+1] = Xblank; - play_sound(x, y, SAMPLE_eater); + play_element_sound(x, y, SAMPLE_eater, Xdiamond); goto loop; } @@ -2866,7 +2869,7 @@ void synchro_2(void) { Cave[y+1][x] = Ydiamond_eat; Next[y+1][x] = Xblank; - play_sound(x, y, SAMPLE_eater); + play_element_sound(x, y, SAMPLE_eater, Xdiamond); goto loop; } @@ -2874,7 +2877,7 @@ void synchro_2(void) { Cave[y][x-1] = Ydiamond_eat; Next[y][x-1] = Xblank; - play_sound(x, y, SAMPLE_eater); + play_element_sound(x, y, SAMPLE_eater, Xdiamond); goto loop; } @@ -2882,7 +2885,7 @@ void synchro_2(void) { Cave[y-1][x] = Ydiamond_eat; Next[y-1][x] = Xblank; - play_sound(x, y, SAMPLE_eater); + play_element_sound(x, y, SAMPLE_eater, Xdiamond); goto loop; } @@ -2930,7 +2933,7 @@ void synchro_2(void) { Cave[y+1][x] = Ydiamond_eat; Next[y+1][x] = Xblank; - play_sound(x, y, SAMPLE_eater); + play_element_sound(x, y, SAMPLE_eater, Xdiamond); goto loop; } @@ -2938,7 +2941,7 @@ void synchro_2(void) { Cave[y][x-1] = Ydiamond_eat; Next[y][x-1] = Xblank; - play_sound(x, y, SAMPLE_eater); + play_element_sound(x, y, SAMPLE_eater, Xdiamond); goto loop; } @@ -2946,7 +2949,7 @@ void synchro_2(void) { Cave[y-1][x] = Ydiamond_eat; Next[y-1][x] = Xblank; - play_sound(x, y, SAMPLE_eater); + play_element_sound(x, y, SAMPLE_eater, Xdiamond); goto loop; } @@ -2954,7 +2957,7 @@ void synchro_2(void) { Cave[y][x+1] = Ydiamond_eat; Next[y][x+1] = Xblank; - play_sound(x, y, SAMPLE_eater); + play_element_sound(x, y, SAMPLE_eater, Xdiamond); goto loop; } @@ -3002,7 +3005,7 @@ void synchro_2(void) { Cave[y][x-1] = Ydiamond_eat; Next[y][x-1] = Xblank; - play_sound(x, y, SAMPLE_eater); + play_element_sound(x, y, SAMPLE_eater, Xdiamond); goto loop; } @@ -3010,7 +3013,7 @@ void synchro_2(void) { Cave[y-1][x] = Ydiamond_eat; Next[y-1][x] = Xblank; - play_sound(x, y, SAMPLE_eater); + play_element_sound(x, y, SAMPLE_eater, Xdiamond); goto loop; } @@ -3018,7 +3021,7 @@ void synchro_2(void) { Cave[y][x+1] = Ydiamond_eat; Next[y][x+1] = Xblank; - play_sound(x, y, SAMPLE_eater); + play_element_sound(x, y, SAMPLE_eater, Xdiamond); goto loop; } @@ -3026,7 +3029,7 @@ void synchro_2(void) { Cave[y+1][x] = Ydiamond_eat; Next[y+1][x] = Xblank; - play_sound(x, y, SAMPLE_eater); + play_element_sound(x, y, SAMPLE_eater, Xdiamond); goto loop; } @@ -3074,7 +3077,7 @@ void synchro_2(void) { Cave[y-1][x] = Ydiamond_eat; Next[y-1][x] = Xblank; - play_sound(x, y, SAMPLE_eater); + play_element_sound(x, y, SAMPLE_eater, Xdiamond); goto loop; } @@ -3082,7 +3085,7 @@ void synchro_2(void) { Cave[y][x+1] = Ydiamond_eat; Next[y][x+1] = Xblank; - play_sound(x, y, SAMPLE_eater); + play_element_sound(x, y, SAMPLE_eater, Xdiamond); goto loop; } @@ -3090,7 +3093,7 @@ void synchro_2(void) { Cave[y+1][x] = Ydiamond_eat; Next[y+1][x] = Xblank; - play_sound(x, y, SAMPLE_eater); + play_element_sound(x, y, SAMPLE_eater, Xdiamond); goto loop; } @@ -3098,7 +3101,7 @@ void synchro_2(void) { Cave[y][x-1] = Ydiamond_eat; Next[y][x-1] = Xblank; - play_sound(x, y, SAMPLE_eater); + play_element_sound(x, y, SAMPLE_eater, Xdiamond); goto loop; } @@ -3548,14 +3551,14 @@ void synchro_2(void) } Next[y][x] = Xblank; - play_sound(x, y, SAMPLE_squash); + play_element_sound(x, y, SAMPLE_wonderfall, Xemerald); goto loop; } default: Cave[y][x] = Xemerald; Next[y][x] = Xemerald; - play_sound(x, y, SAMPLE_diamond); + play_element_sound(x, y, SAMPLE_diamond, Xemerald); goto loop; } @@ -3775,14 +3778,14 @@ void synchro_2(void) } Next[y][x] = Xblank; - play_sound(x, y, SAMPLE_squash); + play_element_sound(x, y, SAMPLE_wonderfall, Xdiamond); goto loop; } default: Cave[y][x] = Xdiamond; Next[y][x] = Xdiamond; - play_sound(x, y, SAMPLE_diamond); + play_element_sound(x, y, SAMPLE_diamond, Xdiamond); goto loop; } @@ -4282,7 +4285,7 @@ void synchro_2(void) ball_common: - play_sound(x, y, SAMPLE_ball); + play_element_sound(x, y, SAMPLE_ball, element); if (lev.ball_random) { switch (RANDOM & 7) -- 2.34.1