aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohannes Schickel2009-06-21 01:15:09 +0000
committerJohannes Schickel2009-06-21 01:15:09 +0000
commit89607d994b2ca93788a62cab87bf8dc66f2804b5 (patch)
tree605c29129dc547032b9b360c357dd5f529a2d7ac
parentd4248b10c81f5e8cbc40c5e1eb5e0d4df2b44871 (diff)
downloadscummvm-rg350-89607d994b2ca93788a62cab87bf8dc66f2804b5.tar.gz
scummvm-rg350-89607d994b2ca93788a62cab87bf8dc66f2804b5.tar.bz2
scummvm-rg350-89607d994b2ca93788a62cab87bf8dc66f2804b5.zip
Fix drawing of sharp s.
svn-id: r41719
-rw-r--r--engines/kyra/screen.cpp4
-rw-r--r--engines/kyra/screen.h2
2 files changed, 3 insertions, 3 deletions
diff --git a/engines/kyra/screen.cpp b/engines/kyra/screen.cpp
index bbac843161..88d9ddcd5f 100644
--- a/engines/kyra/screen.cpp
+++ b/engines/kyra/screen.cpp
@@ -1008,7 +1008,7 @@ bool Screen::loadFont(FontId fontId, const char *filename) {
fnt->charWidthTableOffset = READ_LE_UINT16(fontData + 8);
fnt->charHeightTableOffset = READ_LE_UINT16(fontData + 0xC);
- fnt->glyphCount = *(fnt->fontData + fnt->fontDescOffset + 3);
+ fnt->lastGlyph = *(fnt->fontData + fnt->fontDescOffset + 3);
return true;
}
@@ -1134,7 +1134,7 @@ void Screen::printText(const char *str, int x, int y, uint8 color1, uint8 color2
void Screen::drawCharANSI(uint8 c, int x, int y) {
Font *fnt = &_fonts[_currentFont];
- if (c >= fnt->glyphCount)
+ if (c > fnt->lastGlyph)
return;
uint8 *dst = getPagePtr(_curPage) + y * SCREEN_W + x;
diff --git a/engines/kyra/screen.h b/engines/kyra/screen.h
index b7e35d639e..9eb17b1d39 100644
--- a/engines/kyra/screen.h
+++ b/engines/kyra/screen.h
@@ -58,7 +58,7 @@ struct Font {
uint16 charWidthTableOffset;
uint16 charHeightTableOffset;
- uint8 glyphCount;
+ uint8 lastGlyph;
};
class Screen {