SCI32: Clean-up pass on Phant1 script patches

* Convert selector literals to SIG_SELECTOR/PATCH_SELECTOR
* Make identifier suffixes, patch descriptions, and patch table
  ordering consistent
This commit is contained in:
Colin Snover 2017-09-16 01:38:21 -05:00
parent bfb87389f7
commit 6fc09ae7c9

View file

@ -135,7 +135,7 @@ static const char *const selectorNameTable[] = {
"font", // KQ7 "font", // KQ7
"setScale", // LSL6hires "setScale", // LSL6hires
"setScaler", // LSL6hires "setScaler", // LSL6hires
"readWord", // LSL7 "readWord", // LSL7, Phant1
#endif #endif
NULL NULL
}; };
@ -3564,10 +3564,10 @@ static const SciScriptPatcherEntry mothergooseHiresSignatures[] = {
// game volumes through the launcher, so stop the game from overwriting the // game volumes through the launcher, so stop the game from overwriting the
// ScummVM volumes with volumes from save games. // ScummVM volumes with volumes from save games.
// Applies to at least: English CD // Applies to at least: English CD
static const uint16 phant1SignatureSavedVolume[] = { static const uint16 phant1SavedVolumeSignature[] = {
0x7a, // push2 0x7a, // push2
0x39, 0x08, // pushi 8 0x39, 0x08, // pushi 8
0x38, SIG_UINT16(0x20b), // push $20b (readWord) 0x38, SIG_SELECTOR16(readWord), // push $20b (readWord)
0x76, // push0 0x76, // push0
0x72, SIG_UINT16(0x13c), // lofsa $13c (PREF.DAT) 0x72, SIG_UINT16(0x13c), // lofsa $13c (PREF.DAT)
0x4a, SIG_UINT16(0x04), // send 4 0x4a, SIG_UINT16(0x04), // send 4
@ -3577,7 +3577,7 @@ static const uint16 phant1SignatureSavedVolume[] = {
0x43, 0x76, SIG_UINT16(0x04), // callk DoAudio[76], 4 0x43, 0x76, SIG_UINT16(0x04), // callk DoAudio[76], 4
0x7a, // push2 0x7a, // push2
0x76, // push0 0x76, // push0
0x38, SIG_UINT16(0x20b), // push $20b (readWord) 0x38, SIG_SELECTOR16(readWord), // push $20b (readWord)
0x76, // push0 0x76, // push0
0x72, SIG_UINT16(0x13c), // lofsa $13c (PREF.DAT) 0x72, SIG_UINT16(0x13c), // lofsa $13c (PREF.DAT)
0x4a, SIG_UINT16(0x04), // send 4 0x4a, SIG_UINT16(0x04), // send 4
@ -3587,7 +3587,7 @@ static const uint16 phant1SignatureSavedVolume[] = {
SIG_END SIG_END
}; };
static const uint16 phant1PatchSavedVolume[] = { static const uint16 phant1SavedVolumePatch[] = {
0x32, PATCH_UINT16(36), // jmp [to prefFile::close] 0x32, PATCH_UINT16(36), // jmp [to prefFile::close]
PATCH_END PATCH_END
}; };
@ -3611,7 +3611,7 @@ static const uint16 phant1RatSignature[] = {
SIG_MAGICDWORD, SIG_MAGICDWORD,
0x78, // push1 0x78, // push1
0x39, 0x1a, // pushi $1a 0x39, 0x1a, // pushi $1a
0x45, 0x03, SIG_UINT16(0x02), // callb 03, 0002 0x45, 0x03, SIG_UINT16(0x02), // callb 3, 2
0x18, // not 0x18, // not
0x31, 0x18, // bnt $18 0x31, 0x18, // bnt $18
SIG_END SIG_END
@ -3624,9 +3624,9 @@ static const uint16 phant1RatPatch[] = {
// script, description, signature patch // script, description, signature patch
static const SciScriptPatcherEntry phantasmagoriaSignatures[] = { static const SciScriptPatcherEntry phantasmagoriaSignatures[] = {
{ true, 901, "invalid array construction", 1, sci21IntArraySignature, sci21IntArrayPatch }, { true, 901, "fix invalid array construction", 1, sci21IntArraySignature, sci21IntArrayPatch },
{ true, 1111, "ignore audio settings from save game", 1, phant1SavedVolumeSignature, phant1SavedVolumePatch },
{ true, 20200, "fix broken rat init in sEnterFromAlcove", 1, phant1RatSignature, phant1RatPatch }, { true, 20200, "fix broken rat init in sEnterFromAlcove", 1, phant1RatSignature, phant1RatPatch },
{ true, 1111, "ignore audio settings from save game", 1, phant1SignatureSavedVolume, phant1PatchSavedVolume },
{ true, 64908, "disable video benchmarking", 1, sci2BenchmarkSignature, sci2BenchmarkPatch }, { true, 64908, "disable video benchmarking", 1, sci2BenchmarkSignature, sci2BenchmarkPatch },
SCI_SIGNATUREENTRY_TERMINATOR SCI_SIGNATUREENTRY_TERMINATOR
}; };