diff options
author | Martin Kiewitz | 2010-07-20 21:22:39 +0000 |
---|---|---|
committer | Martin Kiewitz | 2010-07-20 21:22:39 +0000 |
commit | 2a47f573ddad57655556ccc9b91753987aedb681 (patch) | |
tree | 5439a502bfdfabbbc674a9423526c9aa84524f3f /engines/sci/engine/kernel32.cpp | |
parent | 8e24b7930cd306d84288a3d085dfc99d6fb19f4e (diff) | |
download | scummvm-rg350-2a47f573ddad57655556ccc9b91753987aedb681.tar.gz scummvm-rg350-2a47f573ddad57655556ccc9b91753987aedb681.tar.bz2 scummvm-rg350-2a47f573ddad57655556ccc9b91753987aedb681.zip |
SCI: some sci32 fixes
kOnMe, kLocal2Global, kGlobal2Local now hires capable, hotspots seem to work in lsl6 and sq6, although pressing on start in sq6 doesn't work yet, you need to click on the rightmost/bottom area
svn-id: r51074
Diffstat (limited to 'engines/sci/engine/kernel32.cpp')
-rw-r--r-- | engines/sci/engine/kernel32.cpp | 14 |
1 files changed, 7 insertions, 7 deletions
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()); |