diff options
author | Colin Snover | 2017-02-07 15:27:15 -0600 |
---|---|---|
committer | Colin Snover | 2017-04-22 19:25:20 -0500 |
commit | ede7976ede9121d52932b4b0780e6adc68f6e35d (patch) | |
tree | 09a5239e8bfc772544df05b8ea6d524c7195355f /engines/sci/graphics/text32.cpp | |
parent | c6cf7215f0f620dc4a155ca79510a44db13370fc (diff) | |
download | scummvm-rg350-ede7976ede9121d52932b4b0780e6adc68f6e35d.tar.gz scummvm-rg350-ede7976ede9121d52932b4b0780e6adc68f6e35d.tar.bz2 scummvm-rg350-ede7976ede9121d52932b4b0780e6adc68f6e35d.zip |
SCI32: Fix bad kPointSize implementation
Fixes text scaling gone mad in Phant2.
Diffstat (limited to 'engines/sci/graphics/text32.cpp')
-rw-r--r-- | engines/sci/graphics/text32.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/engines/sci/graphics/text32.cpp b/engines/sci/graphics/text32.cpp index a017a2fcc5..7399fe0268 100644 --- a/engines/sci/graphics/text32.cpp +++ b/engines/sci/graphics/text32.cpp @@ -216,6 +216,11 @@ void GfxText32::drawChar(const char charIndex) { _drawPosition.x += _font->getCharWidth((unsigned char)charIndex); } +int16 GfxText32::getScaledFontHeight() const { + const int16 scriptHeight = g_sci->_gfxFrameout->getCurrentBuffer().scriptHeight; + return (_font->getHeight() * scriptHeight + _yResolution - 1) / _yResolution; +} + uint16 GfxText32::getCharWidth(const char charIndex, const bool doScaling) const { uint16 width = _font->getCharWidth((unsigned char)charIndex); if (doScaling) { |