aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--scumm/charset.cpp14
-rw-r--r--scumm/script_v2.cpp3
-rw-r--r--scumm/scumm.h2
3 files changed, 16 insertions, 3 deletions
diff --git a/scumm/charset.cpp b/scumm/charset.cpp
index a2d0cb365b..24e4f976a2 100644
--- a/scumm/charset.cpp
+++ b/scumm/charset.cpp
@@ -463,8 +463,18 @@ static byte frenchCharsetDataV2[] = {
void CharsetRendererV2::setCurID(byte id) {
- _fontPtr = frenchCharsetDataV2;
- _fontPtr = germanCharsetDataV2;
+ switch (_vm->_language) {
+ case DE_DEU:
+ _fontPtr = germanCharsetDataV2;
+ break;
+ case FR_FRA:
+ _fontPtr = frenchCharsetDataV2;
+ break;
+ default:
+ // For now we default to the german font
+ _fontPtr = germanCharsetDataV2;
+ break;
+ }
#if 0
// Decompress weird encoding in which the Zak executable contains the font.
diff --git a/scumm/script_v2.cpp b/scumm/script_v2.cpp
index 5f33fbb6e7..397eaaf477 100644
--- a/scumm/script_v2.cpp
+++ b/scumm/script_v2.cpp
@@ -951,7 +951,8 @@ void Scumm_v2::o2_drawSentence() {
{ " ", " in", " with", " on", " to" }, // Chinese
{ " ", " 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) {
diff --git a/scumm/scumm.h b/scumm/scumm.h
index 7e575b6517..b88036dbc4 100644
--- a/scumm/scumm.h
+++ b/scumm/scumm.h
@@ -1071,7 +1071,9 @@ protected:
byte *_msgPtrToAdd;
const byte *_messagePtr;
bool _keepText;
+public:
uint16 _language;
+protected:
bool _existLanguageFile;
char *_languageBuffer;
struct langIndexNode *_languageIndex;