diff options
author | Matthew Hoops | 2011-02-03 15:51:51 +0000 |
---|---|---|
committer | Matthew Hoops | 2011-02-03 15:51:51 +0000 |
commit | 4d088332a2f5bb6cb8aea9031a79d834dbb258e4 (patch) | |
tree | 861d9143ea41fe1e6e72b8734e425a54f8a7001e /engines/sci/graphics/screen.cpp | |
parent | c4861605df3964f3ea89a6cdf3873a1c87c48f12 (diff) | |
download | scummvm-rg350-4d088332a2f5bb6cb8aea9031a79d834dbb258e4.tar.gz scummvm-rg350-4d088332a2f5bb6cb8aea9031a79d834dbb258e4.tar.bz2 scummvm-rg350-4d088332a2f5bb6cb8aea9031a79d834dbb258e4.zip |
SCI: Add support for GK1 Mac high-res fonts
svn-id: r55754
Diffstat (limited to 'engines/sci/graphics/screen.cpp')
-rw-r--r-- | engines/sci/graphics/screen.cpp | 28 |
1 files changed, 17 insertions, 11 deletions
diff --git a/engines/sci/graphics/screen.cpp b/engines/sci/graphics/screen.cpp index 73e60e2cf3..2543dec7bb 100644 --- a/engines/sci/graphics/screen.cpp +++ b/engines/sci/graphics/screen.cpp @@ -111,6 +111,7 @@ GfxScreen::GfxScreen(ResourceManager *resMan) : _resMan(resMan) { _picNotValid = 0; _picNotValidSci11 = 0; _unditherState = true; + _fontIsUpscaled = false; if (_resMan->isVGA() || (_resMan->isAmiga32color())) { // It is not 100% accurate to set white to be 255 for Amiga 32-color @@ -231,18 +232,23 @@ void GfxScreen::putPixel(int x, int y, byte drawMask, byte color, byte priority, * Sierra SCI didn't do this */ void GfxScreen::putFontPixel(int startingY, int x, int y, byte color) { - int offset = (startingY + y) * _width + x; - - _visualScreen[offset] = color; - if (!_upscaledHires) { - _displayScreen[offset] = color; + if (_fontIsUpscaled) { + // Do not scale ourselves, but put it on the display directly + putPixelOnDisplay(x, y + startingY, color); } else { - int displayOffset = (_upscaledMapping[startingY] + y * 2) * _displayWidth + x * 2; - _displayScreen[displayOffset] = color; - _displayScreen[displayOffset + 1] = color; - displayOffset += _displayWidth; - _displayScreen[displayOffset] = color; - _displayScreen[displayOffset + 1] = color; + int offset = (startingY + y) * _width + x; + + _visualScreen[offset] = color; + if (!_upscaledHires) { + _displayScreen[offset] = color; + } else { + int displayOffset = (_upscaledMapping[startingY] + y * 2) * _displayWidth + x * 2; + _displayScreen[displayOffset] = color; + _displayScreen[displayOffset + 1] = color; + displayOffset += _displayWidth; + _displayScreen[displayOffset] = color; + _displayScreen[displayOffset + 1] = color; + } } } |