diff options
author | Martin Kiewitz | 2010-04-16 18:23:50 +0000 |
---|---|---|
committer | Martin Kiewitz | 2010-04-16 18:23:50 +0000 |
commit | cd4812dfd9444a7c9df1955c940523186922de42 (patch) | |
tree | d7fbd4dfeb92472e775c86be5d013a657c434e75 /engines/sci/graphics/cache.cpp | |
parent | 01852cbf93de30fc8b61e8193379de1c2a5d689a (diff) | |
download | scummvm-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/cache.cpp')
-rw-r--r-- | engines/sci/graphics/cache.cpp | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/engines/sci/graphics/cache.cpp b/engines/sci/graphics/cache.cpp index ef8538349f..81bdab80ea 100644 --- a/engines/sci/graphics/cache.cpp +++ b/engines/sci/graphics/cache.cpp @@ -32,6 +32,7 @@ #include "sci/engine/selector.h" #include "sci/graphics/cache.h" #include "sci/graphics/font.h" +#include "sci/graphics/fontsjis.h" #include "sci/graphics/view.h" namespace Sci { @@ -67,8 +68,13 @@ GfxFont *GfxCache::getFont(GuiResourceId fontId) { if (_cachedFonts.size() >= MAX_CACHED_FONTS) purgeFontCache(); - if (!_cachedFonts.contains(fontId)) - _cachedFonts[fontId] = new GfxFont(_resMan, _screen, fontId); + if (!_cachedFonts.contains(fontId)) { + // Create special SJIS font in japanese games, when font 900 is selected + if ((fontId == 900) && (g_sci->getLanguage() == Common::JA_JPN)) + _cachedFonts[fontId] = new GfxFontSjis(_screen, fontId); + else + _cachedFonts[fontId] = new GfxFontFromResource(_resMan, _screen, fontId); + } return _cachedFonts[fontId]; } |