X-Git-Url: https://git.artsoft.org/?a=blobdiff_plain;ds=sidebyside;f=src%2Fscreens.c;h=830834d85cb6884341295781b1aed872d6d64344;hb=939a6fd558cffde54d72f9f562e504bbeffc638c;hp=f5e2239a94bbdf262e70a6ace699638d6ea17c3d;hpb=601cca5b35649856ff49e1bcb3806592b736662c;p=rocksndiamonds.git diff --git a/src/screens.c b/src/screens.c index f5e2239a..830834d8 100644 --- a/src/screens.c +++ b/src/screens.c @@ -114,6 +114,20 @@ static void drawCursorXY(int xpos, int ypos, int graphic) drawCursorExt(xpos, ypos, -1, graphic); } +static void PlaySound_Menu_Start(int sound) +{ + if (sound_info[sound].loop) + PlaySoundLoop(sound); + else + PlaySound(sound); +} + +static void PlaySound_Menu_Continue(int sound) +{ + if (sound_info[sound].loop) + PlaySoundLoop(sound); +} + void DrawTextStatic(int x, int y, char *text, int font_size, int font_type) { if (game_status == MAINMENU && gfx.menu_main_hide_static_text) @@ -1147,7 +1161,12 @@ void DrawHelpScreen() FadeToFront(); InitAnimation(); + +#if 0 PlaySoundLoop(SND_MENU_INFO_SCREEN); +#else + PlaySound_Menu_Start(SND_MENU_INFO_SCREEN); +#endif } void HandleHelpScreen(int button) @@ -1206,7 +1225,11 @@ void HandleHelpScreen(int button) /* !!! workaround for playing "music" that is really a sound loop (and must therefore periodically be reactivated with the current sound engine !!! */ +#if 0 PlaySoundLoop(SND_MENU_INFO_SCREEN); +#else + PlaySound_Menu_Continue(SND_MENU_INFO_SCREEN); +#endif DoAnimation(); } @@ -1609,8 +1632,14 @@ void DrawHallOfFame(int highlight_position) FadeToFront(); InitAnimation(); + HandleHallOfFame(highlight_position,0, 0,0, MB_MENU_INITIALIZE); + +#if 0 PlaySound(SND_MENU_HALL_OF_FAME); +#else + PlaySound_Menu_Start(SND_MENU_HALL_OF_FAME); +#endif } static void drawHallOfFameList(int first_entry, int highlight_position) @@ -1698,7 +1727,12 @@ void HandleHallOfFame(int mx, int my, int dx, int dy, int button) BackToFront(); if (game_status == HALLOFFAME) + { DoAnimation(); +#if 1 + PlaySound_Menu_Continue(SND_MENU_HALL_OF_FAME); +#endif + } }