[Scummvm-cvs-logs] scummvm master -> 24740b30bd9d6cfd5ce420951a53b87a156ffbbf

dreammaster dreammaster at scummvm.org
Sat Dec 17 03:14:35 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:
24740b30bd TSAGE: Disallow saving and loading via the GMM when a dialog is active


Commit: 24740b30bd9d6cfd5ce420951a53b87a156ffbbf
    https://github.com/scummvm/scummvm/commit/24740b30bd9d6cfd5ce420951a53b87a156ffbbf
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2011-12-16T18:13:44-08:00

Commit Message:
TSAGE: Disallow saving and loading via the GMM when a dialog is active

Changed paths:
    engines/tsage/blue_force/blueforce_logic.cpp
    engines/tsage/ringworld/ringworld_logic.cpp
    engines/tsage/ringworld2/ringworld2_logic.cpp



diff --git a/engines/tsage/blue_force/blueforce_logic.cpp b/engines/tsage/blue_force/blueforce_logic.cpp
index 22299c1..9888f4d 100644
--- a/engines/tsage/blue_force/blueforce_logic.cpp
+++ b/engines/tsage/blue_force/blueforce_logic.cpp
@@ -255,14 +255,16 @@ Scene *BlueForceGame::createScene(int sceneNumber) {
  * Returns true if it is currently okay to restore a game
  */
 bool BlueForceGame::canLoadGameStateCurrently() {
-	return true;
+	// Don't allow a game to be loaded if a dialog is active
+	return g_globals->_gfxManagers.size() == 1;
 }
 
 /**
  * Returns true if it is currently okay to save the game
  */
 bool BlueForceGame::canSaveGameStateCurrently() {
-	return true;
+	// Don't allow a game to be saved if a dialog is active
+	return g_globals->_gfxManagers.size() == 1;
 }
 
 void BlueForceGame::rightClick() {
diff --git a/engines/tsage/ringworld/ringworld_logic.cpp b/engines/tsage/ringworld/ringworld_logic.cpp
index ad67b66..c87b95e 100644
--- a/engines/tsage/ringworld/ringworld_logic.cpp
+++ b/engines/tsage/ringworld/ringworld_logic.cpp
@@ -196,14 +196,17 @@ Scene *RingworldGame::createScene(int sceneNumber) {
  * Returns true if it is currently okay to restore a game
  */
 bool RingworldGame::canLoadGameStateCurrently() {
-	return !g_globals->getFlag(50);
+	// Don't allow a game to be loaded if a dialog is active
+	return !g_globals->getFlag(50) && (g_globals->_gfxManagers.size() == 1);
+
 }
 
 /**
  * Returns true if it is currently okay to save the game
  */
 bool RingworldGame::canSaveGameStateCurrently() {
-	return !g_globals->getFlag(50);
+	// Don't allow a game to be saved if a dialog is active
+	return !g_globals->getFlag(50) && (g_globals->_gfxManagers.size() == 1);
 }
 
 /*--------------------------------------------------------------------------*/
diff --git a/engines/tsage/ringworld2/ringworld2_logic.cpp b/engines/tsage/ringworld2/ringworld2_logic.cpp
index 3854a37..ccedb3a 100644
--- a/engines/tsage/ringworld2/ringworld2_logic.cpp
+++ b/engines/tsage/ringworld2/ringworld2_logic.cpp
@@ -203,14 +203,16 @@ Scene *Ringworld2Game::createScene(int sceneNumber) {
  * Returns true if it is currently okay to restore a game
  */
 bool Ringworld2Game::canLoadGameStateCurrently() {
-	return true;
+	// Don't allow a game to be loaded if a dialog is active
+	return g_globals->_gfxManagers.size() == 1;
 }
 
 /**
  * Returns true if it is currently okay to save the game
  */
 bool Ringworld2Game::canSaveGameStateCurrently() {
-	return true;
+	// Don't allow a game to be saved if a dialog is active
+	return g_globals->_gfxManagers.size() == 1;
 }
 
 /*--------------------------------------------------------------------------*/






More information about the Scummvm-git-logs mailing list