diff options
author | Filippos Karapetis | 2011-10-15 00:19:39 +0300 |
---|---|---|
committer | Filippos Karapetis | 2011-10-15 00:19:39 +0300 |
commit | 88472151b4e5da4c4f29532d2839568d7805c374 (patch) | |
tree | e45782c371a7d801ad8dc149a187af291811ceaa /engines | |
parent | 9f568f5f0bac6018337022bda11cc978c242c36c (diff) | |
download | scummvm-rg350-88472151b4e5da4c4f29532d2839568d7805c374.tar.gz scummvm-rg350-88472151b4e5da4c4f29532d2839568d7805c374.tar.bz2 scummvm-rg350-88472151b4e5da4c4f29532d2839568d7805c374.zip |
SCI: Fixed text length in upscaled SCI32 games
Diffstat (limited to 'engines')
-rw-r--r-- | engines/sci/graphics/text32.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/engines/sci/graphics/text32.cpp b/engines/sci/graphics/text32.cpp index b4e27765ad..49e6fe01b8 100644 --- a/engines/sci/graphics/text32.cpp +++ b/engines/sci/graphics/text32.cpp @@ -71,6 +71,12 @@ reg_t GfxText32::createTextBitmap(reg_t textObject, uint16 maxWidth, uint16 maxH if (maxHeight > 0) height = maxHeight; + // Upscale the coordinates/width if the fonts are already upscaled + if (_screen->fontIsUpscaled()) { + width = width * _screen->getDisplayWidth() / _screen->getWidth(); + height = height * _screen->getDisplayHeight() / _screen->getHeight(); + } + int entrySize = width * height + BITMAP_HEADER_SIZE; reg_t memoryId = _segMan->allocateHunkEntry("TextBitmap()", entrySize); writeSelector(_segMan, textObject, SELECTOR(bitmap), memoryId); @@ -130,6 +136,8 @@ void GfxText32::drawTextBitmap(reg_t textObject) { if (_screen->fontIsUpscaled()) { textX = textX * _screen->getDisplayWidth() / _screen->getWidth(); textY = textY * _screen->getDisplayHeight() / _screen->getHeight(); + width = width * _screen->getDisplayWidth() / _screen->getWidth(); + height = height * _screen->getDisplayHeight() / _screen->getHeight(); } for (int curY = 0; curY < height; curY++) { @@ -161,6 +169,7 @@ Common::Rect GfxText32::getNSRect(reg_t textObject) { nsRect.left = readSelectorValue(_segMan, textObject, SELECTOR(nsLeft)); nsRect.bottom = readSelectorValue(_segMan, textObject, SELECTOR(nsBottom)) + 1; nsRect.right = readSelectorValue(_segMan, textObject, SELECTOR(nsRight)) + 1; + return nsRect; } |