diff options
author | Paul Gilbert | 2013-10-10 22:49:14 -0400 |
---|---|---|
committer | Paul Gilbert | 2013-10-10 22:49:14 -0400 |
commit | 22af86340e8462ab8cca73f502684852a9166cfb (patch) | |
tree | ccb770d4f1af948b4d6c6359f202d4722f134dbf /engines/tsage/ringworld2 | |
parent | e7df8b60e15b4106a54eaff138316b6568d56517 (diff) | |
download | scummvm-rg350-22af86340e8462ab8cca73f502684852a9166cfb.tar.gz scummvm-rg350-22af86340e8462ab8cca73f502684852a9166cfb.tar.bz2 scummvm-rg350-22af86340e8462ab8cca73f502684852a9166cfb.zip |
TSAGE: Cleaner implementation of saving disable code
Diffstat (limited to 'engines/tsage/ringworld2')
-rw-r--r-- | engines/tsage/ringworld2/ringworld2_logic.cpp | 9 | ||||
-rw-r--r-- | engines/tsage/ringworld2/ringworld2_logic.h | 1 |
2 files changed, 7 insertions, 3 deletions
diff --git a/engines/tsage/ringworld2/ringworld2_logic.cpp b/engines/tsage/ringworld2/ringworld2_logic.cpp index fc06b204cd..bd908504ad 100644 --- a/engines/tsage/ringworld2/ringworld2_logic.cpp +++ b/engines/tsage/ringworld2/ringworld2_logic.cpp @@ -321,9 +321,11 @@ bool Ringworld2Game::canLoadGameStateCurrently() { * Returns true if it is currently okay to save the game */ bool Ringworld2Game::canSaveGameStateCurrently() { - // Don't allow a game to be saved if a dialog is active or if an animation - // is playing - return g_globals->_gfxManagers.size() == 1 && R2_GLOBALS._animationCtr == 0; + // Don't allow a game to be saved if a dialog is active, or if an animation + // is playing, or if an active scene prevents it + return g_globals->_gfxManagers.size() == 1 && R2_GLOBALS._animationCtr == 0 && + (!R2_GLOBALS._sceneManager._scene || + !((SceneExt *)R2_GLOBALS._sceneManager._scene)->_preventSaving); } /*--------------------------------------------------------------------------*/ @@ -338,6 +340,7 @@ SceneExt::SceneExt(): Scene() { _savedPlayerEnabled = false; _savedUiEnabled = false; _savedCanWalk = false; + _preventSaving = false; // WORKAROUND: In the original, playing animations don't reset the global _animationCtr // counter as scene changes unless the playing animation explicitly finishes. For now, diff --git a/engines/tsage/ringworld2/ringworld2_logic.h b/engines/tsage/ringworld2/ringworld2_logic.h index aeac2fdd6a..5c8af8d884 100644 --- a/engines/tsage/ringworld2/ringworld2_logic.h +++ b/engines/tsage/ringworld2/ringworld2_logic.h @@ -85,6 +85,7 @@ public: bool _savedPlayerEnabled; bool _savedUiEnabled; bool _savedCanWalk; + bool _preventSaving; Visage _cursorVisage; SynchronizedList<EventHandler *> _sceneAreas; |