aboutsummaryrefslogtreecommitdiff
path: root/engines/hopkins
diff options
context:
space:
mode:
authorPaul Gilbert2013-05-18 11:31:12 +1000
committerPaul Gilbert2013-05-18 11:31:12 +1000
commit11e40f74676cce3e1bf2049e3be6b6e70b8c9cee (patch)
treeef37fbf992ea0fb3b64fb3939a719255b8538046 /engines/hopkins
parentdd97907fb0dc0b1f496c35def31e9a5910f2b793 (diff)
downloadscummvm-rg350-11e40f74676cce3e1bf2049e3be6b6e70b8c9cee.tar.gz
scummvm-rg350-11e40f74676cce3e1bf2049e3be6b6e70b8c9cee.tar.bz2
scummvm-rg350-11e40f74676cce3e1bf2049e3be6b6e70b8c9cee.zip
HOPKINS: Fix to prevent GMM saving in the underwater sub scenes
Diffstat (limited to 'engines/hopkins')
-rw-r--r--engines/hopkins/hopkins.cpp9
-rw-r--r--engines/hopkins/hopkins.h1
2 files changed, 8 insertions, 2 deletions
diff --git a/engines/hopkins/hopkins.cpp b/engines/hopkins/hopkins.cpp
index 0d40f69e8f..2997320ba4 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 86f15cc7cb..777fd1c335 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.