diff options
author | Tobias Gunkel | 2012-01-18 00:04:03 +0100 |
---|---|---|
committer | Tobias Gunkel | 2012-02-11 08:28:56 +0100 |
commit | 6d4b710c541a2e7706cb80c8737e6f8caa487277 (patch) | |
tree | 8d3e799fd74ba119ac561e43da134a3a2b7b24b1 /engines | |
parent | 0bae642453caeef9c6af9c49f043f46eebd0f787 (diff) | |
download | scummvm-rg350-6d4b710c541a2e7706cb80c8737e6f8caa487277.tar.gz scummvm-rg350-6d4b710c541a2e7706cb80c8737e6f8caa487277.tar.bz2 scummvm-rg350-6d4b710c541a2e7706cb80c8737e6f8caa487277.zip |
SCUMM: fix opcode walkToObject in v0
Before Michael did not develop the film correctly
Diffstat (limited to 'engines')
-rw-r--r-- | engines/scumm/script_v0.cpp | 23 | ||||
-rw-r--r-- | engines/scumm/scumm_v0.h | 1 |
2 files changed, 20 insertions, 4 deletions
diff --git a/engines/scumm/script_v0.cpp b/engines/scumm/script_v0.cpp index e2ec40ef52..3b81a913b3 100644 --- a/engines/scumm/script_v0.cpp +++ b/engines/scumm/script_v0.cpp @@ -101,7 +101,7 @@ void ScummEngine_v0::setupOpcodes() { /* 34 */ OPCODE(0x34, o5_getDist); OPCODE(0x35, o_stopCurrentScript); - OPCODE(0x36, o2_walkActorToObject); + OPCODE(0x36, o_walkActorToObject); OPCODE(0x37, o2_clearState04); /* 38 */ OPCODE(0x38, o2_isLessEqual); @@ -181,7 +181,7 @@ void ScummEngine_v0::setupOpcodes() { /* 74 */ OPCODE(0x74, o5_getDist); OPCODE(0x75, o_printEgo_c64); - OPCODE(0x76, o2_walkActorToObject); + OPCODE(0x76, o_walkActorToObject); OPCODE(0x77, o2_clearState04); /* 78 */ OPCODE(0x78, o2_isGreater); @@ -261,7 +261,7 @@ void ScummEngine_v0::setupOpcodes() { /* B4 */ OPCODE(0xb4, o5_getDist); OPCODE(0xb5, o_stopCurrentScript); - OPCODE(0xb6, o2_walkActorToObject); + OPCODE(0xb6, o_walkActorToObject); OPCODE(0xb7, o2_setState04); /* B8 */ OPCODE(0xb8, o2_isLessEqual); @@ -341,7 +341,7 @@ void ScummEngine_v0::setupOpcodes() { /* F4 */ OPCODE(0xf4, o5_getDist); OPCODE(0xf5, o_stopCurrentScript); - OPCODE(0xf6, o2_walkActorToObject); + OPCODE(0xf6, o_walkActorToObject); OPCODE(0xf7, o2_setState04); /* F8 */ OPCODE(0xf8, o2_isGreater); @@ -498,6 +498,21 @@ void ScummEngine_v0::o_stopCurrentScript() { stopScriptCommon(0); } +void ScummEngine_v0::o_walkActorToObject() { + int actor = getVarOrDirectByte(PARAM_1); + int objId = fetchScriptByte(); + int obj; + + if (_opcode & 0x40) + obj = OBJECT_V0(objId, kObjectV0TypeBG); + else + obj = OBJECT_V0(objId, kObjectV0TypeFG); + + if (whereIsObject(obj) != WIO_NOT_FOUND) { + walkActorToObject(actor, obj); + } +} + void ScummEngine_v0::o_loadSound() { int resid = fetchScriptByte(); ensureResourceLoaded(rtSound, resid); diff --git a/engines/scumm/scumm_v0.h b/engines/scumm/scumm_v0.h index b6f9027dfa..d70d893f09 100644 --- a/engines/scumm/scumm_v0.h +++ b/engines/scumm/scumm_v0.h @@ -106,6 +106,7 @@ protected: /* Version C64 script opcodes */ void o_stopCurrentScript(); + void o_walkActorToObject(); void o_loadSound(); void o_getActorMoving(); void o_animateActor(); |