[Scummvm-git-logs] scummvm master -> 1dcf364a004befc4e459d17de965ffc9daf135b9
scott-t
s at sthomas.id.au
Thu Sep 16 11:56:51 UTC 2021
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:
1dcf364a00 GROOVIE: Prevent direct save when there is no active game in progress
Commit: 1dcf364a004befc4e459d17de965ffc9daf135b9
https://github.com/scummvm/scummvm/commit/1dcf364a004befc4e459d17de965ffc9daf135b9
Author: Scott Thomas (s at sthomas.id.au)
Date: 2021-09-16T21:26:48+09:30
Commit Message:
GROOVIE: Prevent direct save when there is no active game in progress
Prevents autosaves creating an invalid save state in the initial game menu
Changed paths:
engines/groovie/script.cpp
diff --git a/engines/groovie/script.cpp b/engines/groovie/script.cpp
index 451e1db3fa..e56932385f 100644
--- a/engines/groovie/script.cpp
+++ b/engines/groovie/script.cpp
@@ -499,8 +499,21 @@ bool Script::preview_loadgame(uint slot) { // used by Clandestiny for the photos
}
bool Script::canDirectSave() const {
- // Disallow when running a subscript
- return _savedCode == nullptr;
+ // Disallow when running a subscript (puzzle)
+ if (_savedCode == nullptr) {
+ // UHP appears not to use "room" variables(?)
+ // 11H uses room plus 'scene' variable. 8D is set to 1 at launch, but scene is left '0' until first nav
+ // T7G and Clan only use room vars
+ // TLC uses room variables to indicate question progress
+ if (_version == kGroovieUHP)
+ return true;
+ else if (_version == kGroovieT11H)
+ return _variables[0x8C] != 0 || _variables[0x8D] != 1 || _variables[0x8E] != 0;
+ else
+ return _variables[0x8C] != 0 || _variables[0x8D] != 0;
+ }
+
+ return false;
}
void Script::directGameSave(int slot, const Common::String &desc) {
More information about the Scummvm-git-logs
mailing list