diff --git a/engines/cine/cine.cpp b/engines/cine/cine.cpp index 643f40667de..8f0ebd22309 100644 --- a/engines/cine/cine.cpp +++ b/engines/cine/cine.cpp @@ -188,6 +188,7 @@ int gameType; static void initialize() { uint16 i; + initLanguage(Common::parseLanguage(ConfMan.get("language"))); init_video(); textDataPtr = (byte *)malloc(8000); diff --git a/engines/cine/various.cpp b/engines/cine/various.cpp index e6ed63b1764..1c705e60586 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) { diff --git a/engines/cine/various.h b/engines/cine/various.h index a232c53b3f2..e255c353297 100644 --- a/engines/cine/various.h +++ b/engines/cine/various.h @@ -36,6 +36,8 @@ extern int gameType; typedef char commandeType[20]; +void initLanguage(Common::Language lang); + int16 makeMenuChoice(const commandeType commandList[], uint16 height, uint16 X, uint16 Y, uint16 width); int16 makeMenuChoice2(const commandeType commandList[], uint16 height, uint16 X, uint16 Y, uint16 width);