[Scummvm-cvs-logs] CVS: scummvm/scumm charset.cpp,2.34,2.35 script_v2.cpp,2.124,2.125 scumm.h,1.212,1.213
Max Horn
fingolfin at users.sourceforge.net
Sun May 25 13:39:05 CEST 2003
Update of /cvsroot/scummvm/scummvm/scumm
In directory sc8-pr-cvs1:/tmp/cvs-serv4366
Modified Files:
charset.cpp script_v2.cpp scumm.h
Log Message:
hook language command switch to V2 font / prepositions
Index: charset.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/charset.cpp,v
retrieving revision 2.34
retrieving revision 2.35
diff -u -d -r2.34 -r2.35
--- charset.cpp 25 May 2003 20:21:28 -0000 2.34
+++ charset.cpp 25 May 2003 20:38:44 -0000 2.35
@@ -463,8 +463,18 @@
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.
Index: script_v2.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/script_v2.cpp,v
retrieving revision 2.124
retrieving revision 2.125
diff -u -d -r2.124 -r2.125
--- script_v2.cpp 25 May 2003 18:56:20 -0000 2.124
+++ script_v2.cpp 25 May 2003 20:38:44 -0000 2.125
@@ -951,7 +951,8 @@
{ " ", " 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) {
Index: scumm.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/scumm.h,v
retrieving revision 1.212
retrieving revision 1.213
diff -u -d -r1.212 -r1.213
--- scumm.h 25 May 2003 00:47:36 -0000 1.212
+++ scumm.h 25 May 2003 20:38:44 -0000 1.213
@@ -1071,7 +1071,9 @@
byte *_msgPtrToAdd;
const byte *_messagePtr;
bool _keepText;
+public:
uint16 _language;
+protected:
bool _existLanguageFile;
char *_languageBuffer;
struct langIndexNode *_languageIndex;
More information about the Scummvm-git-logs
mailing list