diff options
author | Filippos Karapetis | 2010-06-14 16:04:28 +0000 |
---|---|---|
committer | Filippos Karapetis | 2010-06-14 16:04:28 +0000 |
commit | b04269e7e4ebaf36e654f0604602dd64dee48211 (patch) | |
tree | 770c1c83a6fdd2d42fbb4c346a71b0ca7141824f /engines/sci/engine/kernel32.cpp | |
parent | 95f55f3b05f2bb3074afba81ee1e1b2c02735203 (diff) | |
download | scummvm-rg350-b04269e7e4ebaf36e654f0604602dd64dee48211.tar.gz scummvm-rg350-b04269e7e4ebaf36e654f0604602dd64dee48211.tar.bz2 scummvm-rg350-b04269e7e4ebaf36e654f0604602dd64dee48211.zip |
Fixed GK1 again, including the inventory screen
svn-id: r49660
Diffstat (limited to 'engines/sci/engine/kernel32.cpp')
-rw-r--r-- | engines/sci/engine/kernel32.cpp | 18 |
1 files changed, 11 insertions, 7 deletions
diff --git a/engines/sci/engine/kernel32.cpp b/engines/sci/engine/kernel32.cpp index 139d4188a0..2b00daf34a 100644 --- a/engines/sci/engine/kernel32.cpp +++ b/engines/sci/engine/kernel32.cpp @@ -788,16 +788,20 @@ reg_t kOnMe(EngineState *s, int argc, reg_t *argv) { Common::Rect nsRect; // Get the bounding rectangle of the object - nsRect.left = readSelectorValue(s->_segMan, targetObject, SELECTOR(x)); - nsRect.top = readSelectorValue(s->_segMan, targetObject, SELECTOR(y)); - // If these are 0, read them from nsLeft, nsTop. This is madness... - if (nsRect.left == 0 && nsRect.top == 0) { - nsRect.left = readSelectorValue(s->_segMan, targetObject, SELECTOR(nsLeft)); - nsRect.top = readSelectorValue(s->_segMan, targetObject, SELECTOR(nsTop)); - } + nsRect.left = readSelectorValue(s->_segMan, targetObject, SELECTOR(nsLeft)); + nsRect.top = readSelectorValue(s->_segMan, targetObject, SELECTOR(nsTop)); nsRect.right = readSelectorValue(s->_segMan, targetObject, SELECTOR(nsRight)); nsRect.bottom = readSelectorValue(s->_segMan, targetObject, SELECTOR(nsBottom)); + uint16 itemX = readSelectorValue(s->_segMan, targetObject, SELECTOR(x)); + uint16 itemY = readSelectorValue(s->_segMan, targetObject, SELECTOR(y)); + if (nsRect.left == itemY && nsRect.top == itemX) { + // FIXME: Why is this happening?? + // Swap the values, as they're inversed(eh???) + nsRect.left = itemX; + nsRect.top = itemY; + } + /* warning("kOnMe: (%d, %d) on object %04x:%04x (%s), rect (%d, %d, %d, %d), parameter %d", argv[0].toUint16(), argv[1].toUint16(), PRINT_REG(argv[2]), s->_segMan->getObjectName(argv[2]), |