diff options
author | Torbjörn Andersson | 2006-04-08 07:50:47 +0000 |
---|---|---|
committer | Torbjörn Andersson | 2006-04-08 07:50:47 +0000 |
commit | f3ede2bf3879d1bba3ddf2a615c6ee14730dae20 (patch) | |
tree | 3a405564443438c0302477f3b5719c5f078da2f3 /engines/cine/various.cpp | |
parent | 812dd72207f85c1159b6a2c70ab9395dfe2a29f6 (diff) | |
download | scummvm-rg350-f3ede2bf3879d1bba3ddf2a615c6ee14730dae20.tar.gz scummvm-rg350-f3ede2bf3879d1bba3ddf2a615c6ee14730dae20.tar.bz2 scummvm-rg350-f3ede2bf3879d1bba3ddf2a615c6ee14730dae20.zip |
Began collecting hard-coded language-specific strings in a new initLanguage()
function. It's now possible to choose between English and French menus, and the
command string preposition in English is "on", not "sur".
There are still plenty of hard-coded French messages to do with savegame
handling. I haven't done anything about them.
svn-id: r21682
Diffstat (limited to 'engines/cine/various.cpp')
-rw-r--r-- | engines/cine/various.cpp | 119 |
1 files changed, 71 insertions, 48 deletions
diff --git a/engines/cine/various.cpp b/engines/cine/various.cpp index e6ed63b176..1c705e6058 100644 --- a/engines/cine/various.cpp +++ b/engines/cine/various.cpp @@ -131,28 +131,78 @@ byte inputVar1 = 0; uint16 inputVar2; uint16 inputVar3; -commandeType defaultActionCommand[] = { - "EXAMINE", - "TAKE", - "INVENTORY", - "USE", - "OPERATE", - "SPEAK", - "NOACTION" -// french -/* - "EXAMINER", - "PRENDRE", - "INVENTAIRE", - "UTILISER", - "ACTIONNER", - "PARLER", - "NOACTION" -*/ -}; +const commandeType *defaultActionCommand; +const commandeType *systemMenu; +const commandeType *confirmMenu; +const char *commandPrepositionOn; selectedObjStruct currentSelectedObject; +void initLanguage(Common::Language lang) { + static const commandeType defaultActionCommand_EN[] = { + "EXAMINE", + "TAKE", + "INVENTORY", + "USE", + "OPERATE", + "SPEAK", + "NOACTION" + }; + + static const commandeType systemMenu_EN[] = { + "Pause", + "Restart Game", + "Quit", + "Backup Drive is A:", + "Restore game", + "Save game" + }; + + static const commandeType confirmMenu_EN[] = { + "Ok, go ahead ...", + "Absolutely Not!" + }; + + static const commandeType defaultActionCommand_FR[] = { + "EXAMINER", + "PRENDRE", + "INVENTAIRE", + "UTILISER", + "ACTIONNER", + "PARLER", + "NOACTION" + }; + + static const commandeType systemMenu_FR[] = { + "Pause", + "Nouvelle partie", + "Quitter", + "Lecteur de Svg. A:", + "Charger une partie", + "Sauver la partie" + }; + + static const commandeType confirmMenu_FR[] = { + "Ok , Vas-y ...", + "Surtout Pas !" + }; + + switch (lang) { + case Common::FR_FRA: + defaultActionCommand = defaultActionCommand_FR; + systemMenu = systemMenu_FR; + confirmMenu = confirmMenu_FR; + commandPrepositionOn = "sur"; + break; + default: + defaultActionCommand = defaultActionCommand_EN; + systemMenu = systemMenu_EN; + confirmMenu = confirmMenu_EN; + commandPrepositionOn = "on"; + break; + } +} + void mainLoopSub3(void) { } @@ -296,34 +346,6 @@ int16 getObjectUnderCursor(uint16 x, uint16 y) { return -1; } -const commandeType systemMenu[] = { - "Pause", - "Restart Game", - "Quit", - "Backup Drive is A:", - "Restore game", - "Save game" -// french -/* - "Pause", - "Nouvelle partie", - "Quitter", - "Lecteur de Svg. A:", - "Charger une partie", - "Sauver la partie" -*/ -}; - -const commandeType confirmMenu[] = { - "Ok, go ahead ...", - "Absolutely Not!" -// french -/* - "Ok , Vas-y ...", - "Surtout Pas !" -*/ -}; - commandeType currentSaveName[10]; int16 loadSaveDirectory(void) { @@ -1192,7 +1214,8 @@ void makeCommandLine(void) { strcat(commandBuffer, " "); strcat(commandBuffer, objectTable[commandVar3[0]].name); - strcat(commandBuffer, " sur"); + strcat(commandBuffer, " "); + strcat(commandBuffer, commandPrepositionOn); } } else { if (playerCommand == 2) { |