[Scummvm-cvs-logs] scummvm master -> 11e40f74676cce3e1bf2049e3be6b6e70b8c9cee

dreammaster dreammaster at scummvm.org
Sat May 18 03:32:23 CEST 2013


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:
11e40f7467 HOPKINS: Fix to prevent GMM saving in the underwater sub scenes


Commit: 11e40f74676cce3e1bf2049e3be6b6e70b8c9cee
    https://github.com/scummvm/scummvm/commit/11e40f74676cce3e1bf2049e3be6b6e70b8c9cee
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2013-05-17T18:31:12-07:00

Commit Message:
HOPKINS: Fix to prevent GMM saving in the underwater sub scenes

Changed paths:
    engines/hopkins/hopkins.cpp
    engines/hopkins/hopkins.h



diff --git a/engines/hopkins/hopkins.cpp b/engines/hopkins/hopkins.cpp
index 0d40f69..2997320 100644
--- a/engines/hopkins/hopkins.cpp
+++ b/engines/hopkins/hopkins.cpp
@@ -88,14 +88,15 @@ Common::String HopkinsEngine::generateSaveName(int slot) {
  * Returns true if it is currently okay to restore a game
  */
 bool HopkinsEngine::canLoadGameStateCurrently() {
-	return !_globals->_exitId && !_globals->_cityMapEnabledFl && _events->_mouseFl;
+	return !_globals->_exitId && !_globals->_cityMapEnabledFl && _events->_mouseFl && _globals->_curRoomNum != 0;
 }
 
 /**
  * Returns true if it is currently okay to save the game
  */
 bool HopkinsEngine::canSaveGameStateCurrently() {
-	return !_globals->_exitId && !_globals->_cityMapEnabledFl && _events->_mouseFl;
+	return !_globals->_exitId && !_globals->_cityMapEnabledFl && _events->_mouseFl 
+		&& _globals->_curRoomNum != 0 && !isUnderwaterSubScene();
 }
 
 /**
@@ -2882,4 +2883,8 @@ bool HopkinsEngine::displayAdultDisclaimer() {
 	}
 }
 
+bool HopkinsEngine::isUnderwaterSubScene() {
+	return (_globals->_curRoomNum >= 77) && (_globals->_curRoomNum <= 89);
+}
+
 } // End of namespace Hopkins
diff --git a/engines/hopkins/hopkins.h b/engines/hopkins/hopkins.h
index 86f15cc..777fd1c 100644
--- a/engines/hopkins/hopkins.h
+++ b/engines/hopkins/hopkins.h
@@ -97,6 +97,7 @@ private:
 	void playUnderwaterBaseCutscene();
 	void playPlaneCutscene();
 	void playEnding();
+	bool isUnderwaterSubScene();
 
 	/**
 	 * Displays the map screen in the underground base.






More information about the Scummvm-git-logs mailing list