mirror of
https://github.com/libretro/scummvm.git
synced 2025-02-21 19:51:49 +00:00
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
This commit is contained in:
parent
7deef6ad63
commit
2088a77388
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user