aboutsummaryrefslogtreecommitdiff
path: root/engines/sci/engine/kernel32.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'engines/sci/engine/kernel32.cpp')
-rw-r--r--engines/sci/engine/kernel32.cpp14
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());