aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNicola Mettifogo2008-08-20 04:02:12 +0000
committerNicola Mettifogo2008-08-20 04:02:12 +0000
commit9549cbee7f325ae18b9c6cb965073e931540ff2e (patch)
tree920cb5f107b7d8b94f67a1ba041866b0bc1eafce
parentd5d4500b6450c139c5f219ae2e4cbb892c749bcb (diff)
downloadscummvm-rg350-9549cbee7f325ae18b9c6cb965073e931540ff2e.tar.gz
scummvm-rg350-9549cbee7f325ae18b9c6cb965073e931540ff2e.tar.bz2
scummvm-rg350-9549cbee7f325ae18b9c6cb965073e931540ff2e.zip
Engine now returns to the menu when intro is over.
svn-id: r34047
-rw-r--r--engines/parallaction/gui_br.cpp27
-rw-r--r--engines/parallaction/parallaction.h2
-rw-r--r--engines/parallaction/parallaction_br.cpp17
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;