aboutsummaryrefslogtreecommitdiff
path: root/engines/sci/graphics/text32.h
diff options
context:
space:
mode:
authorColin Snover2017-10-06 22:05:57 -0500
committerColin Snover2017-10-06 22:56:26 -0500
commitc7c5f28bdb2f393c1290bcac803cf9fc86ac8ed8 (patch)
treea58ee49fcb2271f8c399220d2946b47b648c7b4a /engines/sci/graphics/text32.h
parentd53e7787391683830f57c77cc8acd87c50444d40 (diff)
downloadscummvm-rg350-c7c5f28bdb2f393c1290bcac803cf9fc86ac8ed8.tar.gz
scummvm-rg350-c7c5f28bdb2f393c1290bcac803cf9fc86ac8ed8.tar.bz2
scummvm-rg350-c7c5f28bdb2f393c1290bcac803cf9fc86ac8ed8.zip
SCI32: Clean up scriptWidth/scriptHeight/screenWidth/screenHeight
This removes the unnecessary Buffer subclass and stops most places where the output buffer was being interrogated about dimensions instead of GfxFrameout.
Diffstat (limited to 'engines/sci/graphics/text32.h')
-rw-r--r--engines/sci/graphics/text32.h12
1 files changed, 6 insertions, 6 deletions
diff --git a/engines/sci/graphics/text32.h b/engines/sci/graphics/text32.h
index 945cc81130..f9de3ad5fb 100644
--- a/engines/sci/graphics/text32.h
+++ b/engines/sci/graphics/text32.h
@@ -139,10 +139,10 @@ private:
inline Common::Rect scaleRect(const Common::Rect &rect) {
Common::Rect scaledRect(rect);
- int16 scriptWidth = g_sci->_gfxFrameout->getCurrentBuffer().scriptWidth;
- int16 scriptHeight = g_sci->_gfxFrameout->getCurrentBuffer().scriptHeight;
- Ratio scaleX(_xResolution, scriptWidth);
- Ratio scaleY(_yResolution, scriptHeight);
+ const int16 scriptWidth = g_sci->_gfxFrameout->getScriptWidth();
+ const int16 scriptHeight = g_sci->_gfxFrameout->getScriptHeight();
+ const Ratio scaleX(_xResolution, scriptWidth);
+ const Ratio scaleY(_yResolution, scriptHeight);
mulinc(scaledRect, scaleX, scaleY);
return scaledRect;
}
@@ -191,12 +191,12 @@ public:
reg_t createFontBitmap(const CelInfo32 &celInfo, const Common::Rect &rect, const Common::String &text, const int16 foreColor, const int16 backColor, const GuiResourceId fontId, const int16 skipColor, const int16 borderColor, const bool dimmed, const bool gc);
inline int scaleUpWidth(int value) const {
- const int scriptWidth = g_sci->_gfxFrameout->getCurrentBuffer().scriptWidth;
+ const int scriptWidth = g_sci->_gfxFrameout->getScriptWidth();
return (value * scriptWidth + _xResolution - 1) / _xResolution;
}
inline int scaleUpHeight(int value) const {
- const int scriptHeight = g_sci->_gfxFrameout->getCurrentBuffer().scriptHeight;
+ const int scriptHeight = g_sci->_gfxFrameout->getScriptHeight();
return (value * scriptHeight + _yResolution - 1) / _yResolution;
}