aboutsummaryrefslogtreecommitdiff
path: root/engines/sci/graphics/font.cpp
diff options
context:
space:
mode:
authorMartin Kiewitz2010-04-16 18:23:50 +0000
committerMartin Kiewitz2010-04-16 18:23:50 +0000
commitcd4812dfd9444a7c9df1955c940523186922de42 (patch)
treed7fbd4dfeb92472e775c86be5d013a657c434e75 /engines/sci/graphics/font.cpp
parent01852cbf93de30fc8b61e8193379de1c2a5d689a (diff)
downloadscummvm-rg350-cd4812dfd9444a7c9df1955c940523186922de42.tar.gz
scummvm-rg350-cd4812dfd9444a7c9df1955c940523186922de42.tar.bz2
scummvm-rg350-cd4812dfd9444a7c9df1955c940523186922de42.zip
SCI: support for kanji (sjis), minor centering issue left
svn-id: r48674
Diffstat (limited to 'engines/sci/graphics/font.cpp')
-rw-r--r--engines/sci/graphics/font.cpp16
1 files changed, 8 insertions, 8 deletions
diff --git a/engines/sci/graphics/font.cpp b/engines/sci/graphics/font.cpp
index 4bfe8f87dd..91cf01c912 100644
--- a/engines/sci/graphics/font.cpp
+++ b/engines/sci/graphics/font.cpp
@@ -30,7 +30,7 @@
namespace Sci {
-GfxFont::GfxFont(ResourceManager *resMan, GfxScreen *screen, GuiResourceId resourceId)
+GfxFontFromResource::GfxFontFromResource(ResourceManager *resMan, GfxScreen *screen, GuiResourceId resourceId)
: _resourceId(resourceId), _screen(screen), _resMan(resMan) {
assert(resourceId != -1);
@@ -56,29 +56,29 @@ GfxFont::GfxFont(ResourceManager *resMan, GfxScreen *screen, GuiResourceId resou
}
}
-GfxFont::~GfxFont() {
+GfxFontFromResource::~GfxFontFromResource() {
delete []_chars;
_resMan->unlockResource(_resource);
}
-GuiResourceId GfxFont::getResourceId() {
+GuiResourceId GfxFontFromResource::getResourceId() {
return _resourceId;
}
-byte GfxFont::getHeight() {
+byte GfxFontFromResource::getHeight() {
return _fontHeight;
}
-byte GfxFont::getCharWidth(byte chr) {
+byte GfxFontFromResource::getCharWidth(uint16 chr) {
return chr < _numChars ? _chars[chr].w : 0;
}
-byte GfxFont::getCharHeight(byte chr) {
+byte GfxFontFromResource::getCharHeight(uint16 chr) {
return chr < _numChars ? _chars[chr].h : 0;
}
-byte *GfxFont::getCharData(byte chr) {
+byte *GfxFontFromResource::getCharData(uint16 chr) {
return chr < _numChars ? _resourceData + _chars[chr].offset + 2 : 0;
}
-void GfxFont::draw(int16 chr, int16 top, int16 left, byte color, bool greyedOutput) {
+void GfxFontFromResource::draw(uint16 chr, int16 top, int16 left, byte color, bool greyedOutput) {
int charWidth = MIN<int>(getCharWidth(chr), _screen->getWidth() - left);
int charHeight = MIN<int>(getCharHeight(chr), _screen->getHeight() - top);
byte b = 0, mask = 0xFF;