diff options
author | Johannes Schickel | 2013-11-23 21:34:54 +0100 |
---|---|---|
committer | Johannes Schickel | 2013-11-23 21:34:54 +0100 |
commit | afa3f50b8a2bc47a243156c196f88ab799fe4f8f (patch) | |
tree | 2da464a6122e0f15f3bf92297ccc28d48066fcf4 /engines | |
parent | b90400da44e4438c5a00773e6d2af82880dc45f4 (diff) | |
download | scummvm-rg350-afa3f50b8a2bc47a243156c196f88ab799fe4f8f.tar.gz scummvm-rg350-afa3f50b8a2bc47a243156c196f88ab799fe4f8f.tar.bz2 scummvm-rg350-afa3f50b8a2bc47a243156c196f88ab799fe4f8f.zip |
GRAPHICS: Let Font take uint32 as character codes.
This is required to support UTF-32 strings but does not make them work
automatically!
Diffstat (limited to 'engines')
-rw-r--r-- | engines/groovie/font.cpp | 4 | ||||
-rw-r--r-- | engines/groovie/font.h | 6 |
2 files changed, 5 insertions, 5 deletions
diff --git a/engines/groovie/font.cpp b/engines/groovie/font.cpp index d29c22dd02..a55d8fad95 100644 --- a/engines/groovie/font.cpp +++ b/engines/groovie/font.cpp @@ -112,7 +112,7 @@ bool T7GFont::load(Common::SeekableReadStream &stream) { return true; } -void T7GFont::drawChar(Graphics::Surface *dst, byte chr, int x, int y, uint32 color) const { +void T7GFont::drawChar(Graphics::Surface *dst, uint32 chr, int x, int y, uint32 color) const { // We ignore the color, as the font is already colored const Glyph *glyph = getGlyph(chr); const byte *src = glyph->pixels; @@ -125,7 +125,7 @@ void T7GFont::drawChar(Graphics::Surface *dst, byte chr, int x, int y, uint32 co } } -const T7GFont::Glyph *T7GFont::getGlyph(byte chr) const { +const T7GFont::Glyph *T7GFont::getGlyph(uint32 chr) const { assert (chr < 128); byte numGlyph = _mapChar2Glyph[chr]; diff --git a/engines/groovie/font.h b/engines/groovie/font.h index 20aaa4cf23..49cf4b7b06 100644 --- a/engines/groovie/font.h +++ b/engines/groovie/font.h @@ -37,8 +37,8 @@ public: int getFontHeight() const { return _maxHeight; } int getMaxCharWidth() const { return _maxWidth; } - int getCharWidth(byte chr) const { return getGlyph(chr)->width; } - void drawChar(Graphics::Surface *dst, byte chr, int x, int y, uint32 color) const; + int getCharWidth(uint32 chr) const { return getGlyph(chr)->width; } + void drawChar(Graphics::Surface *dst, uint32 chr, int x, int y, uint32 color) const; private: int _maxHeight, _maxWidth; @@ -55,7 +55,7 @@ private: byte _mapChar2Glyph[128]; Glyph *_glyphs; - const Glyph *getGlyph(byte chr) const; + const Glyph *getGlyph(uint32 chr) const; }; } // End of Groovie namespace |