aboutsummaryrefslogtreecommitdiff
path: root/engines/sci
diff options
context:
space:
mode:
authorFilippos Karapetis2013-07-30 04:21:51 +0300
committerFilippos Karapetis2013-07-30 04:21:51 +0300
commit2088a77388f82489295d53bf1cc3b33d17f9dbd5 (patch)
tree6201231c39d1aef1590dade5aa00d5ddf885a380 /engines/sci
parent7deef6ad63d8ded5ff301b0bc13af0fb90493180 (diff)
downloadscummvm-rg350-2088a77388f82489295d53bf1cc3b33d17f9dbd5.tar.gz
scummvm-rg350-2088a77388f82489295d53bf1cc3b33d17f9dbd5.tar.bz2
scummvm-rg350-2088a77388f82489295d53bf1cc3b33d17f9dbd5.zip
SCI: Add a hack to fix the inventory in GK1
For some reason, the top left nsRect coordinates get swapped in the GK1 inventory screen, investigate why
Diffstat (limited to 'engines/sci')
-rw-r--r--engines/sci/graphics/frameout.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/engines/sci/graphics/frameout.cpp b/engines/sci/graphics/frameout.cpp
index bb960c8501..ca1ef357ae 100644
--- a/engines/sci/graphics/frameout.cpp
+++ b/engines/sci/graphics/frameout.cpp
@@ -779,6 +779,14 @@ void GfxFrameout::kernelFrameout() {
_coordAdjuster->fromDisplayToScript(nsRect.bottom, nsRect.right);
g_sci->_gfxCompare->setNSRect(itemEntry->object, nsRect);
}
+
+ // TODO: For some reason, the top left nsRect coordinates get
+ // swapped in the GK1 inventory screen, investigate why.
+ // HACK: Fix the coordinates by explicitly setting them here.
+ Common::Rect objNSRect = g_sci->_gfxCompare->getNSRect(itemEntry->object);
+ if (objNSRect.top == nsRect.left && objNSRect.left == nsRect.top && nsRect.top != 0 && nsRect.left != 0) {
+ g_sci->_gfxCompare->setNSRect(itemEntry->object, nsRect);
+ }
}
// Don't attempt to draw sprites that are outside the visible