diff options
Diffstat (limited to 'scumm')
-rw-r--r-- | scumm/charset.cpp | 5 | ||||
-rw-r--r-- | scumm/charset.h | 4 | ||||
-rw-r--r-- | scumm/scumm.h | 2 | ||||
-rw-r--r-- | scumm/scummvm.cpp | 7 |
4 files changed, 11 insertions, 7 deletions
diff --git a/scumm/charset.cpp b/scumm/charset.cpp index 2fc4abeab3..0f2a7ae75d 100644 --- a/scumm/charset.cpp +++ b/scumm/charset.cpp @@ -864,9 +864,10 @@ static byte spanishCharsetDataV2[] = { }; #endif -void CharsetRendererV2::setCurID(byte id) { +CharsetRendererV2::CharsetRendererV2(ScummEngine *vm, Common::Language language) + : CharsetRendererV3(vm) { - switch (_vm->_language) { + switch (language) { case Common::DE_DEU: _fontPtr = germanCharsetDataV2; break; diff --git a/scumm/charset.h b/scumm/charset.h index edb66bf12c..056fd967ef 100644 --- a/scumm/charset.h +++ b/scumm/charset.h @@ -122,9 +122,9 @@ protected: int getCharWidth(byte chr) { return 8; } public: - CharsetRendererV2(ScummEngine *vm) : CharsetRendererV3(vm) {} + CharsetRendererV2(ScummEngine *vm, Common::Language language); - void setCurID(byte id); + void setCurID(byte id) {} }; class CharsetRendererNut : public CharsetRenderer { diff --git a/scumm/scumm.h b/scumm/scumm.h index 534be95f5a..bbc90076d0 100644 --- a/scumm/scumm.h +++ b/scumm/scumm.h @@ -1038,7 +1038,7 @@ protected: const byte *_messagePtr; bool _keepText; public: - uint16 _language; + Common::Language _language; protected: bool _existLanguageFile; char *_languageBuffer; diff --git a/scumm/scummvm.cpp b/scumm/scummvm.cpp index fb3923edd6..b90b4efaa3 100644 --- a/scumm/scummvm.cpp +++ b/scumm/scummvm.cpp @@ -364,7 +364,6 @@ ScummEngine::ScummEngine(GameDetector *detector, OSystem *syst, const ScummGameS _bootParam = 0; _dumpScripts = false; _debugMode = 0; - _language = 0; _objectOwnerTable = NULL; _objectRoomTable = NULL; _objectStateTable = NULL; @@ -788,6 +787,8 @@ ScummEngine::ScummEngine(GameDetector *detector, OSystem *syst, const ScummGameS fontFile = "chinese.fnt"; } break; + default: + break; } if (fontFile && fp.open(fontFile, getGameDataPath())) { debug(2, "Loading CJK Font"); @@ -807,6 +808,8 @@ ScummEngine::ScummEngine(GameDetector *detector, OSystem *syst, const ScummGameS case Common::ZH_TWN: numChar = 1; //FIXME break; + default: + break; } _2byteFontPtr = new byte[((_2byteWidth + 7) / 8) * _2byteHeight * numChar]; fp.read(_2byteFontPtr, ((_2byteWidth + 7) / 8) * _2byteHeight * numChar); @@ -829,7 +832,7 @@ ScummEngine::ScummEngine(GameDetector *detector, OSystem *syst, const ScummGameS // Create the charset renderer if (_version <= 2) - _charset = new CharsetRendererV2(this); + _charset = new CharsetRendererV2(this, _language); else if (_version == 3) _charset = new CharsetRendererV3(this); else if (_version == 8) |