diff options
Diffstat (limited to 'engines')
-rw-r--r-- | engines/parallaction/gui_br.cpp | 27 | ||||
-rw-r--r-- | engines/parallaction/parallaction.h | 2 | ||||
-rw-r--r-- | engines/parallaction/parallaction_br.cpp | 17 |
3 files changed, 22 insertions, 24 deletions
diff --git a/engines/parallaction/gui_br.cpp b/engines/parallaction/gui_br.cpp index 3315433762..d2169a9073 100644 --- a/engines/parallaction/gui_br.cpp +++ b/engines/parallaction/gui_br.cpp @@ -264,29 +264,24 @@ const MainMenuInputState_BR::MenuOptions MainMenuInputState_BR::_options[NUM_MEN -void Parallaction_br::startGui() { +void Parallaction_br::startGui(bool showSplash) { _menuHelper = new MenuInputHelper; - new SplashInputState0_BR(this, _menuHelper); - new SplashInputState1_BR(this, _menuHelper); - new MainMenuInputState_BR(this, _menuHelper); - - _menuHelper->setState("intro0"); - _input->_inputMode = Input::kInputModeMenu; - do { - _input->readInput(); - if (!_menuHelper->run()) break; - _gfx->beginFrame(); - _gfx->updateScreen(); - } while (true); + new MainMenuInputState_BR(this, _menuHelper); - delete _menuHelper; - _menuHelper = 0; + if (showSplash) { + new SplashInputState0_BR(this, _menuHelper); + new SplashInputState1_BR(this, _menuHelper); + _menuHelper->setState("intro0"); + } else { + _menuHelper->setState("mainmenu"); + } - _input->_inputMode = Input::kInputModeGame; + _input->_inputMode = Input::kInputModeMenu; } + } // namespace Parallaction diff --git a/engines/parallaction/parallaction.h b/engines/parallaction/parallaction.h index 05dddd8ce0..daa14b91ae 100644 --- a/engines/parallaction/parallaction.h +++ b/engines/parallaction/parallaction.h @@ -667,7 +667,7 @@ private: static const char *_partNames[]; - void startGui(); + void startGui(bool showSplash); static const Callable _dosCallables[6]; diff --git a/engines/parallaction/parallaction_br.cpp b/engines/parallaction/parallaction_br.cpp index 68525b2d73..b94e7e5936 100644 --- a/engines/parallaction/parallaction_br.cpp +++ b/engines/parallaction/parallaction_br.cpp @@ -133,17 +133,21 @@ void Parallaction_br::callFunction(uint index, void* parm) { int Parallaction_br::go() { - if (getFeatures() & GF_DEMO) { - startPart(1); - } else { - startGui(); - } + bool splash = true; while ((_engineFlags & kEngineQuit) == 0) { + if (getFeatures() & GF_DEMO) { + startPart(1); + _input->_inputMode = Input::kInputModeGame; + } else { + startGui(splash); + // don't show splash after first time + splash = false; + } + // initCharacter(); - _input->_inputMode = Input::kInputModeGame; while ((_engineFlags & (kEngineReturn | kEngineQuit)) == 0) { runGame(); } @@ -151,7 +155,6 @@ int Parallaction_br::go() { freePart(); // freeCharacter(); - } return 0; |