[Scummvm-cvs-logs] scummvm master -> 09a48a08789502a619e3512135fd29729319932f

dreammaster dreammaster at scummvm.org
Tue Nov 8 10:37:48 CET 2011


This automated email contains information about 2 new commits which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .

Summary:
b1c10ef2f0 CGE: Don't allow saving game during cut-scenes
09a48a0878 CGE: Bugfixes for the save/load game keys


Commit: b1c10ef2f05bbad9c907c4a4f8d120ca84734642
    https://github.com/scummvm/scummvm/commit/b1c10ef2f05bbad9c907c4a4f8d120ca84734642
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2011-11-08T01:32:41-08:00

Commit Message:
CGE: Don't allow saving game during cut-scenes

Changed paths:
    engines/cge/cge.cpp



diff --git a/engines/cge/cge.cpp b/engines/cge/cge.cpp
index 4ed2932..74a855f 100644
--- a/engines/cge/cge.cpp
+++ b/engines/cge/cge.cpp
@@ -214,7 +214,8 @@ bool CGEEngine::canLoadGameStateCurrently() {
 }
 
 bool CGEEngine::canSaveGameStateCurrently() {
-	return (_startupMode == 0) && _mouse->_active;
+	return (_startupMode == 0) && _mouse->_active &&
+				_commandHandler->idle() && !_hero->_flags._hide;
 }
 
 } // End of namespace CGE


Commit: 09a48a08789502a619e3512135fd29729319932f
    https://github.com/scummvm/scummvm/commit/09a48a08789502a619e3512135fd29729319932f
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2011-11-08T01:37:14-08:00

Commit Message:
CGE: Bugfixes for the save/load game keys

Changed paths:
    engines/cge/events.cpp



diff --git a/engines/cge/events.cpp b/engines/cge/events.cpp
index cc22d90..2c134ba 100644
--- a/engines/cge/events.cpp
+++ b/engines/cge/events.cpp
@@ -113,7 +113,6 @@ bool Keyboard::getKey(Common::Event &event, int &cgeCode) {
 		return true;
 	}
 	if (keycode == Common::KEYCODE_F5) {
-		warning("keycode %d", event.kbd.ascii);
 		if (_vm->canSaveGameStateCurrently()) {
 			const EnginePlugin *plugin = NULL;
 			EngineMan.findGame(_vm->_gameDescription->gameid, &plugin);
@@ -123,7 +122,9 @@ bool Keyboard::getKey(Common::Event &event, int &cgeCode) {
 			int16 savegameId = dialog->runModalWithPluginAndTarget(plugin, ConfMan.getActiveDomainName());
 			Common::String savegameDescription = dialog->getResultString();
 			delete dialog;
-			_vm->saveGameState(savegameId, savegameDescription);
+
+			if (savegameId != -1)
+				_vm->saveGameState(savegameId, savegameDescription);
 		}
 		return false;
 	} else if (keycode == Common::KEYCODE_F7) {
@@ -135,7 +136,9 @@ bool Keyboard::getKey(Common::Event &event, int &cgeCode) {
 			dialog->setSaveMode(false);
 			int16 savegameId = dialog->runModalWithPluginAndTarget(plugin, ConfMan.getActiveDomainName());
 			delete dialog;
-			_vm->loadGameState(savegameId);
+
+			if (savegameId != -1)
+				_vm->loadGameState(savegameId);
 		}
 		return false;
 	}






More information about the Scummvm-git-logs mailing list