[Scummvm-cvs-logs] SF.net SVN: scummvm: [21682] scummvm/trunk/engines/cine
eriktorbjorn at users.sourceforge.net
eriktorbjorn at users.sourceforge.net
Sat Apr 8 00:52:01 CEST 2006
Revision: 21682
Author: eriktorbjorn
Date: 2006-04-08 00:50:47 -0700 (Sat, 08 Apr 2006)
ViewCVS: http://svn.sourceforge.net/scummvm/?rev=21682&view=rev
Log Message:
-----------
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.
Modified Paths:
--------------
scummvm/trunk/engines/cine/cine.cpp
scummvm/trunk/engines/cine/various.cpp
scummvm/trunk/engines/cine/various.h
Modified: scummvm/trunk/engines/cine/cine.cpp
===================================================================
--- scummvm/trunk/engines/cine/cine.cpp 2006-04-08 07:16:14 UTC (rev 21681)
+++ scummvm/trunk/engines/cine/cine.cpp 2006-04-08 07:50:47 UTC (rev 21682)
@@ -188,6 +188,7 @@
static void initialize() {
uint16 i;
+ initLanguage(Common::parseLanguage(ConfMan.get("language")));
init_video();
textDataPtr = (byte *)malloc(8000);
Modified: scummvm/trunk/engines/cine/various.cpp
===================================================================
--- scummvm/trunk/engines/cine/various.cpp 2006-04-08 07:16:14 UTC (rev 21681)
+++ scummvm/trunk/engines/cine/various.cpp 2006-04-08 07:50:47 UTC (rev 21682)
@@ -131,28 +131,78 @@
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 @@
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 @@
strcat(commandBuffer, " ");
strcat(commandBuffer, objectTable[commandVar3[0]].name);
- strcat(commandBuffer, " sur");
+ strcat(commandBuffer, " ");
+ strcat(commandBuffer, commandPrepositionOn);
}
} else {
if (playerCommand == 2) {
Modified: scummvm/trunk/engines/cine/various.h
===================================================================
--- scummvm/trunk/engines/cine/various.h 2006-04-08 07:16:14 UTC (rev 21681)
+++ scummvm/trunk/engines/cine/various.h 2006-04-08 07:50:47 UTC (rev 21682)
@@ -36,6 +36,8 @@
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);
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
More information about the Scummvm-git-logs
mailing list