diff options
author | Colin Snover | 2016-06-27 20:48:01 -0500 |
---|---|---|
committer | Colin Snover | 2016-06-30 14:04:56 -0500 |
commit | 29f7a66af40acdc348e28d5c681f43e1f33bf4de (patch) | |
tree | 284a871ed8648de96075aa2723b39eb65bb7c960 /engines/sci/graphics/screen_item32.cpp | |
parent | d2f598cea677fc03b5987fb9f9d9ac41faa96ded (diff) | |
download | scummvm-rg350-29f7a66af40acdc348e28d5c681f43e1f33bf4de.tar.gz scummvm-rg350-29f7a66af40acdc348e28d5c681f43e1f33bf4de.tar.bz2 scummvm-rg350-29f7a66af40acdc348e28d5c681f43e1f33bf4de.zip |
SCI32: Add low resolution constants
In a few places in the graphics system, fixed low-resolution values
are used instead of the game script resolution.
Diffstat (limited to 'engines/sci/graphics/screen_item32.cpp')
-rw-r--r-- | engines/sci/graphics/screen_item32.cpp | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/engines/sci/graphics/screen_item32.cpp b/engines/sci/graphics/screen_item32.cpp index c0b3240c7e..d2673d40b3 100644 --- a/engines/sci/graphics/screen_item32.cpp +++ b/engines/sci/graphics/screen_item32.cpp @@ -273,7 +273,9 @@ void ScreenItem::calcRects(const Plane &plane) { // Cel may use a coordinate system that is not the same size as the // script coordinate system (usually this means high-resolution // pictures with low-resolution scripts) - if (celObj._scaledWidth != scriptWidth || celObj._scaledHeight != scriptHeight) { + if (celObj._scaledWidth != kLowResX || celObj._scaledHeight != kLowResY) { + // high resolution coordinates + if (_useInsetRect) { const Ratio scriptToCelX(celObj._scaledWidth, scriptWidth); const Ratio scriptToCelY(celObj._scaledHeight, scriptHeight); @@ -345,6 +347,8 @@ void ScreenItem::calcRects(const Plane &plane) { _ratioX = scaleX * celToScreenX; _ratioY = scaleY * celToScreenY; } else { + // low resolution coordinates + int displaceX = celObj._displace.x; if (_mirrorX != celObj._mirrorX && _celInfo.type != kCelTypePic) { displaceX = celObj._width - celObj._displace.x - 1; @@ -582,7 +586,9 @@ Common::Rect ScreenItem::getNowSeenRect(const Plane &plane) const { displaceX = celObj._width - displaceX - 1; } - if (celObj._scaledWidth != scriptWidth || celObj._scaledHeight != scriptHeight) { + if (celObj._scaledWidth != kLowResX || celObj._scaledHeight != kLowResY) { + // high resolution coordinates + if (_useInsetRect) { Ratio scriptToCelX(celObj._scaledWidth, scriptWidth); Ratio scriptToCelY(celObj._scaledHeight, scriptHeight); @@ -616,6 +622,8 @@ Common::Rect ScreenItem::getNowSeenRect(const Plane &plane) const { mulinc(nsRect, celToScriptX, celToScriptY); nsRect.translate(_position.x - displaceX, _position.y - displaceY); } else { + // low resolution coordinates + if (!scaleX.isOne() || !scaleY.isOne()) { mulinc(nsRect, scaleX, scaleY); // TODO: This was in the original code, baked into the |