aboutsummaryrefslogtreecommitdiff
path: root/engines/scumm/script_v2.cpp
diff options
context:
space:
mode:
authorMax Horn2006-04-08 23:56:09 +0000
committerMax Horn2006-04-08 23:56:09 +0000
commit807edc83c77e84448b81721eb33a9cbc033e8cc3 (patch)
treec64abd58351c705c35d2d346abfc72ab807c0c2a /engines/scumm/script_v2.cpp
parent85c9dc7de8822821c8f29e8958af1b39cc77b7b8 (diff)
downloadscummvm-rg350-807edc83c77e84448b81721eb33a9cbc033e8cc3.tar.gz
scummvm-rg350-807edc83c77e84448b81721eb33a9cbc033e8cc3.tar.bz2
scummvm-rg350-807edc83c77e84448b81721eb33a9cbc033e8cc3.zip
Properly translate Common::Language values for V0-V2 games, too
svn-id: r21705
Diffstat (limited to 'engines/scumm/script_v2.cpp')
-rw-r--r--engines/scumm/script_v2.cpp35
1 files changed, 23 insertions, 12 deletions
diff --git a/engines/scumm/script_v2.cpp b/engines/scumm/script_v2.cpp
index ff32ab033a..00e4bfba57 100644
--- a/engines/scumm/script_v2.cpp
+++ b/engines/scumm/script_v2.cpp
@@ -1013,20 +1013,31 @@ void ScummEngine_v2::o2_drawSentence() {
// The prepositions, like the fonts, were hard code in the engine. Thus
// we have to do that, too, and provde localized versions for all the
// languages MM/Zak are available in.
- //
- // The order here matches the one defined in gameDetector.h
const char *prepositions[][5] = {
- { " ", " in", " with", " on", " to" }, // English
- { " ", " mit", " mit", " mit", " zu" }, // German
- { " ", " dans", " avec", " sur", " <" }, // French
- { " ", " in", " con", " su", " a" }, // Italian
- { " ", " in", " with", " on", " to" }, // Portugese
- { " ", " en", " con", " en", " a" }, // Spanish
- { " ", " in", " with", " on", " to" }, // Japanese
- { " ", " in", " with", " on", " to" }, // Chinese
- { " ", " in", " with", " on", " to" } // Korean
+ { " ", " in", " with", " on", " to" }, // English
+ { " ", " mit", " mit", " mit", " zu" }, // German
+ { " ", " dans", " avec", " sur", " <" }, // French
+ { " ", " in", " con", " su", " a" }, // Italian
+ { " ", " en", " con", " en", " a" }, // Spanish
};
- int lang = (_language <= 8) ? _language : 0; // Default to english
+ int lang;
+ switch (_language) {
+ case Common::DE_DEU:
+ lang = 1;
+ break;
+ case Common::FR_FRA:
+ lang = 2;
+ break;
+ case Common::IT_ITA:
+ lang = 3;
+ break;
+ case Common::ES_ESP:
+ lang = 4;
+ break;
+ default:
+ lang = 0; // Default to english
+ }
+
if (_game.platform == Common::kPlatformNES) {
strcat(sentence, (const char *)(getResourceAddress(rtCostume, 78) + VAR(VAR_SENTENCE_PREPOSITION) * 8 + 2));
} else