[Scummvm-cvs-logs] scummvm master -> 50747429cdd7746202902254a84742f771da4cb9
clone2727
clone2727 at gmail.com
Sun Sep 23 02:50:18 CEST 2012
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:
50747429cd PEGASUS: Don't allow loading/saving in a few more places
Commit: 50747429cdd7746202902254a84742f771da4cb9
https://github.com/scummvm/scummvm/commit/50747429cdd7746202902254a84742f771da4cb9
Author: Matthew Hoops (clone2727 at gmail.com)
Date: 2012-09-22T17:43:34-07:00
Commit Message:
PEGASUS: Don't allow loading/saving in a few more places
Only affects loading/saving from the GMM
Changed paths:
engines/pegasus/pegasus.cpp
engines/pegasus/pegasus.h
diff --git a/engines/pegasus/pegasus.cpp b/engines/pegasus/pegasus.cpp
index 4402eb4..4b1d7d7 100644
--- a/engines/pegasus/pegasus.cpp
+++ b/engines/pegasus/pegasus.cpp
@@ -193,6 +193,14 @@ Common::Error PegasusEngine::run() {
return Common::kNoError;
}
+bool PegasusEngine::canLoadGameStateCurrently() {
+ return _loadAllowed && !isDemo();
+}
+
+bool PegasusEngine::canSaveGameStateCurrently() {
+ return _saveAllowed && !isDemo() && g_neighborhood;
+}
+
bool PegasusEngine::detectOpeningClosingDirectory() {
// We need to detect what our Opening/Closing directory is listed as
// On the original disc, it was 'Opening/Closing' but only HFS(+) supports the slash
@@ -1442,6 +1450,7 @@ void PegasusEngine::performJump(NeighborhoodID neighborhoodID) {
// Sub chase is special
if (neighborhoodID == kNoradSubChaseID) {
throwAwayEverything();
+ _loadAllowed = false;
doSubChase();
if (shouldQuit())
@@ -1450,6 +1459,7 @@ void PegasusEngine::performJump(NeighborhoodID neighborhoodID) {
neighborhoodID = kNoradDeltaID;
GameState.setNextRoom(kNorad41);
GameState.setNextDirection(kEast);
+ _loadAllowed = true;
}
Neighborhood *neighborhood;
diff --git a/engines/pegasus/pegasus.h b/engines/pegasus/pegasus.h
index 661f8e0..d197e9b 100644
--- a/engines/pegasus/pegasus.h
+++ b/engines/pegasus/pegasus.h
@@ -78,8 +78,8 @@ public:
const PegasusGameDescription *_gameDescription;
bool hasFeature(EngineFeature f) const;
GUI::Debugger *getDebugger();
- bool canLoadGameStateCurrently() { return _loadAllowed && !isDemo(); }
- bool canSaveGameStateCurrently() { return _saveAllowed && !isDemo(); }
+ bool canLoadGameStateCurrently();
+ bool canSaveGameStateCurrently();
Common::Error loadGameState(int slot);
Common::Error saveGameState(int slot, const Common::String &desc);
More information about the Scummvm-git-logs
mailing list