CGE: Better fix for restoring savegames when a cut-scene is active

This commit is contained in:
Paul Gilbert 2011-11-27 22:16:52 +11:00
parent 7d9caea68a
commit 37756c9ffe
4 changed files with 7 additions and 2 deletions

View File

@ -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() {

View File

@ -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) {

View File

@ -375,6 +375,10 @@ bool CommandHandler::idle() {
return (_head == _tail);
}
void CommandHandler::reset() {
_tail = _head;
}
/**
* Handles mini-Games logic
* @param com Command

View File

@ -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;