game_status = last_game_status; /* restore current game status */
}
-static void PlayMenuSound()
-{
- int sound = menu.sound[game_status];
-
- if (sound == SND_UNDEFINED)
- return;
-
- if (sound_info[sound].loop)
- PlaySoundLoop(sound);
- else
- PlaySound(sound);
-}
-
-static void PlayMenuSoundIfLoop()
-{
- int sound = menu.sound[game_status];
-
- if (sound == SND_UNDEFINED)
- return;
-
- if (sound_info[sound].loop)
- PlaySoundLoop(sound);
-}
-
-static void PlayMenuMusic()
-{
- int music = menu.music[game_status];
-
- if (music == MUS_UNDEFINED)
- return;
-
- PlayMusic(music);
-}
-
void DrawHeadline()
{
DrawTextSCentered(MENU_TITLE1_YPOS, FONT_TITLE_1, PROGRAM_TITLE_STRING);
if (width > WIN_XSIZE)
{
+ /* image width too large for window => center image horizontally */
src_x = (width - WIN_XSIZE) / 2;
width = WIN_XSIZE;
}
if (height > WIN_YSIZE)
{
+ /* image height too large for window => center image vertically */
src_y = (height - WIN_YSIZE) / 2;
height = WIN_YSIZE;
}
dst_x = (WIN_XSIZE - width) / 2;
dst_y = (WIN_YSIZE - height) / 2;
-#if 1
ClearRectangleOnBackground(drawto, 0, 0, WIN_XSIZE, WIN_YSIZE);
-#else
- DrawBackground(0, 0, WIN_XSIZE, WIN_YSIZE);
-#endif
if (DrawingOnBackground(dst_x, dst_y))
BlitBitmapMasked(bitmap, drawto, src_x, src_y, width, height, dst_x, dst_y);
SetMainBackgroundImage(IMG_BACKGROUND_TITLE);
-#if 0
- CloseDoor(DOOR_CLOSE_1);
-#endif
-
PlayMenuSound();
PlayMenuMusic();
HandleTitleScreen(0, 0, 0, 0, MB_MENU_INITIALIZE);
-#if 0
-#if 1
- FadeIn(1000);
-#else
- FadeToFront();
-#endif
-#endif
-
StopAnimation();
}
audio.sound_deactivated = FALSE;
+#if 1
+ GetPlayerConfig();
+#endif
+
/* needed if last screen was the playing screen, invoked from level editor */
if (level_editor_test_game)
{
if (setup.handicap && level_nr > leveldir_current->handicap_level)
level_nr = leveldir_current->handicap_level;
+#if 0
GetPlayerConfig();
+#endif
LoadLevel(level_nr);
SetMainBackgroundImage(IMG_BACKGROUND_MAIN);
#endif
#if 1
- if (fade_delay > 0)
- FadeIn(fade_delay);
- else
- BackToFront();
+ FadeIn(fade_delay);
InitAnimation();
#endif
boolean return_to_main_menu = FALSE;
boolean use_fading_main_menu = TRUE;
boolean use_cross_fading = TRUE;
- int fade_delay = 1000;
- int post_delay = 500;
+ int fade_delay = 500;
+ int post_delay = fade_delay / 2;
if (button == MB_MENU_INITIALIZE)
{
drawto = drawto_last;
if (use_cross_fading)
- FadeCross(bitmap_db_title, fade_delay);
+ FadeCross(fade_delay);
else
FadeIn(fade_delay);
}
else
{
+ FadeSoundsAndMusic();
+
FadeOut(fade_delay, post_delay);
return_to_main_menu = TRUE;