mirror of
https://github.com/libretro/scummvm.git
synced 2025-02-24 13:13:58 +00:00
Introduced a static string list for language dependant strings, and changed the options and inventory menus to use it
svn-id: r36051
This commit is contained in:
parent
a27f4203e0
commit
d3319ad6a8
@ -29,6 +29,7 @@
|
||||
|
||||
#include "cruise/cruise_main.h"
|
||||
#include "cruise/cell.h"
|
||||
#include "cruise/staticres.h"
|
||||
|
||||
namespace Cruise {
|
||||
|
||||
@ -774,7 +775,8 @@ int getObjectClass(int overlayIdx, int objIdx) {
|
||||
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)
|
||||
|
@ -24,6 +24,7 @@
|
||||
*/
|
||||
|
||||
#include "cruise/cruise_main.h"
|
||||
#include "cruise/staticres.h"
|
||||
|
||||
namespace Cruise {
|
||||
|
||||
@ -235,16 +236,19 @@ int playerMenu(int menuX, int menuY) {
|
||||
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]);
|
||||
|
||||
|
@ -27,6 +27,7 @@ MODULE_OBJS := \
|
||||
saveload.o \
|
||||
script.o \
|
||||
stack.o \
|
||||
staticres.o \
|
||||
various.o \
|
||||
vars.o \
|
||||
volume.o
|
||||
|
50
engines/cruise/staticres.cpp
Normal file
50
engines/cruise/staticres.cpp
Normal file
@ -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
|
39
engines/cruise/staticres.h
Normal file
39
engines/cruise/staticres.h
Normal file
@ -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
|
Loading…
x
Reference in New Issue
Block a user