diff options
| -rw-r--r-- | engines/sci/engine/vm.cpp | 2 | ||||
| -rw-r--r-- | engines/sci/engine/workarounds.cpp | 7 | ||||
| -rw-r--r-- | engines/sci/engine/workarounds.h | 1 | 
3 files changed, 9 insertions, 1 deletions
| diff --git a/engines/sci/engine/vm.cpp b/engines/sci/engine/vm.cpp index c6e8b3e2dd..7f6d6cfd82 100644 --- a/engines/sci/engine/vm.cpp +++ b/engines/sci/engine/vm.cpp @@ -1063,7 +1063,7 @@ void run_vm(EngineState *s) {  			if (validate_signedInteger(s->r_acc, value1) && validate_signedInteger(r_temp, value2))  				s->r_acc = make_reg(0, value1 * value2);  			else -				s->r_acc = arithmetic_lookForWorkaround(opcode, NULL, s->r_acc, r_temp); +				s->r_acc = arithmetic_lookForWorkaround(opcode, opcodeMulWorkarounds, s->r_acc, r_temp);  			break;  		} diff --git a/engines/sci/engine/workarounds.cpp b/engines/sci/engine/workarounds.cpp index 9f3509be1d..49349f7083 100644 --- a/engines/sci/engine/workarounds.cpp +++ b/engines/sci/engine/workarounds.cpp @@ -53,6 +53,12 @@ const SciWorkaroundEntry opcodeGeWorkarounds[] = {  };  //    gameID,           room,script,lvl,          object-name, method-name,    call,index,             workaround +const SciWorkaroundEntry opcodeMulWorkarounds[] = { +	{ GID_FANMADE,        516,  983,  0,             "Wander", "setTarget",      -1,    0, { WORKAROUND_FAKE,   0 } }, // The Legend of the Lost Jewel Demo (fan made): called with object as second parameter when attacked by insects - bug #3038913 +	SCI_WORKAROUNDENTRY_TERMINATOR +}; + +//    gameID,           room,script,lvl,          object-name, method-name,    call,index,             workaround  const SciWorkaroundEntry opcodeOrWorkarounds[] = {  	{ GID_ECOQUEST2,      100,    0,  0,               "Rain", "points",      0xcc6,    0, { WORKAROUND_FAKE,   0 } }, // when giving the papers to the customs officer, gets called against a pointer instead of a number - bug #3034464  	SCI_WORKAROUNDENTRY_TERMINATOR @@ -202,6 +208,7 @@ const SciWorkaroundEntry kDoSoundFade_workarounds[] = {  //    gameID,           room,script,lvl,          object-name, method-name,    call,index,                workaround  const SciWorkaroundEntry kGetAngle_workarounds[] = { +	{ GID_FANMADE,       516,   992,  0,             "Motion", "init",           -1,    0, { WORKAROUND_IGNORE,    0 } }, // The Legend of the Lost Jewel Demo (fan made): called with third/fourth parameters as objects  	{ GID_KQ6,           740,   752,  0,        "throwDazzle", "changeState",    -1,    0, { WORKAROUND_STILLCALL, 0 } }, // after the Genie is exposed in the Palace (short and long ending), it starts shooting lightning bolts around. An extra 5th parameter is passed - bug #3034610  	SCI_WORKAROUNDENTRY_TERMINATOR  }; diff --git a/engines/sci/engine/workarounds.h b/engines/sci/engine/workarounds.h index b2852db150..8a3edb6246 100644 --- a/engines/sci/engine/workarounds.h +++ b/engines/sci/engine/workarounds.h @@ -71,6 +71,7 @@ struct SciWorkaroundEntry {  extern const SciWorkaroundEntry opcodeDivWorkarounds[];  extern const SciWorkaroundEntry opcodeDptoaWorkarounds[];  extern const SciWorkaroundEntry opcodeGeWorkarounds[]; +extern const SciWorkaroundEntry opcodeMulWorkarounds[];  extern const SciWorkaroundEntry opcodeOrWorkarounds[];  extern const SciWorkaroundEntry uninitializedReadWorkarounds[];  extern const SciWorkaroundEntry kAbs_workarounds[]; | 
