diff options
| author | Colin Snover | 2016-10-01 14:05:31 -0500 | 
|---|---|---|
| committer | Colin Snover | 2016-10-01 14:07:26 -0500 | 
| commit | 7d77a712d384e050a3b5a6eadc95af794a7e43a0 (patch) | |
| tree | a4908a2fb35cc43ae667fb4d69efbd9ccbce6cdd | |
| parent | 50753f292a1af45b05871962168a1503e5e03ab7 (diff) | |
| download | scummvm-rg350-7d77a712d384e050a3b5a6eadc95af794a7e43a0.tar.gz scummvm-rg350-7d77a712d384e050a3b5a6eadc95af794a7e43a0.tar.bz2 scummvm-rg350-7d77a712d384e050a3b5a6eadc95af794a7e43a0.zip | |
SCI32: Fix interrogation screen crash in GK1
| -rw-r--r-- | engines/sci/engine/script_patches.cpp | 24 | 
1 files changed, 24 insertions, 0 deletions
| diff --git a/engines/sci/engine/script_patches.cpp b/engines/sci/engine/script_patches.cpp index c7f2e08bc8..e643a0480d 100644 --- a/engines/sci/engine/script_patches.cpp +++ b/engines/sci/engine/script_patches.cpp @@ -995,8 +995,32 @@ static const uint16 gk1PatchDay10GabrielDressUp[] = {  	PATCH_END  }; +// GK1 initializes the global interrogation array with an int16 array, which +// happens to work in SSCI because object references are int16s, but in ScummVM +// object references are reg_ts, so this array needs to be created as an IDArray +// instead +static const uint16 gk1SignatureInterrogationArray1[] = { +	0x38, SIG_SELECTOR16(new), // pushi new +	0x78,                      // push1 +	SIG_MAGICDWORD, +	0x39, 0x0f,                // pushi 15 +	0x51, 0x0a,                // class IntArray +	SIG_END +}; + +static const uint16 gk1PatchInterrogationArray1[] = { +	PATCH_ADDTOOFFSET(+3),  // pushi new +	PATCH_ADDTOOFFSET(+1),  // push1 +	PATCH_ADDTOOFFSET(+2),  // pushi 15 +	0x51, 0x0b,             // class IDArray +	PATCH_END +}; +  //          script, description,                                      signature                         patch  static const SciScriptPatcherEntry gk1Signatures[] = { +	{  true,    10, "fix interrogation array type 1/3",            1, gk1SignatureInterrogationArray1,  gk1PatchInterrogationArray1 }, +	{  true,    50, "fix interrogation array type 2/3",            1, gk1SignatureInterrogationArray1,  gk1PatchInterrogationArray1 }, +	{  true,    93, "fix interrogation array type 3/3",            1, gk1SignatureInterrogationArray1,  gk1PatchInterrogationArray1 },  	{  true,    51, "interrogation bug",                           1, gk1SignatureInterrogationBug,     gk1PatchInterrogationBug },  	{  true,   212, "day 5 drum book dialogue error",              1, gk1SignatureDay5DrumBookDialogue, gk1PatchDay5DrumBookDialogue },  	{  true,   212, "day 5 phone freeze",                          1, gk1SignatureDay5PhoneFreeze,      gk1PatchDay5PhoneFreeze }, | 
