diff options
author | eriktorbjorn | 2011-02-14 20:27:54 +0100 |
---|---|---|
committer | eriktorbjorn | 2011-02-14 20:44:18 +0100 |
commit | 7ecab9a982e68e6f500b8c056987acafb1ae1552 (patch) | |
tree | c848acd8e762792be96ce28c4d4ee4e31f7199ab | |
parent | 0da6b15539c4dbb1371cd18ae77b90688ef3f764 (diff) | |
download | scummvm-rg350-7ecab9a982e68e6f500b8c056987acafb1ae1552.tar.gz scummvm-rg350-7ecab9a982e68e6f500b8c056987acafb1ae1552.tar.bz2 scummvm-rg350-7ecab9a982e68e6f500b8c056987acafb1ae1552.zip |
TOON: Disable quick save/load from the main menu screen.
Saving is pointless and loading doesn't work right. Unless it's
really easy, making quick load work from the main menu is hardly
worth it, since it has a perfectly usable load button already.
-rw-r--r-- | engines/toon/state.cpp | 1 | ||||
-rw-r--r-- | engines/toon/state.h | 1 | ||||
-rw-r--r-- | engines/toon/toon.cpp | 10 |
3 files changed, 9 insertions, 3 deletions
diff --git a/engines/toon/state.cpp b/engines/toon/state.cpp index 71674688d5..abd8a409a6 100644 --- a/engines/toon/state.cpp +++ b/engines/toon/state.cpp @@ -80,6 +80,7 @@ State::State(void) { _showConversationIcons = false; + _inMenu = false; _inCloseUp = false; _inConversation = false; diff --git a/engines/toon/state.h b/engines/toon/state.h index 283e378443..d31ff4f3c2 100644 --- a/engines/toon/state.h +++ b/engines/toon/state.h @@ -62,6 +62,7 @@ public: int16 _confiscatedInventory[35]; int32 _numInventoryItems; int32 _numConfiscatedInventoryItems; + bool _inMenu; bool _inCloseUp; bool _inCutaway; bool _inConversation; diff --git a/engines/toon/toon.cpp b/engines/toon/toon.cpp index 79e153a7db..d2b98c2ed0 100644 --- a/engines/toon/toon.cpp +++ b/engines/toon/toon.cpp @@ -185,7 +185,7 @@ void ToonEngine::parseInput() { bool hasModifier = event.kbd.hasFlags(Common::KBD_ALT|Common::KBD_CTRL|Common::KBD_SHIFT); switch (event.type) { - case Common::EVENT_KEYUP: + case Common::EVENT_KEYDOWN: if ((event.kbd.ascii == 27 || event.kbd.ascii == 32) && !hasModifier) { _audioManager->stopCurrentVoice(); } @@ -588,6 +588,8 @@ bool ToonEngine::showMainmenu(bool &loadedGame) { AudioStreamInstance *mainmenuMusic = NULL; bool musicPlaying = false; + _gameState->_inMenu = true; + while (!doExit) { clickingOn = MAINMENUHOTSPOT_NONE; clickRelease = false; @@ -700,6 +702,8 @@ bool ToonEngine::showMainmenu(bool &loadedGame) { } } + _gameState->_inMenu = false; + //delete mainmenuMusic; for (int entryNr = 0; entryNr < MAINMENU_ENTRYCOUNT; entryNr++) delete entries[entryNr].animation; @@ -2956,11 +2960,11 @@ void ToonEngine::pauseEngineIntern(bool pause) { } bool ToonEngine::canSaveGameStateCurrently() { - return !_gameState->_inInventory && !_gameState->_inConversation && !_gameState->_inCutaway && !_gameState->_mouseHidden && !_moviePlayer->isPlaying(); + return !_gameState->_inMenu && !_gameState->_inInventory && !_gameState->_inConversation && !_gameState->_inCutaway && !_gameState->_mouseHidden && !_moviePlayer->isPlaying(); } bool ToonEngine::canLoadGameStateCurrently() { - return !_gameState->_inInventory && !_gameState->_inConversation && !_gameState->_inCutaway && !_gameState->_mouseHidden && !_moviePlayer->isPlaying(); + return !_gameState->_inMenu && !_gameState->_inInventory && !_gameState->_inConversation && !_gameState->_inCutaway && !_gameState->_mouseHidden && !_moviePlayer->isPlaying(); } Common::String ToonEngine::getSavegameName(int nr) { |