diff options
Diffstat (limited to 'engines/sci/engine')
-rw-r--r-- | engines/sci/engine/kernel.cpp | 4 | ||||
-rw-r--r-- | engines/sci/engine/kernel32.cpp | 14 | ||||
-rw-r--r-- | engines/sci/engine/vm.cpp | 1 |
3 files changed, 11 insertions, 8 deletions
diff --git a/engines/sci/engine/kernel.cpp b/engines/sci/engine/kernel.cpp index 6e5395e995..efb41bcf1d 100644 --- a/engines/sci/engine/kernel.cpp +++ b/engines/sci/engine/kernel.cpp @@ -447,6 +447,7 @@ static const SciKernelMapSubEntry kGraph_subops[] = { // version, subId, function-mapping, signature, workarounds static const SciKernelMapSubEntry kPalVary_subops[] = { + { SIG_SCI21, 0, MAP_CALL(PalVaryInit), "ii(i)(i)(i)", NULL }, { SIG_SCIALL, 0, MAP_CALL(PalVaryInit), "ii(i)(i)", NULL }, { SIG_SCIALL, 1, MAP_CALL(PalVaryReverse), "(i)(i)(i)", NULL }, { SIG_SCIALL, 2, MAP_CALL(PalVaryGetCurrentStep), "", NULL }, @@ -521,7 +522,8 @@ static const SciKernelMapSubEntry kList_subops[] = { // be something like ListAt instead... If we swap the two subops though, // Torin demo crashes complaining that it tried to send to a non-object, // therefore the semantics might be different here (signature was l[o0]) - { SIG_SCI21, 18, MAP_CALL(StubNull), "li", NULL }, + // In SQ6 object is passed right when skipping the intro + { SIG_SCI21, 18, MAP_CALL(StubNull), "l[io]", NULL }, { SIG_SCI21, 19, MAP_CALL(ListEachElementDo), "li(.*)", NULL }, { SIG_SCI21, 20, MAP_CALL(ListFirstTrue), "li(.*)", NULL }, { SIG_SCI21, 21, MAP_CALL(ListAllTrue), "li(.*)", NULL }, diff --git a/engines/sci/engine/kernel32.cpp b/engines/sci/engine/kernel32.cpp index f484a8bc45..c0e6a56b5e 100644 --- a/engines/sci/engine/kernel32.cpp +++ b/engines/sci/engine/kernel32.cpp @@ -861,8 +861,8 @@ reg_t kIsOnMe(EngineState *s, int argc, reg_t *argv) { // Get the object's plane reg_t planeObject = readSelector(s->_segMan, targetObject, SELECTOR(plane)); if (!planeObject.isNull()) { - uint16 itemX = readSelectorValue(s->_segMan, targetObject, SELECTOR(x)); - uint16 itemY = readSelectorValue(s->_segMan, targetObject, SELECTOR(y)); + //uint16 itemX = readSelectorValue(s->_segMan, targetObject, SELECTOR(x)); + //uint16 itemY = readSelectorValue(s->_segMan, targetObject, SELECTOR(y)); uint16 planeResY = readSelectorValue(s->_segMan, planeObject, SELECTOR(resY)); uint16 planeResX = readSelectorValue(s->_segMan, planeObject, SELECTOR(resX)); uint16 planeTop = readSelectorValue(s->_segMan, planeObject, SELECTOR(top)); @@ -872,12 +872,12 @@ reg_t kIsOnMe(EngineState *s, int argc, reg_t *argv) { // Adjust the bounding rectangle of the object by the object's // actual X, Y coordinates - itemY = ((itemY * g_sci->_gfxScreen->getHeight()) / planeResY); - itemX = ((itemX * g_sci->_gfxScreen->getWidth()) / planeResX); - itemY += planeTop; - itemX += planeLeft; + nsRect.top = ((nsRect.top * g_sci->_gfxScreen->getHeight()) / planeResY); + nsRect.left = ((nsRect.left * g_sci->_gfxScreen->getWidth()) / planeResX); + nsRect.bottom = ((nsRect.bottom * g_sci->_gfxScreen->getHeight()) / planeResY); + nsRect.right = ((nsRect.right * g_sci->_gfxScreen->getWidth()) / planeResX); - nsRect.translate(itemX, itemY); + nsRect.translate(planeLeft, planeTop); } //warning("kIsOnMe: (%d, %d) on object %04x:%04x, parameter %d", argv[0].toUint16(), argv[1].toUint16(), PRINT_REG(argv[2]), argv[3].toUint16()); diff --git a/engines/sci/engine/vm.cpp b/engines/sci/engine/vm.cpp index e1352477a0..338f530827 100644 --- a/engines/sci/engine/vm.cpp +++ b/engines/sci/engine/vm.cpp @@ -426,6 +426,7 @@ static const SciWorkaroundEntry uninitializedReadWorkarounds[] = { { GID_SQ4, -1, 928, 0, "Narrator", "startText", -1, 1000, { FAKE, 1 } }, // sq4cd: method returns this to the caller { GID_SQ6, 100, 0, 0, "SQ6", "init", -1, 2, { FAKE, 0 } }, // called when the game starts { GID_SQ6, 100, 64950, 0, "View", "handleEvent", -1, 0, { FAKE, 0 } }, // called when pressing "Start game" in the main menu + { GID_SQ6, -1, 64964, 0, "DPath", "init", -1, 1, { FAKE, 0 } }, // during the game SCI_WORKAROUNDENTRY_TERMINATOR }; |