From 83152fd6088f08c238a1d175cfadef847dd7eaac Mon Sep 17 00:00:00 2001 From: Matthew Hoops Date: Mon, 4 Feb 2013 19:03:21 -0500 Subject: PEGASUS: Make the demo menu music start before the splash screen --- engines/pegasus/pegasus.cpp | 34 +++++++++++++++++++++++++--------- 1 file changed, 25 insertions(+), 9 deletions(-) (limited to 'engines') diff --git a/engines/pegasus/pegasus.cpp b/engines/pegasus/pegasus.cpp index be3fcd5cff..eedfaa7db3 100644 --- a/engines/pegasus/pegasus.cpp +++ b/engines/pegasus/pegasus.cpp @@ -691,19 +691,35 @@ void PegasusEngine::receiveNotification(Notification *notification, const Notifi case kGameStartingFlag: { useMenu(new MainMenu()); - if (!isDemo()) { + if (isDemo()) { + // Start playing the music earlier here + ((MainMenu *)_gameMenu)->startMainMenuLoop(); + + // Show the intro splash screen + showTempScreen("Images/Demo/NGsplashScrn.pict"); + + if (shouldQuit()) { + useMenu(0); + return; + } + + // Fade out and then back in with the main menu + _gfx->doFadeOutSync(); + _gfx->updateDisplay(); + _gfx->doFadeInSync(); + } else { + // Display the intro runIntro(); resetIntroTimer(); - } else { - showTempScreen("Images/Demo/NGsplashScrn.pict"); - } - if (shouldQuit()) - return; + if (shouldQuit()) + return; - _gfx->invalRect(Common::Rect(0, 0, 640, 480)); - _gfx->updateDisplay(); - ((MainMenu *)_gameMenu)->startMainMenuLoop(); + // Now display the main menu + _gfx->invalRect(Common::Rect(0, 0, 640, 480)); + _gfx->updateDisplay(); + ((MainMenu *)_gameMenu)->startMainMenuLoop(); + } break; } case kPlayerDiedFlag: -- cgit v1.2.3