diff options
author | Gregory Montoir | 2007-08-06 20:24:05 +0000 |
---|---|---|
committer | Gregory Montoir | 2007-08-06 20:24:05 +0000 |
commit | e5e353d89c243623d4f0fa71c60b6f35e28a9b73 (patch) | |
tree | 8c8206774f17e60cbf0a22ef9dc0d2411d956694 /engines/touche | |
parent | 16f161f68995a7179c373df046c86a72274460c1 (diff) | |
download | scummvm-rg350-e5e353d89c243623d4f0fa71c60b6f35e28a9b73.tar.gz scummvm-rg350-e5e353d89c243623d4f0fa71c60b6f35e28a9b73.tar.bz2 scummvm-rg350-e5e353d89c243623d4f0fa71c60b6f35e28a9b73.zip |
fixed loading of savestates on startup
svn-id: r28476
Diffstat (limited to 'engines/touche')
-rw-r--r-- | engines/touche/touche.cpp | 22 |
1 files changed, 13 insertions, 9 deletions
diff --git a/engines/touche/touche.cpp b/engines/touche/touche.cpp index c67b1e9be3..f3d1f33dfd 100644 --- a/engines/touche/touche.cpp +++ b/engines/touche/touche.cpp @@ -148,10 +148,7 @@ void ToucheEngine::restart() { _waitingSetKeyCharNum3 = -1; _currentEpisodeNum = 0; - _newEpisodeNum = ConfMan.getInt("boot_param"); - if (_newEpisodeNum == 0) { - _newEpisodeNum = kStartupEpisode; - } + _newEpisodeNum = kStartupEpisode; _newMusicNum = 0; _currentMusicNum = 0; @@ -252,15 +249,22 @@ void ToucheEngine::mainLoop() { readConfigurationSettings(); + _inp_leftMouseButtonPressed = false; + _inp_rightMouseButtonPressed = false; + if (ConfMan.hasKey("save_slot")) { loadGameState(ConfMan.getInt("save_slot")); - _newEpisodeNum = _currentEpisodeNum; + _newEpisodeNum = 0; + resetSortedKeyCharsTable(); + showCursor(true); + } else { + _newEpisodeNum = ConfMan.getInt("boot_param"); + if (_newEpisodeNum == 0) { + _newEpisodeNum = kStartupEpisode; + } + showCursor(_newEpisodeNum != kStartupEpisode); } - _inp_leftMouseButtonPressed = false; - _inp_rightMouseButtonPressed = false; - showCursor(_newEpisodeNum != kStartupEpisode); - uint32 frameTimeStamp = _system->getMillis(); for (uint32 cycleCounter = 0; _flagsTable[611] == 0; ++cycleCounter) { if ((cycleCounter % 3) == 0) { |