X-Git-Url: https://git.artsoft.org/?a=blobdiff_plain;f=src%2Fgame.c;h=a5620a017b0852734cf7f4998af10fabf0c098a9;hb=8afc6199767a6fcb7451efd2b3d5b070f6c99efb;hp=f6956bc428fc091c9f73be2aa2e79ed503b29b8d;hpb=350a8b1817f6696d4ba926e6d55ddd157e45b836;p=rocksndiamonds.git diff --git a/src/game.c b/src/game.c index f6956bc4..a5620a01 100644 --- a/src/game.c +++ b/src/game.c @@ -1,7 +1,7 @@ /*********************************************************** * Rocks'n'Diamonds -- McDuffin Strikes Back! * *----------------------------------------------------------* -* (c) 1995-2001 Artsoft Entertainment * +* (c) 1995-2002 Artsoft Entertainment * * Holger Schemel * * Detmolder Strasse 189 * * 33604 Bielefeld * @@ -140,6 +140,7 @@ static struct { ".burning", SND_ACTION_BURNING, TRUE }, { ".growing", SND_ACTION_UNKNOWN, TRUE }, { ".attacking", SND_ACTION_UNKNOWN, TRUE }, + { ".activated", SND_ACTION_UNKNOWN, TRUE }, /* other (non-loop) sound actions are optional */ { ".stepping", SND_ACTION_MOVING, FALSE }, /* discrete moving */ @@ -152,7 +153,7 @@ static struct { NULL, 0, 0 }, }; static int element_action_sound[NUM_LEVEL_ELEMENTS][NUM_SND_ACTIONS]; -static boolean is_loop_sound[NUM_SOUND_EFFECTS]; +static boolean is_loop_sound[NUM_SOUND_FILES]; #define IS_LOOP_SOUND(x) (is_loop_sound[x]) @@ -506,7 +507,7 @@ void DrawGameDoorValues() void InitGameSound() { - int sound_effect_properties[NUM_SOUND_EFFECTS]; + int sound_effect_properties[NUM_SOUND_FILES]; int i, j; #if 0 @@ -517,22 +518,21 @@ void InitGameSound() for (j=0; jshield_active_time_left) + PlaySoundLevel(player->jx, player->jy, SND_SHIELD_ACTIVE_ACTIVATED); + else if (player->shield_passive_time_left) + PlaySoundLevel(player->jx, player->jy, SND_SHIELD_PASSIVE_ACTIVATED); + } + } + if (TimeFrames >= (1000 / GameFrameDelay)) { TimeFrames = 0; @@ -4973,12 +4992,14 @@ void GameActions() for (i=0; ishield_passive_time_left--; - if (stored_player[i].shield_active_time_left > 0) - stored_player[i].shield_active_time_left--; + if (player->shield_active_time_left > 0) + player->shield_active_time_left--; } } @@ -6462,8 +6483,8 @@ boolean PlaceBomb(struct PlayerInfo *player) void PlaySoundLevel(int x, int y, int nr) { - static int loop_sound_frame[NUM_SOUND_EFFECTS]; - static int loop_sound_volume[NUM_SOUND_EFFECTS]; + static int loop_sound_frame[NUM_SOUND_FILES]; + static int loop_sound_volume[NUM_SOUND_FILES]; int sx = SCREENX(x), sy = SCREENY(y); int volume, stereo_position; int max_distance = 8;