aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
authorEugene Sandulenko2018-06-18 01:27:53 +0200
committerBastien Bouclet2018-06-29 13:31:54 +0200
commit23c889db4473815686cf5410662a0e32ae68abeb (patch)
treea6c95f1f6053cdb3f25a782b130d629c22790fde /engines
parentdb359f0f0e496d3373b3b2f3a747aaabf5fc0498 (diff)
downloadscummvm-rg350-23c889db4473815686cf5410662a0e32ae68abeb.tar.gz
scummvm-rg350-23c889db4473815686cf5410662a0e32ae68abeb.tar.bz2
scummvm-rg350-23c889db4473815686cf5410662a0e32ae68abeb.zip
MOHAWK: RIVEN: Localize menus
Diffstat (limited to 'engines')
-rw-r--r--engines/mohawk/riven_stacks/aspit.cpp35
1 files changed, 29 insertions, 6 deletions
diff --git a/engines/mohawk/riven_stacks/aspit.cpp b/engines/mohawk/riven_stacks/aspit.cpp
index cba7d404b3..c4ae09684c 100644
--- a/engines/mohawk/riven_stacks/aspit.cpp
+++ b/engines/mohawk/riven_stacks/aspit.cpp
@@ -69,11 +69,19 @@ ASpit::ASpit(MohawkEngine_Riven *vm) :
registerName(kExternalCommandNames, kExternalSaveGame, "xaSaveGame");
}
-static const char *menuItems[] = {
- "SETUP",
- "START NEW GAME",
- "START SAVED GAME",
- "SAVE GAME"
+struct MenuItemText {
+ int language;
+ const char *items[4];
+} static const menuItems[] = {
+ { Common::EN_ANY, { "SETUP", "START NEW GAME", "START SAVED GAME", "SAVE GAME" } },
+ { Common::DE_DEU, { "SETUP", "SPIELEN", "SPIELSTAND LADEN", "SPIEL SPEICHERN" } },
+ { Common::ES_ESP, { "IMAGEN", "IR A RIVEN", "CARGAR JUEGO", "GUARDAR JUEGO" } },
+ { Common::FR_FRA, { "CONFIG", "JOUER RIVEN", "CHARGEMENT DU JEU", "JEU SAUVEGARDER" } },
+ { Common::IT_ITA, { "CONF.", "GIOCA", "CARICA GIOCO", "SALVA IL GIOCO" } },
+ { Common::RU_RUS, { "УСТАНОВКИ", "СТАРТ", "ПРОДОЛЖИТЬ ИГРУ", "СОХРАНИТЬ ИГРУ" } },
+ { Common::JA_JPN, { "SETUP", "PLAY RIVEN", "START SAVED GAME", "SAVE GAME" } },
+ { Common::PL_POL, { "USTAWIENIA", "GRAJ W RIVEN", "ZAŁADUJ GRĘ", "ZAPISZ GRĘ" } },
+ { -1, { 0 } }
};
void ASpit::xastartupbtnhide(const ArgumentArray &args) {
@@ -103,6 +111,19 @@ void ASpit::xastartupbtnhide(const ArgumentArray &args) {
font = FontMan.getFontByUsage(Graphics::FontManager::kBigGUIFont);
}
+ int lang = -1;
+ for (int i = 0; menuItems[i].language != -1; i++) {
+ if (menuItems[i].language == _vm->getLanguage()) {
+ lang = i;
+ break;
+ }
+ }
+
+ if (lang == -1) {
+ warning("Unsupported menu language, falling back to English");
+ lang = 0;
+ }
+
struct MenuItem {
uint16 blstId;
};
@@ -129,7 +150,9 @@ void ASpit::xastartupbtnhide(const ArgumentArray &args) {
uint32 textColor = surface.format.RGBToColor(164, 164, 164);
- font->drawString(&surface, menuItems[i], 0, 0, surface.w, textColor);
+ Common::U32String str = Common::convertUtf8ToUtf32(menuItems[lang].items[i]);
+
+ font->drawString(&surface, str, 0, 0, surface.w, textColor);
_vm->_gfx->copySurfaceToScreen(&surface, hotspotRect.left, hotspotRect.top);
surface.free();