aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--engines/pegasus/pegasus.cpp10
-rw-r--r--engines/pegasus/pegasus.h4
2 files changed, 12 insertions, 2 deletions
diff --git a/engines/pegasus/pegasus.cpp b/engines/pegasus/pegasus.cpp
index 4402eb412f..4b1d7d73ae 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 661f8e0f9d..d197e9b988 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);