aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMax Horn2003-05-25 20:38:44 +0000
committerMax Horn2003-05-25 20:38:44 +0000
commit80eab4c3c48a4291b68918838d543ed98b13ea9c (patch)
tree9064e2a83dde9533529b5563c922d4b26c707a83
parentfb0b37c69bfd2c4525e0bd092355dda6643ac51a (diff)
downloadscummvm-rg350-80eab4c3c48a4291b68918838d543ed98b13ea9c.tar.gz
scummvm-rg350-80eab4c3c48a4291b68918838d543ed98b13ea9c.tar.bz2
scummvm-rg350-80eab4c3c48a4291b68918838d543ed98b13ea9c.zip
hook language command switch to V2 font / prepositions
svn-id: r7970
-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;