[Scummvm-git-logs] scummvm master -> 2fd005b001c9b8eb028defb862ef67c6c187ce90
AndywinXp
noreply at scummvm.org
Fri Nov 24 11:47:45 UTC 2023
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:
2fd005b001 SCUMM: MACGUI: Update Loom conditions for disabling menu items
Commit: 2fd005b001c9b8eb028defb862ef67c6c187ce90
https://github.com/scummvm/scummvm/commit/2fd005b001c9b8eb028defb862ef67c6c187ce90
Author: AndywinXp (andywinxp at gmail.com)
Date: 2023-11-24T12:47:39+01:00
Commit Message:
SCUMM: MACGUI: Update Loom conditions for disabling menu items
Changed paths:
engines/scumm/gfx_mac.cpp
diff --git a/engines/scumm/gfx_mac.cpp b/engines/scumm/gfx_mac.cpp
index 8794d944e4c..630b88a00cd 100644
--- a/engines/scumm/gfx_mac.cpp
+++ b/engines/scumm/gfx_mac.cpp
@@ -2679,9 +2679,17 @@ void MacGui::updateWindowManager() {
loadCondition = (_vm->VAR(58) & 0x02) && !(_vm->VAR(94) & 0x10);
} else {
// TODO: Complete LOOM with the rest of the proper code from disasm,
- // for now we only have the copy protection code in place...
- saveCondition = !(_vm->VAR(221) & 0x4000);
- loadCondition = !(_vm->VAR(221) & 0x4000);
+ // for now we only have the copy protection code and a best guess in place...
+ //
+ // Details:
+ // VAR(221) & 0x4000: Copy protection bit (the only thing I could confirm from the disasm)
+ // VAR(VAR_VERB_SCRIPT) == 5: Best guess... it prevents saving/loading from e.g. difficulty selection screen
+ // _userPut > 0: Best guess... it prevents saving/loading during cutscenes
+
+ saveCondition = loadCondition =
+ !(_vm->VAR(221) & 0x4000) &&
+ (_vm->VAR(_vm->VAR_VERB_SCRIPT) == 5) &&
+ (_vm->_userPut > 0);
}
bool canLoad = _vm->canLoadGameStateCurrently() && saveCondition;
More information about the Scummvm-git-logs
mailing list