[Scummvm-cvs-logs] SF.net SVN: scummvm:[49660] scummvm/trunk/engines/sci/engine/kernel32.cpp
thebluegr at users.sourceforge.net
thebluegr at users.sourceforge.net
Mon Jun 14 18:04:29 CEST 2010
Revision: 49660
http://scummvm.svn.sourceforge.net/scummvm/?rev=49660&view=rev
Author: thebluegr
Date: 2010-06-14 16:04:28 +0000 (Mon, 14 Jun 2010)
Log Message:
-----------
Fixed GK1 again, including the inventory screen
Modified Paths:
--------------
scummvm/trunk/engines/sci/engine/kernel32.cpp
Modified: scummvm/trunk/engines/sci/engine/kernel32.cpp
===================================================================
--- scummvm/trunk/engines/sci/engine/kernel32.cpp 2010-06-14 15:49:11 UTC (rev 49659)
+++ scummvm/trunk/engines/sci/engine/kernel32.cpp 2010-06-14 16:04:28 UTC (rev 49660)
@@ -788,16 +788,20 @@
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]),
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
More information about the Scummvm-git-logs
mailing list