aboutsummaryrefslogtreecommitdiff
path: root/engines/sci/graphics
diff options
context:
space:
mode:
authorFilippos Karapetis2013-03-28 20:27:35 +0200
committerFilippos Karapetis2013-03-28 20:28:51 +0200
commit51b1ec3139bf059a2123eecdf7477f3490427445 (patch)
tree272e79a3f5f23c015836bb0643365ea4d7e27371 /engines/sci/graphics
parentb4b56f72d3e6e23356b0997bce3bfef283379595 (diff)
downloadscummvm-rg350-51b1ec3139bf059a2123eecdf7477f3490427445.tar.gz
scummvm-rg350-51b1ec3139bf059a2123eecdf7477f3490427445.tar.bz2
scummvm-rg350-51b1ec3139bf059a2123eecdf7477f3490427445.zip
SCI: Fix drawing in SCI21 hires games without breaking lowres SCI2/SCI21 games
Diffstat (limited to 'engines/sci/graphics')
-rw-r--r--engines/sci/graphics/frameout.cpp23
1 files changed, 9 insertions, 14 deletions
diff --git a/engines/sci/graphics/frameout.cpp b/engines/sci/graphics/frameout.cpp
index e251bd3dc0..5f65762685 100644
--- a/engines/sci/graphics/frameout.cpp
+++ b/engines/sci/graphics/frameout.cpp
@@ -762,14 +762,6 @@ void GfxFrameout::kernelFrameout() {
// Translate back to actual coordinate within scrollable plane
nsRect.translate(it->planeOffsetX, it->planeOffsetY);
- if (view && view->isSci2Hires()) {
- view->adjustBackUpscaledCoordinates(nsRect.top, nsRect.left);
- view->adjustBackUpscaledCoordinates(nsRect.bottom, nsRect.right);
- } else if (getSciVersion() >= SCI_VERSION_2_1) {
- _coordAdjuster->fromDisplayToScript(nsRect.top, nsRect.left);
- _coordAdjuster->fromDisplayToScript(nsRect.bottom, nsRect.right);
- }
-
if (g_sci->getGameId() == GID_PHANTASMAGORIA2) {
// HACK: Some (?) objects in Phantasmagoria 2 have no NS rect. Skip them for now.
// TODO: Remove once we figure out how Phantasmagoria 2 draws objects on screen.
@@ -777,12 +769,15 @@ void GfxFrameout::kernelFrameout() {
continue;
}
- // FIXME: We should not update the object's NS rect here.
- // This breaks the sliders in the control panel screen in
- // QFG4, but disabling it does not change any functionality,
- // as the object(s) will be drawn on screen with the
- // calculated coordinates.
- //g_sci->_gfxCompare->setNSRect(itemEntry->object, nsRect);
+ if (view && view->isSci2Hires()) {
+ view->adjustBackUpscaledCoordinates(nsRect.top, nsRect.left);
+ view->adjustBackUpscaledCoordinates(nsRect.bottom, nsRect.right);
+ g_sci->_gfxCompare->setNSRect(itemEntry->object, nsRect);
+ } else if (getSciVersion() >= SCI_VERSION_2_1 && _resMan->detectHires()) {
+ _coordAdjuster->fromDisplayToScript(nsRect.top, nsRect.left);
+ _coordAdjuster->fromDisplayToScript(nsRect.bottom, nsRect.right);
+ g_sci->_gfxCompare->setNSRect(itemEntry->object, nsRect);
+ }
}
// Don't attempt to draw sprites that are outside the visible