hook language command switch to V2 font / prepositions

svn-id: r7970
This commit is contained in:
Max Horn 2003-05-25 20:38:44 +00:00
parent fb0b37c69b
commit 80eab4c3c4
3 changed files with 16 additions and 3 deletions

View file

@ -463,8 +463,18 @@ static byte frenchCharsetDataV2[] = {
void CharsetRendererV2::setCurID(byte id) { void CharsetRendererV2::setCurID(byte id) {
_fontPtr = frenchCharsetDataV2; switch (_vm->_language) {
case DE_DEU:
_fontPtr = germanCharsetDataV2; _fontPtr = germanCharsetDataV2;
break;
case FR_FRA:
_fontPtr = frenchCharsetDataV2;
break;
default:
// For now we default to the german font
_fontPtr = germanCharsetDataV2;
break;
}
#if 0 #if 0
// Decompress weird encoding in which the Zak executable contains the font. // Decompress weird encoding in which the Zak executable contains the font.

View file

@ -951,7 +951,8 @@ void Scumm_v2::o2_drawSentence() {
{ " ", " in", " with", " on", " to" }, // Chinese { " ", " in", " with", " on", " to" }, // Chinese
{ " ", " in", " with", " on", " to" } // Korean { " ", " in", " with", " on", " to" } // Korean
}; };
strcat(sentence, prepositions[0][VAR(VAR_SENTENCE_PREPOSITION)]); int lang = (_language <= 8) ? _language : 0;
strcat(sentence, prepositions[lang][VAR(VAR_SENTENCE_PREPOSITION)]);
} }
if (VAR(VAR_SENTENCE_OBJECT2) > 0) { if (VAR(VAR_SENTENCE_OBJECT2) > 0) {

View file

@ -1071,7 +1071,9 @@ protected:
byte *_msgPtrToAdd; byte *_msgPtrToAdd;
const byte *_messagePtr; const byte *_messagePtr;
bool _keepText; bool _keepText;
public:
uint16 _language; uint16 _language;
protected:
bool _existLanguageFile; bool _existLanguageFile;
char *_languageBuffer; char *_languageBuffer;
struct langIndexNode *_languageIndex; struct langIndexNode *_languageIndex;