diff options
author | Johannes Schickel | 2009-07-26 14:17:40 +0000 |
---|---|---|
committer | Johannes Schickel | 2009-07-26 14:17:40 +0000 |
commit | cb960ad976bf523704beb71641bc242501a67a53 (patch) | |
tree | b3c3b481c752c3dbdb3c177f942fd36dd8af477e /graphics/sjis.cpp | |
parent | 0a03ae8265a894270f2bd299bde1c0b22d935490 (diff) | |
download | scummvm-rg350-cb960ad976bf523704beb71641bc242501a67a53.tar.gz scummvm-rg350-cb960ad976bf523704beb71641bc242501a67a53.tar.bz2 scummvm-rg350-cb960ad976bf523704beb71641bc242501a67a53.zip |
Change the way the font data for SJIS fonts is load.
svn-id: r42815
Diffstat (limited to 'graphics/sjis.cpp')
-rw-r--r-- | graphics/sjis.cpp | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/graphics/sjis.cpp b/graphics/sjis.cpp index 0fad3fff94..a00fdc83cb 100644 --- a/graphics/sjis.cpp +++ b/graphics/sjis.cpp @@ -101,10 +101,19 @@ void FontSJIS16x16::drawChar(void *dst, uint16 ch, int pitch, int bpp, uint32 c1 } } -bool FontTowns::loadFromStream(Common::ReadStream &stream) { +// FM-TOWNS ROM font + +bool FontTowns::loadData() { + Common::SeekableReadStream *data = SearchMan.createReadStreamForMember("FMT_FNT.ROM"); + if (!data) + return false; + for (uint i = 0; i < (kFontRomSize / 2); ++i) - _fontData[i] = stream.readUint16BE(); - return !stream.err(); + _fontData[i] = data->readUint16BE(); + + bool retValue = !data->err(); + delete data; + return retValue; } const uint16 *FontTowns::getCharData(uint16 ch) const { |