[Scummvm-cvs-logs] scummvm master -> 37756c9ffeabcf2dfc91b2dce36dc928d580ce3d
dreammaster
dreammaster at scummvm.org
Sun Nov 27 12:17:41 CET 2011
This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .
Summary:
37756c9ffe CGE: Better fix for restoring savegames when a cut-scene is active
Commit: 37756c9ffeabcf2dfc91b2dce36dc928d580ce3d
https://github.com/scummvm/scummvm/commit/37756c9ffeabcf2dfc91b2dce36dc928d580ce3d
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2011-11-27T03:16:52-08:00
Commit Message:
CGE: Better fix for restoring savegames when a cut-scene is active
Changed paths:
engines/cge/cge.cpp
engines/cge/cge_main.cpp
engines/cge/snail.cpp
engines/cge/snail.h
diff --git a/engines/cge/cge.cpp b/engines/cge/cge.cpp
index 8e74253..87654c5 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 e583140..01bd037 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 5ab8f63..9db5406 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 6749d6b..6a9e717 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;
More information about the Scummvm-git-logs
mailing list