diff options
| author | md5 | 2011-05-13 00:10:44 +0300 | 
|---|---|---|
| committer | md5 | 2011-05-13 16:33:27 +0300 | 
| commit | 40b63320e5898f4634a794ea35005b77591ca420 (patch) | |
| tree | 1119aa3b0171e50d9a983157ec7190cf436b7107 /engines/sci | |
| parent | d352c5969a2cb51fb9c786a5570727b2f6764d6b (diff) | |
| download | scummvm-rg350-40b63320e5898f4634a794ea35005b77591ca420.tar.gz scummvm-rg350-40b63320e5898f4634a794ea35005b77591ca420.tar.bz2 scummvm-rg350-40b63320e5898f4634a794ea35005b77591ca420.zip  | |
SCI: Added workarounds for bug #3292251, instead of patching the script
This fixes bug #3295853
Diffstat (limited to 'engines/sci')
| -rw-r--r-- | engines/sci/engine/script_patches.cpp | 41 | ||||
| -rw-r--r-- | engines/sci/engine/workarounds.cpp | 4 | 
2 files changed, 3 insertions, 42 deletions
diff --git a/engines/sci/engine/script_patches.cpp b/engines/sci/engine/script_patches.cpp index 82e8130a40..2e4eb552f2 100644 --- a/engines/sci/engine/script_patches.cpp +++ b/engines/sci/engine/script_patches.cpp @@ -875,50 +875,9 @@ const uint16 qfg3PatchDialogCrash[] = {  	PATCH_END  }; -// Part of script 47 that handles the barter icon checks for the wrong local. -// The local is supposed to contain the value returned by a previous kDisplay -// call, but since the wrong one is checked, it contains junk instead. We -// remove that check here (this doesn't affect the game at all). This occurs -// when attempting to purchase something from a vendor and the barter button is -// available (e.g. when buying the robe or meat from the associated vendors). -// Fixes bug #3292251. -const byte qfg3BarterCrash[] = { -	22, -	0x83, 0x10,        // lal 10   ---> BUG! Wrong local -	0x30, 0x11, 0x00,  // bnt 0011 ---> the accumulator will now contain garbage, so this check fails -	0x35, 0x00,        // ldi 00 -	0xa5, 0x00,        // sat 00 -	0x39, 0x03,        // pushi 03 -	0x5b, 0x04, 0x00,  // lea 04 00 -	0x36,              // push -	0x39, 0x6c,        // pushi 6c -	0x8b, 0x10,        // lsl 10   ---> local 10 contains garbage, so the call below will fail -	0x43, 0x1b, 0x06   // callk Display[1b] 06 -}; - -// Same as above, but for local 0x11 -const byte qfg3BarterCrash2[] = { -	18, -	0x83, 0x11,        // lal 11   ---> BUG! Wrong local -	0x30, 0x0d, 0x00,  // bnt 000d ---> the accumulator will now contain garbage, so this check fails -	0x39, 0x03,        // pushi 03 -	0x5b, 0x04, 0x00,  // lea 04 00 -	0x36,              // push -	0x39, 0x6c,        // pushi 6c -	0x8b, 0x11,        // lsl 11   ---> local 11 contains garbage, so the call below will fail -	0x43, 0x1b, 0x06   // callk Display[1b] 06 -}; - -const uint16 qfg3PatchBarterCrash[] = { -	0x35, 0x00,       // ldi 00    ---> the accumulator will always be zero, so the problematic code won't run -	PATCH_END -}; -  //    script, description,                                      magic DWORD,                                  adjust  const SciScriptSignature qfg3Signatures[] = {  	{     23, "dialog crash",                                   1, PATCH_MAGICDWORD(0xe7, 0x03, 0x22, 0x33),  -1,           qfg3DialogCrash,          qfg3PatchDialogCrash }, -	{     47, "barter crash",                                   1, PATCH_MAGICDWORD(0x83, 0x10, 0x30, 0x11),   0,           qfg3BarterCrash,          qfg3PatchBarterCrash }, -	{     47, "barter crash 2",                                 1, PATCH_MAGICDWORD(0x83, 0x11, 0x30, 0x0d),   0,          qfg3BarterCrash2,          qfg3PatchBarterCrash },  	{    944, "import dialog continuous calls",                 1, PATCH_MAGICDWORD(0x2a, 0x31, 0x0b, 0x7a),  -1, qfg3SignatureImportDialog,         qfg3PatchImportDialog },  	SCI_SIGNATUREENTRY_TERMINATOR  }; diff --git a/engines/sci/engine/workarounds.cpp b/engines/sci/engine/workarounds.cpp index 20d6cd0dd0..e8eb78f292 100644 --- a/engines/sci/engine/workarounds.cpp +++ b/engines/sci/engine/workarounds.cpp @@ -213,6 +213,8 @@ const SciWorkaroundEntry kDisplay_workarounds[] = {  	{ GID_PQ2,            23,    23,  0,         "rm23Script", "elements",    0x4ae,    0, { WORKAROUND_IGNORE,    0 } }, // when looking at the 2nd page of pate's file - 0x75 as id  	{ GID_PQ2,            23,    23,  0,         "rm23Script", "elements",    0x4c1,    0, { WORKAROUND_IGNORE,    0 } }, // when looking at the 2nd page of pate's file - 0x75 as id (another pq2 version, bug #3043904)  	{ GID_QFG1,           11,    11,  0,             "battle", "<noname90>",     -1,    0, { WORKAROUND_IGNORE,    0 } }, // DEMO: When entering battle, 0x75 as id +	{ GID_QFG3,           -1,    47,  0,          "barterWin", "open",       0x1426,    0, { WORKAROUND_IGNORE,    0 } }, // sometimes when talking with a vendor that can be bartered with, the wrong local variable is checked and the variable contents are wrong - bug #3292251 +	{ GID_QFG3,           -1,    47,  0,         "barterIcon", "show",       0x135c,    0, { WORKAROUND_IGNORE,    0 } }, // sometimes when talking with a vendor that can be bartered with, the wrong local variable is checked and the variable contents are wrong - bug #3292251  	{ GID_SQ1,            -1,   700,  0,       "arcadaRegion", "doit",           -1,    0, { WORKAROUND_IGNORE,    0 } }, // restoring in some rooms of the arcada (right at the start)  	{ GID_SQ4,           397,     0,  0,                   "", "export 12",      -1,    0, { WORKAROUND_IGNORE,    0 } }, // FLOPPY: when going into the computer store (bug #3044044)  	{ GID_SQ4,           391,   391,  0,          "doCatalog", "mode",         0x84,    0, { WORKAROUND_IGNORE,    0 } }, // CD: clicking on catalog in roboter sale - a parameter is an object @@ -230,7 +232,7 @@ const SciWorkaroundEntry kDirLoop_workarounds[] = {  const SciWorkaroundEntry kDisposeScript_workarounds[] = {  	{ GID_LAURABOW,      777,   777,  0,             "myStab", "changeState",    -1,    0, { WORKAROUND_IGNORE,    0 } }, // DEMO: after the will is signed, parameter 0 is an object - bug #3034907  	{ GID_QFG1,           -1,    64,  0,               "rm64", "dispose",        -1,    0, { WORKAROUND_IGNORE,    0 } }, // when leaving graveyard, parameter 0 is an object -	{ GID_SQ4,           150,   151,  0,        "fightScript", "dispose",        -1,    0, { WORKAROUND_IGNORE,    0 } }, // during fight with vohaul, parameter 0 is an object +	{ GID_SQ4,           150,   151,  0,        "fightScript", "dispose",        -1,    0, { WORKAROUND_IGNORE,    0 } }, // during fight with Vohaul, parameter 0 is an object  	{ GID_SQ4,           150,   152,  0,       "driveCloseUp", "dispose",        -1,    0, { WORKAROUND_IGNORE,    0 } }, // when choosing "beam download", parameter 0 is an object  	SCI_WORKAROUNDENTRY_TERMINATOR  };  | 
