[Scummvm-cvs-logs] scummvm master -> 26aca5ac43bc6b3ec142751aab5bffef4d75a078

dreammaster dreammaster at scummvm.org
Tue May 10 14:39:50 CEST 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:
26aca5ac43 TSAGE: Standardised on checks for showing the Save and Restore dialogs


Commit: 26aca5ac43bc6b3ec142751aab5bffef4d75a078
    https://github.com/scummvm/scummvm/commit/26aca5ac43bc6b3ec142751aab5bffef4d75a078
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2011-05-10T05:38:05-07:00

Commit Message:
TSAGE: Standardised on checks for showing the Save and Restore dialogs

Changed paths:
    engines/tsage/ringworld_logic.cpp
    engines/tsage/tsage.cpp



diff --git a/engines/tsage/ringworld_logic.cpp b/engines/tsage/ringworld_logic.cpp
index 4321c53..d334e0c 100644
--- a/engines/tsage/ringworld_logic.cpp
+++ b/engines/tsage/ringworld_logic.cpp
@@ -1288,7 +1288,7 @@ void RingworldGame::restartGame() {
 }
 
 void RingworldGame::saveGame() {
-	if (_globals->getFlag(50))
+	if (!_vm->canSaveGameStateCurrently())
 		MessageDialog::show(SAVING_NOT_ALLOWED_MSG, OK_BTN_STRING);
 	else {
 		// Show the save dialog
@@ -1297,7 +1297,7 @@ void RingworldGame::saveGame() {
 }
 
 void RingworldGame::restoreGame() {
-	if (_globals->getFlag(50))
+	if (!_vm->canLoadGameStateCurrently())
 		MessageDialog::show(RESTORING_NOT_ALLOWED_MSG, OK_BTN_STRING);
 	else {
 		// Show the load dialog
diff --git a/engines/tsage/tsage.cpp b/engines/tsage/tsage.cpp
index d6f07c9..8813fc7 100644
--- a/engines/tsage/tsage.cpp
+++ b/engines/tsage/tsage.cpp
@@ -101,14 +101,14 @@ Common::Error TSageEngine::run() {
  * Returns true if it is currently okay to restore a game
  */
 bool TSageEngine::canLoadGameStateCurrently() {
-	return (_globals->getFlag(50) == 0) && _globals->_player._uiEnabled;
+	return (_globals->getFlag(50) == 0);
 }
 
 /**
  * Returns true if it is currently okay to save the game
  */
 bool TSageEngine::canSaveGameStateCurrently() {
-	return (_globals->getFlag(50) == 0) && _globals->_player._uiEnabled;
+	return (_globals->getFlag(50) == 0);
 }
 
 /**






More information about the Scummvm-git-logs mailing list