{ ".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 */
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)
CloseAllOpenTimegates();
}
+ for (i=0; i<MAX_PLAYERS; i++)
+ {
+ struct PlayerInfo *player = &stored_player[i];
+
+ if (SHIELD_ON(player))
+ {
+ if (player->shield_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;
for (i=0; i<MAX_PLAYERS; i++)
{
- if (SHIELD_ON(&stored_player[i]))
+ struct PlayerInfo *player = &stored_player[i];
+
+ if (SHIELD_ON(player))
{
- stored_player[i].shield_passive_time_left--;
+ player->shield_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--;
}
}
for(i=0;i<MAX_HELPSCREEN_ELS;i++)
helpscreen_step[i] = helpscreen_frame[i] = helpscreen_delay[i] = 0;
helpscreen_state++;
- DrawHelpScreenElText(helpscreen_state*MAX_HELPSCREEN_ELS);
- DrawHelpScreenElAction(helpscreen_state*MAX_HELPSCREEN_ELS);
+ DrawHelpScreenElText(helpscreen_state * MAX_HELPSCREEN_ELS);
+ DrawHelpScreenElAction(helpscreen_state * MAX_HELPSCREEN_ELS);
}
else if (helpscreen_state <
num_helpscreen_els_pages + num_helpscreen_music - 1)
{
if (DelayReached(&hs_delay,GAME_FRAME_DELAY * 2))
{
- if (helpscreen_state<num_helpscreen_els_pages)
+ if (helpscreen_state < num_helpscreen_els_pages)
DrawHelpScreenElAction(helpscreen_state*MAX_HELPSCREEN_ELS);
}
+
+ /* !!! workaround for playing "music" that is really a sound loop (and
+ must therefore periodically be reactivated with the current sound
+ engine !!! */
+ PlaySoundLoop(SND_MENU_INFO_SCREEN);
+
DoAnimation();
}