diff options
| author | Martin Kiewitz | 2010-08-09 18:42:07 +0000 | 
|---|---|---|
| committer | Martin Kiewitz | 2010-08-09 18:42:07 +0000 | 
| commit | d88928b1be8b59d16d402585aaa78c117ac2db36 (patch) | |
| tree | 04ad2653e5b92b4bb3af7a1aa59fdebf2c8e8b5c /engines/sci/engine | |
| parent | 33b9705af0f767e47693bac225e54834b6bcb5bd (diff) | |
| download | scummvm-rg350-d88928b1be8b59d16d402585aaa78c117ac2db36.tar.gz scummvm-rg350-d88928b1be8b59d16d402585aaa78c117ac2db36.tar.bz2 scummvm-rg350-d88928b1be8b59d16d402585aaa78c117ac2db36.zip  | |
SCI: adding script patches for gk1
day6 issue in police department
svn-id: r51942
Diffstat (limited to 'engines/sci/engine')
| -rw-r--r-- | engines/sci/engine/script_patches.cpp | 54 | 
1 files changed, 54 insertions, 0 deletions
diff --git a/engines/sci/engine/script_patches.cpp b/engines/sci/engine/script_patches.cpp index 611b833ee4..e5fcbf72c2 100644 --- a/engines/sci/engine/script_patches.cpp +++ b/engines/sci/engine/script_patches.cpp @@ -52,6 +52,58 @@ struct SciScriptSignature {  //  - rinse and repeat +// daySixBeignet::changeState is called when the cop goes out and sets cycles to 220. +//  this is not enough time to get to the door, so we patch that to 23 seconds +const byte gk1SignatureDay6PoliceBeignet[] = { +	4, +	0x35, 0x04,        // ldi 04 +	0x1a,              // eq? +	0x30,              // bnt [next state check] +	+2, 5,             // [skip 2 bytes, offset of bnt] +	0x38, 0x93, 0x00,  // pushi 93 (selector dispose) +	0x76,              // push0 +	0x72,              // lofsa deskSarg +	+2, 9,             // [skip 2 bytes, offset of lofsa] +	0x4a, 0x04, 0x00,  // send 04 +	0x34, 0xdc, 0x00,  // ldi 220 +	0x65, 0x1a,        // aTop cycles +	0x32,              // jmp [end] +	0 +}; + +const uint16 gk1PatchDay6PoliceBeignet[] = { +	PATCH_ADDTOOFFSET | +16, +	0x34, 0x17, 0x00,  // ldi 23 +	0x65, 0x1c,        // aTop seconds +	PATCH_END +}; + +const byte gk1SignatureDay6PoliceSleep[] = { +	4, +	0x35, 0x08,        // ldi 08 +	0x1a,              // eq? +	0x31,              // bnt [next state check] +	+1, 5,             // [skip 1 byte, offset of bnt] +	0x34, 0xdc, 0x00,  // ldi 220 +	0x65, 0x1a,        // aTop cycles +	0x32,              // jmp [end] +	0 +}; + +const uint16 gk1PatchDay6PoliceSleep[] = { +	PATCH_ADDTOOFFSET | +5, +	0x34, 0x2a, 0x00,  // ldi 42 +	0x65, 0x1c,        // aTop seconds +	PATCH_END +}; + +//    script, description,                                   magic DWORD,                                 adjust +const SciScriptSignature gk1Signatures[] = { +    {    230, "day 6 police beignet timer issue",            PATCH_MAGICDWORD(0x34, 0xdc, 0x00, 0x65),   -16, gk1SignatureDay6PoliceBeignet, gk1PatchDay6PoliceBeignet }, +    {    230, "day 6 police sleep timer issue",              PATCH_MAGICDWORD(0x34, 0xdc, 0x00, 0x65),    -5, gk1SignatureDay6PoliceSleep, gk1PatchDay6PoliceSleep }, +    {      0, NULL,                                          0,                                            0, NULL,                          NULL } +}; +  // this here gets called on entry and when going out of game windows  //  uEvt::port will not get changed after kDisposeWindow but a bit later, so  //  we would get an invalid port handle to a kSetPort call. We just patch in @@ -273,6 +325,8 @@ int32 Script::findSignature(const SciScriptSignature *signature, const byte *scr  void Script::matchSignatureAndPatch(uint16 scriptNr, byte *scriptData, const uint32 scriptSize) {  	const SciScriptSignature *signatureTable = NULL; +	if (g_sci->getGameId() == GID_GK1) +		signatureTable = gk1Signatures;  // hoyle4 now works due workaround inside GfxPorts  //	if (g_sci->getGameId() == GID_HOYLE4)  //		signatureTable = hoyle4Signatures;  | 
