aboutsummaryrefslogtreecommitdiff
path: root/engines/sci
diff options
context:
space:
mode:
authorColin Snover2017-09-28 14:48:32 -0500
committerColin Snover2017-09-28 14:58:18 -0500
commitf570e4b35190085ed692201ae7325e332f3aacbe (patch)
tree283572cc68f5482dbcd5980f14a1a7798efe7af1 /engines/sci
parent7de9c1682b9d9967bcea6294733c5e7f2fd000ee (diff)
downloadscummvm-rg350-f570e4b35190085ed692201ae7325e332f3aacbe.tar.gz
scummvm-rg350-f570e4b35190085ed692201ae7325e332f3aacbe.tar.bz2
scummvm-rg350-f570e4b35190085ed692201ae7325e332f3aacbe.zip
SCI32: Disable change directory button in original save/load in RAMA
Diffstat (limited to 'engines/sci')
-rw-r--r--engines/sci/engine/script_patches.cpp24
1 files changed, 23 insertions, 1 deletions
diff --git a/engines/sci/engine/script_patches.cpp b/engines/sci/engine/script_patches.cpp
index 60e314d811..8330f0a26c 100644
--- a/engines/sci/engine/script_patches.cpp
+++ b/engines/sci/engine/script_patches.cpp
@@ -144,6 +144,7 @@ static const char *const selectorNameTable[] = {
"saveFilePtr", // RAMA
"priority", // RAMA
"plane", // RAMA
+ "state", // RAMA
#endif
NULL
};
@@ -211,7 +212,8 @@ enum ScriptPatcherSelectors {
SELECTOR_handle,
SELECTOR_saveFilePtr,
SELECTOR_priority,
- SELECTOR_plane
+ SELECTOR_plane,
+ SELECTOR_state
#endif
};
@@ -6394,11 +6396,31 @@ static const uint16 ramaDocReaderInitPatch[] = {
PATCH_END
};
+// It is not possible to change the directory for ScummVM save games, so disable
+// the "change directory" button in the RAMA save dialogue
+static const uint16 ramaChangeDirSignature[] = {
+ SIG_MAGICDWORD,
+ 0x7e, SIG_UINT16(0x64), // line 100
+ 0x39, SIG_SELECTOR8(state), // pushi $1d (state)
+ 0x78, // push1
+ 0x39, 0x03, // pushi 3
+ 0x72, SIG_ADDTOOFFSET(+2), // lofsa changeDirI
+ 0x4a, SIG_UINT16(0x0e), // send 14
+ SIG_END
+};
+
+static const uint16 ramaChangeDirPatch[] = {
+ PATCH_ADDTOOFFSET(+6), // line 100, pushi state, push1
+ 0x39, 0x00, // pushi 0
+ PATCH_END
+};
+
static const SciScriptPatcherEntry ramaSignatures[] = {
{ true, 0, "fix bad text resolution", 1, ramaTextResolutionSignature, ramaTextResolutionPatch },
{ true, 55, "fix bad DocReader::init priority calculation", 1, ramaDocReaderInitSignature, ramaDocReaderInitPatch },
{ true, 85, "fix SaveManager to use normal readWord calls", 1, ramaSerializeRegTSignature1, ramaSerializeRegTPatch1 },
{ true, 64908, "disable video benchmarking", 1, ramaBenchmarkSignature, ramaBenchmarkPatch },
+ { true, 64990, "disable change directory button", 1, ramaChangeDirSignature, ramaChangeDirPatch },
SCI_SIGNATUREENTRY_TERMINATOR
};