X-Git-Url: https://git.artsoft.org/?a=blobdiff_plain;f=src%2Fgame.c;h=a5620a017b0852734cf7f4998af10fabf0c098a9;hb=8afc6199767a6fcb7451efd2b3d5b070f6c99efb;hp=a6f6ce263b7f3ebad84e30191cafa9951d16fd18;hpb=dd8c2278ba26f777d147a011a4e23ebaab8091cd;p=rocksndiamonds.git diff --git a/src/game.c b/src/game.c index a6f6ce26..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; j game.engine_version == %06d\n", game.engine_version); #endif @@ -3137,7 +3136,11 @@ void StartMoving(int x, int y) else if (element == EL_BUTTERFLY || element == EL_FIREFLY) DrawGraphicAnimation(x, y, el2gfx(element), 2, 4, ANIM_NORMAL); else if (element == EL_SONDE) +#if 0 DrawGraphicAnimation(x, y, GFX_SONDE_START, 8, 2, ANIM_NORMAL); +#else + DrawNewGraphicAnimation(x, y, IMG_SATELLITE_MOVING); +#endif else if (element == EL_SP_ELECTRON) DrawGraphicAnimation(x, y, GFX2_SP_ELECTRON, 8, 2, ANIM_NORMAL); @@ -3937,7 +3940,7 @@ void AusgangstuerOeffnen(int x, int y) void AusgangstuerBlinken(int x, int y) { - DrawGraphicAnimation(x, y, GFX_AUSGANG_AUF, 4, 4, ANIM_OSCILLATE); + DrawGraphicAnimation(x, y, GFX_AUSGANG_AUF, 4, 4, ANIM_PINGPONG); } void OpenSwitchgate(int x, int y) @@ -4794,14 +4797,18 @@ void GameActions() else if (element == EL_SHIELD_PASSIVE) { DrawGraphicAnimation(x, y, GFX_SHIELD_PASSIVE, 6, 4, ANIM_NORMAL); +#if 0 if (!(FrameCounter % 4)) PlaySoundLevel(x, y, SND_SHIELD_PASSIVE_ACTIVATED); +#endif } else if (element == EL_SHIELD_ACTIVE) { DrawGraphicAnimation(x, y, GFX_SHIELD_ACTIVE, 6, 4, ANIM_NORMAL); +#if 0 if (!(FrameCounter % 4)) PlaySoundLevel(x, y, SND_SHIELD_ACTIVE_ACTIVATED); +#endif } if (game.magic_wall_active) @@ -4965,6 +4972,19 @@ void GameActions() CloseAllOpenTimegates(); } + for (i=0; ishield_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; @@ -4972,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--; } } @@ -6461,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;