diff options
author | Paul Gilbert | 2011-11-27 22:16:52 +1100 |
---|---|---|
committer | Paul Gilbert | 2011-11-27 22:16:52 +1100 |
commit | 37756c9ffeabcf2dfc91b2dce36dc928d580ce3d (patch) | |
tree | ec5543ba8aba57917177240252b1107b7eee25d6 | |
parent | 7d9caea68a28b44daee784849138dcbb195cff41 (diff) | |
download | scummvm-rg350-37756c9ffeabcf2dfc91b2dce36dc928d580ce3d.tar.gz scummvm-rg350-37756c9ffeabcf2dfc91b2dce36dc928d580ce3d.tar.bz2 scummvm-rg350-37756c9ffeabcf2dfc91b2dce36dc928d580ce3d.zip |
CGE: Better fix for restoring savegames when a cut-scene is active
-rw-r--r-- | engines/cge/cge.cpp | 3 | ||||
-rw-r--r-- | engines/cge/cge_main.cpp | 1 | ||||
-rw-r--r-- | engines/cge/snail.cpp | 4 | ||||
-rw-r--r-- | engines/cge/snail.h | 1 |
4 files changed, 7 insertions, 2 deletions
diff --git a/engines/cge/cge.cpp b/engines/cge/cge.cpp index 8e74253f86..87654c53f4 100644 --- a/engines/cge/cge.cpp +++ b/engines/cge/cge.cpp @@ -208,8 +208,7 @@ bool CGEEngine::hasFeature(EngineFeature f) const { } bool CGEEngine::canLoadGameStateCurrently() { - return (_startupMode == 0) && _mouse->_active && - _commandHandler->idle() && !_hero->_flags._hide; + return (_startupMode == 0) && _mouse->_active; } bool CGEEngine::canSaveGameStateCurrently() { diff --git a/engines/cge/cge_main.cpp b/engines/cge/cge_main.cpp index e5831400ee..01bd037315 100644 --- a/engines/cge/cge_main.cpp +++ b/engines/cge/cge_main.cpp @@ -292,6 +292,7 @@ Common::Error CGEEngine::loadGameState(int slot) { void CGEEngine::resetGame() { _vga->_spareQ->clear(); + _commandHandler->reset(); } Common::Error CGEEngine::saveGameState(int slot, const Common::String &desc) { diff --git a/engines/cge/snail.cpp b/engines/cge/snail.cpp index 5ab8f6314b..9db5406c25 100644 --- a/engines/cge/snail.cpp +++ b/engines/cge/snail.cpp @@ -375,6 +375,10 @@ bool CommandHandler::idle() { return (_head == _tail); } +void CommandHandler::reset() { + _tail = _head; +} + /** * Handles mini-Games logic * @param com Command diff --git a/engines/cge/snail.h b/engines/cge/snail.h index 6749d6bcc8..6a9e717441 100644 --- a/engines/cge/snail.h +++ b/engines/cge/snail.h @@ -70,6 +70,7 @@ public: void addCallback(CommandType com, int ref, int val, CallbackType cbType); void insertCommand(CommandType com, int ref, int val, void *ptr); bool idle(); + void reset(); private: CGEEngine *_vm; bool _turbo; |