[Scummvm-cvs-logs] SF.net SVN: scummvm:[36051] scummvm/trunk/engines/cruise
dreammaster at users.sourceforge.net
dreammaster at users.sourceforge.net
Sun Jan 25 06:49:18 CET 2009
Revision: 36051
http://scummvm.svn.sourceforge.net/scummvm/?rev=36051&view=rev
Author: dreammaster
Date: 2009-01-25 05:49:18 +0000 (Sun, 25 Jan 2009)
Log Message:
-----------
Introduced a static string list for language dependant strings, and changed the options and inventory menus to use it
Modified Paths:
--------------
scummvm/trunk/engines/cruise/cruise_main.cpp
scummvm/trunk/engines/cruise/menu.cpp
scummvm/trunk/engines/cruise/module.mk
Added Paths:
-----------
scummvm/trunk/engines/cruise/staticres.cpp
scummvm/trunk/engines/cruise/staticres.h
Modified: scummvm/trunk/engines/cruise/cruise_main.cpp
===================================================================
--- scummvm/trunk/engines/cruise/cruise_main.cpp 2009-01-25 05:44:18 UTC (rev 36050)
+++ scummvm/trunk/engines/cruise/cruise_main.cpp 2009-01-25 05:49:18 UTC (rev 36051)
@@ -29,6 +29,7 @@
#include "cruise/cruise_main.h"
#include "cruise/cell.h"
+#include "cruise/staticres.h"
namespace Cruise {
@@ -774,7 +775,8 @@
void buildInventory(int X, int Y) {
menuStruct *pMenu;
- pMenu = createMenu(X, Y, "Inventaire");
+ const char **sl = getStringList();
+ pMenu = createMenu(X, Y, sl[SL_INVENTORY]);
menuTable[1] = pMenu;
if (pMenu == NULL)
Modified: scummvm/trunk/engines/cruise/menu.cpp
===================================================================
--- scummvm/trunk/engines/cruise/menu.cpp 2009-01-25 05:44:18 UTC (rev 36050)
+++ scummvm/trunk/engines/cruise/menu.cpp 2009-01-25 05:49:18 UTC (rev 36051)
@@ -24,6 +24,7 @@
*/
#include "cruise/cruise_main.h"
+#include "cruise/staticres.h"
namespace Cruise {
@@ -235,16 +236,19 @@
linkedRelation = 0; */
freeDisk();
- menuTable[0] = createMenu(menuX, menuY, "Menu Joueur");
+ // Get the correct string set to use
+ const char **sl = getStringList();
+
+ menuTable[0] = createMenu(menuX, menuY, sl[SL_MENU]);
ASSERT(menuTable[0]);
- //addSelectableMenuEntry(0, 3, menuTable[0], 1, -1, "Lecteur de Sauvegarde");
+ //addSelectableMenuEntry(0, 3, menuTable[0], 1, -1, "Save game disk");
if (userEnabled) {
- addSelectableMenuEntry(0, 4, menuTable[0], 1, -1, "Sauvegarde");
+ addSelectableMenuEntry(0, 4, menuTable[0], 1, -1, sl[SL_SAVE]);
}
- addSelectableMenuEntry(0, 5, menuTable[0], 1, -1, "Chargement");
- addSelectableMenuEntry(0, 6, menuTable[0], 1, -1, "Recommencer le jeu");
- addSelectableMenuEntry(0, 7, menuTable[0], 1, -1, "Quitter");
+ addSelectableMenuEntry(0, 5, menuTable[0], 1, -1, sl[SL_LOAD]);
+ addSelectableMenuEntry(0, 6, menuTable[0], 1, -1, sl[SL_RESTART]);
+ addSelectableMenuEntry(0, 7, menuTable[0], 1, -1, sl[SL_QUIT]);
retourMenu = processMenu(menuTable[0]);
Modified: scummvm/trunk/engines/cruise/module.mk
===================================================================
--- scummvm/trunk/engines/cruise/module.mk 2009-01-25 05:44:18 UTC (rev 36050)
+++ scummvm/trunk/engines/cruise/module.mk 2009-01-25 05:49:18 UTC (rev 36051)
@@ -27,6 +27,7 @@
saveload.o \
script.o \
stack.o \
+ staticres.o \
various.o \
vars.o \
volume.o
Added: scummvm/trunk/engines/cruise/staticres.cpp
===================================================================
--- scummvm/trunk/engines/cruise/staticres.cpp (rev 0)
+++ scummvm/trunk/engines/cruise/staticres.cpp 2009-01-25 05:49:18 UTC (rev 36051)
@@ -0,0 +1,50 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ * $URL$
+ * $Id$
+ *
+ */
+
+#include "cruise/staticres.h"
+#include "cruise/cruise.h"
+#include "common/util.h"
+
+namespace Cruise {
+
+const char *english_strings[] = {
+ "Player Menu", "Save", "Load", "Start again", "Quit", "Inventory"
+};
+const char *french_strings[] = {
+ "Menu Joueur", "Sauvegarde", "Chargement", "Recommencer le jeu", "Quitter", "Inventaire"
+};
+
+const char **getStringList() {
+ switch (_vm->getLanguage()) {
+ case Common::EN_ANY:
+ return english_strings;
+ case Common::FR_FRA:
+ return french_strings;
+ default:
+ error("Unknown language encountered");
+ }
+}
+
+} // End of namespace Cruise
Property changes on: scummvm/trunk/engines/cruise/staticres.cpp
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Added: svn:keywords
+ Date Rev Author URL Id
Added: svn:eol-style
+ native
Added: scummvm/trunk/engines/cruise/staticres.h
===================================================================
--- scummvm/trunk/engines/cruise/staticres.h (rev 0)
+++ scummvm/trunk/engines/cruise/staticres.h 2009-01-25 05:49:18 UTC (rev 36051)
@@ -0,0 +1,39 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ * $URL$
+ * $Id$
+ *
+ */
+
+#ifndef CRUISE_STATICRES_H
+#define CRUISE_STATICRES_H
+
+namespace Cruise {
+
+enum MenuConstants {
+ SL_MENU, SL_SAVE, SL_LOAD, SL_RESTART, SL_QUIT, SL_INVENTORY
+};
+
+const char **getStringList();
+
+} // End of namespace Cruise
+
+#endif
Property changes on: scummvm/trunk/engines/cruise/staticres.h
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Added: svn:keywords
+ Date Rev Author URL Id
Added: svn:eol-style
+ native
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