diff options
| author | Bendegúz Nagy | 2016-08-15 20:25:40 +0200 |
|---|---|---|
| committer | Bendegúz Nagy | 2016-08-26 23:02:22 +0200 |
| commit | f7ad6488e36a2895dd77b26c0e94671a0b50abb6 (patch) | |
| tree | e439035f3a6d418edbb8e18c8345e4e2997ba746 | |
| parent | e75c07d9a2a8d6e67d35d4699c2603abd81a4ca0 (diff) | |
| download | scummvm-rg350-f7ad6488e36a2895dd77b26c0e94671a0b50abb6.tar.gz scummvm-rg350-f7ad6488e36a2895dd77b26c0e94671a0b50abb6.tar.bz2 scummvm-rg350-f7ad6488e36a2895dd77b26c0e94671a0b50abb6.zip | |
DM: Add localization
| -rw-r--r-- | engines/dm/TODOs/todo.txt | 1 | ||||
| -rw-r--r-- | engines/dm/champion.cpp | 63 | ||||
| -rw-r--r-- | engines/dm/champion.h | 4 | ||||
| -rw-r--r-- | engines/dm/dm.cpp | 42 | ||||
| -rw-r--r-- | engines/dm/eventman.cpp | 47 | ||||
| -rw-r--r-- | engines/dm/inventory.cpp | 228 | ||||
| -rw-r--r-- | engines/dm/inventory.h | 5 | ||||
| -rw-r--r-- | engines/dm/loadsave.cpp | 45 | ||||
| -rw-r--r-- | engines/dm/menus.cpp | 73 | ||||
| -rw-r--r-- | engines/dm/objectman.cpp | 17 |
10 files changed, 422 insertions, 103 deletions
diff --git a/engines/dm/TODOs/todo.txt b/engines/dm/TODOs/todo.txt index 6a4429a5f3..5509e69bd0 100644 --- a/engines/dm/TODOs/todo.txt +++ b/engines/dm/TODOs/todo.txt @@ -22,7 +22,6 @@ Todo: Code stuff todo: Complete stub methods(blitShrink, etc.) Add scroller - Add localization Save file f433_processCommand140_saveGame fails silently, add error checking Clean up f113_drawField diff --git a/engines/dm/champion.cpp b/engines/dm/champion.cpp index 11371dfc7c..35b949b3bd 100644 --- a/engines/dm/champion.cpp +++ b/engines/dm/champion.cpp @@ -40,7 +40,6 @@ namespace DM { -const char *g417_baseSkillName[4] = {"FIGHTER", "NINJA", "PRIEST", "WIZARD"}; // TODO: localization Box gBoxMouth = Box(55, 72, 12, 29); // @ G0048_s_Graphic562_Box_Mouth Box gBoxEye = Box(11, 28, 12, 29); // @ G0049_s_Graphic562_Box_Eye @@ -96,6 +95,26 @@ uint16 gSlotMasks[38] = { // @ G0038_ai_Graphic562_SlotMasks Box gBoxChampionPortrait = Box(0, 31, 0, 28); // @ G0047_s_Graphic562_Box_ChampionPortrait +const char *g417_baseSkillName[4]; + +void ChampionMan::initConstants() { + { + static const char *g417_baseSkillName_EN_ANY[4] = {"FIGHTER", "NINJA", "PRIEST", "WIZARD"}; + static const char *g417_baseSkillName_GR_GRE[4] = {"KAEMPFER", "NINJA", "PRIESTER", "MAGIER"}; + static const char *g417_baseSkillName_FR_FRA[4] = {"GUERRIER", "NINJA", "PRETRE", "SORCIER"}; + + const char **g417_byLanguage; + switch (_vm->getGameLanguage()) { // localized + default: + case Common::EN_ANY: g417_byLanguage = g417_baseSkillName_EN_ANY; break; + case Common::GR_GRE: g417_byLanguage = g417_baseSkillName_GR_GRE; break; + case Common::FR_FRA: g417_byLanguage = g417_baseSkillName_FR_FRA; break; + } + for (int i = 0; i < 4; ++i) + g417_baseSkillName[i] = g417_byLanguage[i]; + } +} + ChampionMan::ChampionMan(DMEngine *vm) : _vm(vm) { for (uint16 i = 0; i < 4; ++i) { _g409_championPendingDamage[i] = 0; @@ -207,6 +226,7 @@ uint16 ChampionMan::M70_handSlotIndex(uint16 slotBoxIndex) { return slotBoxIndex & 0x1; } + Common::String ChampionMan::f288_getStringFromInteger(uint16 val, bool padding, uint16 paddingCharCount) { Common::String valToStr = Common::String::format("%d", val); Common::String result; @@ -967,10 +987,22 @@ void ChampionMan::f304_addSkillExperience(uint16 champIndex, uint16 skillIndex, _vm->_textMan->f51_messageAreaPrintLineFeed(); Color curChampionColor = g46_ChampionColor[champIndex]; _vm->_textMan->f47_messageAreaPrintMessage(curChampionColor, curChampion->_name); - // TODO: localization - _vm->_textMan->f47_messageAreaPrintMessage(curChampionColor, " JUST GAINED A "); + + switch (_vm->getGameLanguage()) { // localized + default: + case Common::EN_ANY: _vm->_textMan->f47_messageAreaPrintMessage(curChampionColor, " JUST GAINED A "); break; + case Common::GR_GRE: _vm->_textMan->f47_messageAreaPrintMessage(curChampionColor, " HAT SOEBEN STUFE"); break; + case Common::FR_FRA: _vm->_textMan->f47_messageAreaPrintMessage(curChampionColor, " VIENT DE DEVENIR "); break; + } + _vm->_textMan->f47_messageAreaPrintMessage(curChampionColor, g417_baseSkillName[baseSkillIndex]); - _vm->_textMan->f47_messageAreaPrintMessage(curChampionColor, " LEVEL!"); + + switch (_vm->getGameLanguage()) { // localized + default: + case Common::EN_ANY: _vm->_textMan->f47_messageAreaPrintMessage(curChampionColor, "!"); break; + case Common::GR_GRE: _vm->_textMan->f47_messageAreaPrintMessage(curChampionColor, " LEVEL!"); break; + case Common::FR_FRA: _vm->_textMan->f47_messageAreaPrintMessage(curChampionColor, " ERREICHT!"); break; + } } } } @@ -2149,17 +2181,30 @@ void ChampionMan::f292_drawChampionState(ChampionIndex champIndex) { else loadColor = k13_ColorLightestGray; - // TODO: localization - _vm->_textMan->f52_printToViewport(104, 132, loadColor, "LOAD "); + switch (_vm->getGameLanguage()) { // localized + default: + case Common::EN_ANY: _vm->_textMan->f52_printToViewport(104, 132, loadColor, "LOAD "); break; + case Common::GR_GRE: _vm->_textMan->f52_printToViewport(104, 132, loadColor, "LAST "); break; + case Common::FR_FRA: _vm->_textMan->f52_printToViewport(104, 132, loadColor, "CHARGE "); break; + } + maxLoad = curChampion->_load / 10; strcpy(_vm->_g353_stringBuildBuffer, f288_getStringFromInteger(maxLoad, true, 3).c_str()); - strcat(_vm->_g353_stringBuildBuffer, "."); + + switch (_vm->getGameLanguage()) { // localized + default: + case Common::EN_ANY: strcat(_vm->_g353_stringBuildBuffer, "."); break; + case Common::GR_GRE: strcat(_vm->_g353_stringBuildBuffer, ","); break; + case Common::FR_FRA: strcat(_vm->_g353_stringBuildBuffer, "KG,"); break; + } + maxLoad = curChampion->_load - (maxLoad * 10); strcat(_vm->_g353_stringBuildBuffer, f288_getStringFromInteger(maxLoad, false, 1).c_str()); strcat(_vm->_g353_stringBuildBuffer, "/"); maxLoad = (f309_getMaximumLoad(curChampion) + 5) / 10; strcat(_vm->_g353_stringBuildBuffer, f288_getStringFromInteger(maxLoad, true, 3).c_str()); - strcat(_vm->_g353_stringBuildBuffer, " KG"); + warning(false, "Possibly wrong localization"); + strcat(_vm->_g353_stringBuildBuffer, " KG"); // this line _vm->_textMan->f52_printToViewport(148, 132, loadColor, _vm->_g353_stringBuildBuffer); setFlag(championAttributes, k0x4000_ChampionAttributeViewport); } @@ -2267,7 +2312,7 @@ void ChampionMan::f291_drawSlot(uint16 champIndex, int16 slotIndex) { _vm->_displayMan->_g578_useByteBoxCoordinates = false; if (isInventoryChamp) { _vm->_displayMan->f132_blitToBitmap(_vm->_displayMan->f489_getNativeBitmapOrGraphic(nativeBitmapIndex), - _vm->_displayMan->_g296_bitmapViewport, box, 0, 0, 16, k112_byteWidthViewport, + _vm->_displayMan->_g296_bitmapViewport, box, 0, 0, 16, k112_byteWidthViewport, k12_ColorDarkestGray, _vm->_displayMan->getPixelHeight(nativeBitmapIndex), k136_heightViewport); } else { _vm->_displayMan->f132_blitToBitmap(_vm->_displayMan->f489_getNativeBitmapOrGraphic(nativeBitmapIndex), diff --git a/engines/dm/champion.h b/engines/dm/champion.h index a94bdcca8a..7f726b6fcd 100644 --- a/engines/dm/champion.h +++ b/engines/dm/champion.h @@ -453,7 +453,6 @@ public: #define k0x8000_maskUseSharpDefense 0x8000 // @ MASK0x8000_USE_SHARP_DEFENSE #define k0x8000_mergeCycles 0x8000 // @ MASK0x8000_MERGE_CYCLES -// TODO: localization extern const char *g417_baseSkillName[4]; // @ G0417_apc_BaseSkillNames #define k0_spellCastFailure 0 // @ C0_SPELL_CAST_FAILURE @@ -512,6 +511,9 @@ class ChampionMan { uint16 M70_handSlotIndex(uint16 slotBoxIndex);// @ M70_HAND_SLOT_INDEX int16 _g410_championPendingWounds[4]; // @ G0410_ai_ChampionPendingWounds int16 _g409_championPendingDamage[4]; // @ G0409_ai_ChampionPendingDamage + + void initConstants(); + public: Champion _gK71_champions[4]; // @ K0071_as_Champions diff --git a/engines/dm/dm.cpp b/engines/dm/dm.cpp index 13c8c63d21..e02f959ce3 100644 --- a/engines/dm/dm.cpp +++ b/engines/dm/dm.cpp @@ -554,9 +554,35 @@ void DMEngine::f441_processEntrance() { } void DMEngine::f444_endGame(bool doNotDrawCreditsOnly) { - // TODO: localization - static Box restartOuterBox = Box(103, 217, 145, 159); - static Box restartInnerBox = Box(105, 215, 147, 157); + + static Box G0013_s_Graphic562_Box_Endgame_Restart_Outer_EN_ANY = {103, 217, 145, 159}; + static Box G0014_s_Graphic562_Box_Endgame_Restart_Inner_EN_ANY = {105, 215, 147, 157}; + + static Box G0013_s_Graphic562_Box_Endgame_Restart_Outer_GR_GRE = {82, 238, 145, 159}; + static Box G0014_s_Graphic562_Box_Endgame_Restart_Inner_GR_GRE = {84, 236, 147, 157}; + + static Box G0013_s_Graphic562_Box_Endgame_Restart_Outer_FR_FRA = {100, 220, 145, 159}; + static Box G0014_s_Graphic562_Box_Endgame_Restart_Inner_FR_FRA = {102, 218, 147, 157}; + + Box restartOuterBox; + Box restartInnerBox; + + switch (getGameLanguage()) { // localized + default: + case Common::EN_ANY: + restartOuterBox = G0013_s_Graphic562_Box_Endgame_Restart_Outer_EN_ANY; + restartInnerBox = G0014_s_Graphic562_Box_Endgame_Restart_Inner_EN_ANY; + break; + case Common::GR_GRE: + restartOuterBox = G0013_s_Graphic562_Box_Endgame_Restart_Outer_GR_GRE; + restartInnerBox = G0014_s_Graphic562_Box_Endgame_Restart_Inner_GR_GRE; + break; + case Common::FR_FRA: + restartOuterBox = G0013_s_Graphic562_Box_Endgame_Restart_Outer_FR_FRA; + restartInnerBox = G0014_s_Graphic562_Box_Endgame_Restart_Inner_FR_FRA; + break; + } + static Box theEndBox = Box(120, 199, 95, 108); static Box championMirrorBox = Box(11, 74, 7, 49); static Box championPortraitBox = Box(27, 58, 13, 41); @@ -647,8 +673,14 @@ T0444017: _displayMan->_g578_useByteBoxCoordinates = false; _displayMan->D24_fillScreenBox(restartOuterBox, k12_ColorDarkestGray); _displayMan->D24_fillScreenBox(restartInnerBox, k0_ColorBlack); - // TODO: localization - _textMan->f53_printToLogicalScreen(110, 154, k4_ColorCyan, k0_ColorBlack, "RESTART THIS GAME"); + + switch (getGameLanguage()) { // localized + default: + case Common::EN_ANY: _textMan->f53_printToLogicalScreen(110, 154, k4_ColorCyan, k0_ColorBlack, "RESTART THIS GAME"); break; + case Common::GR_GRE: _textMan->f53_printToLogicalScreen(110, 154, k4_ColorCyan, k0_ColorBlack, "DIESES SPIEL NEU STARTEN"); break; + case Common::FR_FRA: _textMan->f53_printToLogicalScreen(110, 154, k4_ColorCyan, k0_ColorBlack, "RECOMMENCER CE JEU"); break; + } + curPalette[1] = D03_RGB_PINK; curPalette[4] = D09_RGB_WHITE; _eventMan->_g441_primaryMouseInput = g446_PrimaryMouseInput_RestartGame; diff --git a/engines/dm/eventman.cpp b/engines/dm/eventman.cpp index c2cb3cc3e6..4a51f272e4 100644 --- a/engines/dm/eventman.cpp +++ b/engines/dm/eventman.cpp @@ -789,9 +789,22 @@ void EventManager::f380_processCommandQueue() { _vm->_g301_gameTimeTicking = false; _vm->_menuMan->f456_drawDisabledMenu(); _vm->_displayMan->f134_fillBitmap(_vm->_displayMan->_g296_bitmapViewport, k0_ColorBlack, 112, 136); - // TODO: localization - _vm->_textMan->f40_printTextToBitmap(_vm->_displayMan->_g296_bitmapViewport, k112_byteWidthViewport, 81, 69, k4_ColorCyan, k0_ColorBlack, - "GAME FROZEN", k136_heightViewport); + + switch (_vm->getGameLanguage()) { // localized + default: + case Common::EN_ANY: + _vm->_textMan->f40_printTextToBitmap(_vm->_displayMan->_g296_bitmapViewport, k112_byteWidthViewport, 81, 69, k4_ColorCyan, k0_ColorBlack, + "GAME FROZEN", k136_heightViewport); + break; + case Common::GR_GRE: + _vm->_textMan->f40_printTextToBitmap(_vm->_displayMan->_g296_bitmapViewport, k112_byteWidthViewport, 66, 69, k4_ColorCyan, k0_ColorBlack, + "SPIEL ANGEHALTEN", k136_heightViewport); + break; + case Common::FR_FRA: + _vm->_textMan->f40_printTextToBitmap(_vm->_displayMan->_g296_bitmapViewport, k112_byteWidthViewport, 84, 69, k4_ColorCyan, k0_ColorBlack, + "JEU BLOQUE", k136_heightViewport); + break; + } _vm->_displayMan->f97_drawViewport(k2_viewportAsBeforeSleepOrFreezeGame); primaryMouseInputBackup = _g441_primaryMouseInput; secondaryMouseInputBackup = _g442_secondaryMouseInput; @@ -1197,7 +1210,19 @@ void EventManager::f282_commandProcessCommands160To162ClickInResurrectReincarnat _vm->_textMan->f51_messageAreaPrintLineFeed(); Color champColor = g46_ChampionColor[championIndex]; _vm->_textMan->f47_messageAreaPrintMessage(champColor, champ->_name); - _vm->_textMan->f47_messageAreaPrintMessage(champColor, (commandType == k160_CommandClickInPanelResurrect) ? " RESURRECTED." : " REINCARNATED."); // TODO: localization + + switch (_vm->getGameLanguage()) { // localized + default: + case Common::EN_ANY: + _vm->_textMan->f47_messageAreaPrintMessage(champColor, (commandType == k160_CommandClickInPanelResurrect) ? " RESURRECTED." : " REINCARNATED."); + break; + case Common::GR_GRE: + _vm->_textMan->f47_messageAreaPrintMessage(champColor, (commandType == k160_CommandClickInPanelResurrect) ? " VOM TODE ERWECKT." : " REINKARNIERT."); + break; + case Common::FR_FRA: + _vm->_textMan->f47_messageAreaPrintMessage(champColor, (commandType == k160_CommandClickInPanelResurrect) ? " RESSUSCITE." : " REINCARNE."); + break; + } invMan.f355_toggleInventory(k4_ChampionCloseInventory); _vm->_menuMan->f457_drawEnabledMenus(); @@ -1293,7 +1318,19 @@ bool EventManager::f360_hasPendingClick(Common::Point& point, MouseButton button } void EventManager::f379_drawSleepScreen() { - _vm->_displayMan->f134_fillBitmap(_vm->_displayMan->_g296_bitmapViewport, k0_ColorBlack, 112, 136); // TODO: localization + _vm->_displayMan->f134_fillBitmap(_vm->_displayMan->_g296_bitmapViewport, k0_ColorBlack, 112, 136); + switch (_vm->getGameLanguage()) { // localized + default: + case Common::EN_ANY: + _vm->_textMan->f40_printTextToBitmap(_vm->_displayMan->_g296_bitmapViewport, k112_byteWidthViewport, 93, 69, k4_ColorCyan, k0_ColorBlack, "WAKE UP", k136_heightViewport); + break; + case Common::GR_GRE: + _vm->_textMan->f40_printTextToBitmap(_vm->_displayMan->_g296_bitmapViewport, k112_byteWidthViewport, 96, 69, k4_ColorCyan, k0_ColorBlack, "WECKEN", k136_heightViewport); + break; + case Common::FR_FRA: + _vm->_textMan->f40_printTextToBitmap(_vm->_displayMan->_g296_bitmapViewport, k112_byteWidthViewport, 72, 69, k4_ColorCyan, k0_ColorBlack, "REVEILLEZ-VOUS", k136_heightViewport); + break; + } } void EventManager::f357_discardAllInput() { diff --git a/engines/dm/inventory.cpp b/engines/dm/inventory.cpp index c1798e9193..8a25ecda15 100644 --- a/engines/dm/inventory.cpp +++ b/engines/dm/inventory.cpp @@ -44,23 +44,27 @@ Box g35_BoxFood = Box(112, 159, 60, 68); // @ G0035_s_Graphic562_Box_Food Box g36_BoxWater = Box(112, 159, 83, 91); // @ G0036_s_Graphic562_Box_Water Box g37_BoxPoisoned = Box(112, 207, 105, 119); // @ G0037_s_Graphic562_Box_Poisoned -// TODO: localization -char* G0428_apc_SkillLevelNames[15] = { // @ G0428_apc_SkillLevelNames - "NEOPHYTE", - "NOVICE", - "APPRENTICE", - "JOURNEYMAN", - "CRAFTSMAN", - "ARTISAN", - "ADEPT", - "EXPERT", - "` MASTER", - "a MASTER", - "b MASTER", - "c MASTER", - "d MASTER", - "e MASTER", - "ARCHMASTER"}; +char* G0428_apc_SkillLevelNames[15]; + +void InventoryMan::initConstants() { + { + static const char* G0428_apc_SkillLevelNames_EN_ANY[15] = {"NEOPHYTE", "NOVICE", "APPRENTICE", "JOURNEYMAN", "CRAFTSMAN", + "ARTISAN", "ADEPT", "EXPERT", "` MASTER", "a MASTER","b MASTER", "c MASTER", "d MASTER", "e MASTER", "ARCHMASTER"}; + static const char* G0428_apc_SkillLevelNames_GR_GRE[15] = {"ANFAENGER", "NEULING", "LEHRLING", "ARBEITER", "GESELLE", "HANDWERKR", "FACHMANN", + "EXPERTE", "` MEISTER", "a MEISTER", "b MEISTER", "c MEISTER", "d MEISTER", "e MEISTER", "ERZMEISTR"}; + static const char* G0428_apc_SkillLevelNames_FR_FRA[15] = { "NEOPHYTE", "NOVICE", "APPRENTI", "COMPAGNON", "ARTISAN", "PATRON", + "ADEPTE", "EXPERT", "MAITRE '", "MAITRE a", "MAITRE b", "MAITRE c", "MAITRE d", "MAITRE e", "SUR-MAITRE"}; + const char **g428_byLanguage; + switch (_vm->getGameLanguage()) { // localized + default: + case Common::EN_ANY: g428_byLanguage = G0428_apc_SkillLevelNames_EN_ANY; break; + case Common::GR_GRE: g428_byLanguage = G0428_apc_SkillLevelNames_GR_GRE; break; + case Common::FR_FRA: g428_byLanguage = G0428_apc_SkillLevelNames_FR_FRA; break; + } + for (int i = 0; i < 15; ++i) + g417_baseSkillName[i] = g428_byLanguage[i]; + } +} InventoryMan::InventoryMan(DMEngine *vm) : _vm(vm) { _g432_inventoryChampionOrdinal = 0; @@ -124,8 +128,23 @@ void InventoryMan::f355_toggleInventory(ChampionIndex championIndex) { if (_vm->_championMan->_g299_candidateChampionOrdinal) { _vm->_displayMan->f135_fillBoxBitmap(_vm->_displayMan->_g296_bitmapViewport, g41_BoxFloppyZzzCross, k12_ColorDarkestGray, k112_byteWidthViewport, k136_heightViewport); } - _vm->_textMan->f52_printToViewport(5, 116, k13_ColorLightestGray, "HEALTH"); // TODO: localization - _vm->_textMan->f52_printToViewport(5, 124, k13_ColorLightestGray, "STAMINA"); + + switch (_vm->getGameLanguage()) { // localized + default: + case Common::EN_ANY: + _vm->_textMan->f52_printToViewport(5, 116, k13_ColorLightestGray, "HEALTH"); + _vm->_textMan->f52_printToViewport(5, 124, k13_ColorLightestGray, "STAMINA"); + break; + case Common::GR_GRE: + _vm->_textMan->f52_printToViewport(5, 116, k13_ColorLightestGray, "GESUND"); + _vm->_textMan->f52_printToViewport(5, 124, k13_ColorLightestGray, "KRAFT"); + break; + case Common::FR_FRA: + _vm->_textMan->f52_printToViewport(5, 116, k13_ColorLightestGray, "SANTE"); + _vm->_textMan->f52_printToViewport(5, 124, k13_ColorLightestGray, "VIGUEUR"); + break; + } + _vm->_textMan->f52_printToViewport(5, 132, k13_ColorLightestGray, "MANA"); for (AL1102_ui_SlotIndex = k0_ChampionSlotReadyHand; AL1102_ui_SlotIndex < k30_ChampionSlotChest_1; AL1102_ui_SlotIndex++) { _vm->_championMan->f291_drawSlot(championIndex, AL1102_ui_SlotIndex); @@ -180,13 +199,24 @@ void InventoryMan::f345_drawPanelFoodWaterPoisoned() { Champion &champ = _vm->_championMan->_gK71_champions[_g432_inventoryChampionOrdinal]; f334_closeChest(); DisplayMan &dispMan = *_vm->_displayMan; - // TODO: localization - dispMan.f20_blitToViewport(_vm->_displayMan->f489_getNativeBitmapOrGraphic(k20_PanelEmptyIndice), - g32_BoxPanel, k72_byteWidth, k8_ColorRed, 73); - dispMan.f20_blitToViewport(_vm->_displayMan->f489_getNativeBitmapOrGraphic(k30_FoodLabelIndice), - g35_BoxFood, k24_byteWidth, k12_ColorDarkestGray, 9); - dispMan.f20_blitToViewport(_vm->_displayMan->f489_getNativeBitmapOrGraphic(k31_WaterLabelIndice), - g36_BoxWater, k24_byteWidth, k12_ColorDarkestGray, 9); + dispMan.f20_blitToViewport(_vm->_displayMan->f489_getNativeBitmapOrGraphic(k20_PanelEmptyIndice), g32_BoxPanel, k72_byteWidth, k8_ColorRed, 73); + + switch (_vm->getGameLanguage()) { // localized + default: + case Common::EN_ANY: + dispMan.f20_blitToViewport(_vm->_displayMan->f489_getNativeBitmapOrGraphic(k30_FoodLabelIndice), g35_BoxFood, k24_byteWidth, k12_ColorDarkestGray, 9); + dispMan.f20_blitToViewport(_vm->_displayMan->f489_getNativeBitmapOrGraphic(k31_WaterLabelIndice), g36_BoxWater, k24_byteWidth, k12_ColorDarkestGray, 9); + break; + case Common::GR_GRE: + dispMan.f20_blitToViewport(_vm->_displayMan->f489_getNativeBitmapOrGraphic(k30_FoodLabelIndice), g35_BoxFood, k32_byteWidth, k12_ColorDarkestGray, 9); + dispMan.f20_blitToViewport(_vm->_displayMan->f489_getNativeBitmapOrGraphic(k31_WaterLabelIndice), g36_BoxWater, k32_byteWidth, k12_ColorDarkestGray, 9); + break; + case Common::FR_FRA: + dispMan.f20_blitToViewport(_vm->_displayMan->f489_getNativeBitmapOrGraphic(k30_FoodLabelIndice), g35_BoxFood, k48_byteWidth, k12_ColorDarkestGray, 9); + dispMan.f20_blitToViewport(_vm->_displayMan->f489_getNativeBitmapOrGraphic(k31_WaterLabelIndice), g36_BoxWater, k24_byteWidth, k12_ColorDarkestGray, 9); + break; + } + if (champ._poisonEventCount) { dispMan.f20_blitToViewport(_vm->_displayMan->f489_getNativeBitmapOrGraphic(k32_PoisionedLabelIndice), g37_BoxPoisoned, k48_byteWidth, k12_ColorDarkestGray, 15); @@ -386,7 +416,14 @@ void InventoryMan::f336_buildObjectAttributeString(int16 potentialAttribMask, in if (identicalBitCount-- > 2) { strcat(destString, ", "); } else if (identicalBitCount == 1) { - strcat(destString, " AND "); // TODO: localization + + switch (_vm->getGameLanguage()) { // localized + default: + case Common::EN_ANY: strcat(destString, " AND "); break; + case Common::GR_GRE: strcat(destString, " UND "); break; + case Common::FR_FRA: strcat(destString, " ET "); break; + } + } } } @@ -454,7 +491,6 @@ void InventoryMan::f342_drawPanelObject(Thing thingToDraw, bool pressingEye) { TextMan &textMan = *_vm->_textMan; if (_vm->_g331_pressingEye || _vm->_g333_pressingMouth) { - warning(false, "BUG0_48 The contents of a chest are reorganized when an object with a statistic modifier is placed or removed on a champion"); f334_closeChest(); } @@ -475,9 +511,20 @@ void InventoryMan::f342_drawPanelObject(Thing thingToDraw, bool pressingEye) { char *descString = nullptr; char str[40]; if (iconIndex == k147_IconIndiceJunkChampionBones) { - strcpy(str, champMan._gK71_champions[((Junk *)rawThingPtr)->getChargeCount()]._name); // TODO: localization - strcat(str, " "); // TODO: localization - strcat(str, objMan._g352_objectNames[iconIndex]); // TODO: localization + switch (_vm->getGameLanguage()) { // localized + default: + case Common::EN_ANY: + case Common::GR_GRE: // german and english versions are the same + strcpy(str, champMan._gK71_champions[((Junk *)rawThingPtr)->getChargeCount()]._name); + strcat(str, " "); + strcat(str, objMan._g352_objectNames[iconIndex]); + break; + case Common::FR_FRA: + strcat(str, objMan._g352_objectNames[iconIndex]); + strcat(str, " "); + strcpy(str, champMan._gK71_champions[((Junk *)rawThingPtr)->getChargeCount()]._name); + break; + } descString = str; } else if ((thingType == k8_PotionThingType) @@ -495,7 +542,6 @@ void InventoryMan::f342_drawPanelObject(Thing thingToDraw, bool pressingEye) { textMan.f52_printToViewport(134, 68, k13_ColorLightestGray, descString); f332_drawIconToViewport(iconIndex, 111, 59); - char *attribString[4] = {"CONSUMABLE", "POISONED", "BROKEN", "CURSED"}; // TODO: localization _g422_objDescTextYpos = 87; @@ -509,7 +555,13 @@ void InventoryMan::f342_drawPanelObject(Thing thingToDraw, bool pressingEye) { if ((iconIndex >= k4_IconIndiceWeaponTorchUnlit) && (iconIndex <= k7_IconIndiceWeaponTorchLit) && (weapon->getChargeCount() == 0)) { - f335_drawPanelObjectDescriptionString("(BURNT OUT)"); // TODO: localization + + switch (_vm->getGameLanguage()) { // localized + default: + case Common::EN_ANY: f335_drawPanelObjectDescriptionString("(BURNT OUT)"); break; + case Common::GR_GRE: f335_drawPanelObjectDescriptionString("(AUSGEBRANNT)"); break; + case Common::FR_FRA: f335_drawPanelObjectDescriptionString("(CONSUME)"); break; + } } break; } @@ -529,26 +581,39 @@ void InventoryMan::f342_drawPanelObject(Thing thingToDraw, bool pressingEye) { Junk *junk = (Junk *)rawThingPtr; if ((iconIndex >= k8_IconIndiceJunkWater) && (iconIndex <= k9_IconIndiceJunkWaterSkin)) { potentialAttribMask = 0; - switch (junk->getChargeCount()) { - case 0: - descString = "(EMPTY)"; // TODO: localization - break; - case 1: - descString = "(ALMOST EMPTY)"; // TODO: localization - break; - case 2: - descString = "(ALMOST FULL)"; // TODO: localization - break; - case 3: - descString = "(FULL)"; // TODO: localization - break; + char *descString_EN_ANY[4] = {"(EMPTY)", "(ALMOST EMPTY)", "(ALMOST FULL)", "(FULL)"}; + char *descString_GE_GRE[4] = {"(LEER)", "(FAST LEER)", "(FAST VOLL)", "(VOLL)"}; + char *descString_FR_FRA[4] = {"(VIDE)", "(PRESQUE VIDE)", "(PRESQUE PLEINE)", "(PLEINE)"}; + + switch (_vm->getGameLanguage()) { // localized + default: + case Common::EN_ANY: descString = descString_EN_ANY[junk->getChargeCount()]; break; + case Common::GR_GRE: descString = descString_GE_GRE[junk->getChargeCount()]; break; + case Common::FR_FRA: descString = descString_FR_FRA[junk->getChargeCount()]; break; } + f335_drawPanelObjectDescriptionString(descString); } else if ((iconIndex >= k0_IconIndiceJunkCompassNorth) && (iconIndex <= k3_IconIndiceJunkCompassWest)) { potentialAttribMask = 0; - strcpy(str, "PARTY FACING "); // TODO: localization - static char* directionName[4] = {"NORTH", "EAST", "SOUTH", "WEST"}; // G0430_apc_DirectionNames // TODO: localization - strcat(str, directionName[iconIndex]); + + switch (_vm->getGameLanguage()) { // localized + default: + case Common::EN_ANY: strcpy(str, "PARTY FACING "); break; + case Common::GR_GRE: strcpy(str, "GRUPPE BLICKT NACH "); break; + case Common::FR_FRA: strcpy(str, "GROUPE FACE "); break; + } + + + static char* directionName_EN_ANY[4] = {"NORTH", "EAST", "SOUTH", "WEST"}; + static char* directionName_GR_GRE[4] = {"NORDEN", "OSTEN", "SUEDEN", "WESTEN"}; + static char* directionName_FR_FRA[4] = {"AU NORD", "A L'EST", "AU SUD", "A L'OUEST"}; + switch (_vm->getGameLanguage()) { // localized + default: + case Common::EN_ANY: strcat(str, directionName_EN_ANY[iconIndex]); break; + case Common::GR_GRE: strcat(str, directionName_FR_FRA[iconIndex]); break; + case Common::FR_FRA: strcat(str, directionName_GR_GRE[iconIndex]); break; + } + f335_drawPanelObjectDescriptionString(str); } else { potentialAttribMask = k0x0001_DescriptionMaskConsumable; @@ -559,21 +624,49 @@ void InventoryMan::f342_drawPanelObject(Thing thingToDraw, bool pressingEye) { } // end of switch if (potentialAttribMask) { + char *attribString_EN_ANY[4] = {"CONSUMABLE", "POISONED", "BROKEN", "CURSED"}; + char *attribString_GR_GRE[4] = {"ESSBAR", "VERGIFTET", "DEFEKT", "VERFLUCHT"}; + char *attribString_FR_FRA[4] = {"COMESTIBLE", "EMPOISONNE", "BRISE", "MAUDIT"}; + char **attribString = nullptr; + + switch (_vm->getGameLanguage()) { // localized + default: + case Common::EN_ANY: attribString = attribString_EN_ANY; break; + case Common::GR_GRE: attribString = attribString_GR_GRE; break; + case Common::FR_FRA: attribString = attribString_FR_FRA; break; + } + f336_buildObjectAttributeString(potentialAttribMask, actualAttribMask, attribString, str, "(", ")"); f335_drawPanelObjectDescriptionString(str); } - strcpy(str, "WEIGHS "); // TODO: localization + switch (_vm->getGameLanguage()) { // localized + default: + case Common::EN_ANY: strcpy(str, "WEIGHS "); break; + case Common::GR_GRE: strcpy(str, "WIEGT "); break; + case Common::FR_FRA: strcpy(str, "PESE "); break; + } + uint16 weight = dunMan.f140_getObjectWeight(thingToDraw); strcat(str, champMan.f288_getStringFromInteger(weight / 10, false, 3).c_str()); - strcat(str, "."); // TODO: localization + switch (_vm->getGameLanguage()) { // localized + default: + case Common::EN_ANY: strcat(str, "."); break; + case Common::GR_GRE: strcat(str, ","); break; + case Common::FR_FRA: strcat(str, "KG,"); break; + } weight -= (weight / 10) * 10; strcat(str, champMan.f288_getStringFromInteger(weight, false, 1).c_str()); - strcat(str, " KG."); // TODO: localization + switch (_vm->getGameLanguage()) { // localized + default: + case Common::EN_ANY: + case Common::GR_GRE: strcat(str, " KG."); break; + case Common::FR_FRA: strcat(str, "."); break; + } f335_drawPanelObjectDescriptionString(str); } @@ -696,9 +789,17 @@ void InventoryMan::f351_drawChampionSkillsAndStatistics() { int16 L1095_i_StatisticColor; uint16 L1096_ui_StatisticMaximumValue; char L1097_ac_String[20]; - // TODO: localization - static char* G0431_apc_StatisticNames[7] = {"L", "STRENGTH", "DEXTERITY", "WISDOM", "VITALITY", "ANTI-MAGIC", "ANTI-FIRE"}; + static char* G0431_apc_StatisticNames_EN_ANY[7] = {"L", "STRENGTH", "DEXTERITY", "WISDOM", "VITALITY", "ANTI-MAGIC", "ANTI-FIRE"}; + static char* G0431_apc_StatisticNames_GR_GRE[7] = {"L", "STAERKE", "FLINKHEIT", "WEISHEIT", "VITALITAET", "ANTI-MAGIE", "ANTI-FEUER"}; + static char* G0431_apc_StatisticNames_FR_FRA[7] = {"L", "FORCE", "DEXTERITE", "SAGESSE", "VITALITE", "ANTI-MAGIE", "ANTI-FEU"}; + char **G0431_apc_StatisticNames; + switch (_vm->getGameLanguage()) { // localized + default: + case Common::EN_ANY: G0431_apc_StatisticNames = G0431_apc_StatisticNames_EN_ANY; break; + case Common::GR_GRE: G0431_apc_StatisticNames = G0431_apc_StatisticNames_GR_GRE; break; + case Common::FR_FRA: G0431_apc_StatisticNames = G0431_apc_StatisticNames_FR_FRA; break; + } f334_closeChest(); L1094_ps_Champion = &_vm->_championMan->_gK71_champions[L1093_ui_ChampionIndex = _vm->M1_ordinalToIndex(_g432_inventoryChampionOrdinal)]; @@ -708,10 +809,21 @@ void InventoryMan::f351_drawChampionSkillsAndStatistics() { AL1092_i_SkillLevel = MIN((uint16)16, _vm->_championMan->f303_getSkillLevel(L1093_ui_ChampionIndex, AL1090_ui_SkillIndex | k0x8000_IgnoreTemporaryExperience)); if (AL1092_i_SkillLevel == 1) continue; - // TODO: localization - strcpy(L1097_ac_String, G0428_apc_SkillLevelNames[AL1092_i_SkillLevel - 2]); - strcat(L1097_ac_String, " "); - strcat(L1097_ac_String, g417_baseSkillName[AL1090_ui_SkillIndex]); + + switch (_vm->getGameLanguage()) { // localized + default: + case Common::EN_ANY: + case Common::GR_GRE: // english and german versions are the same + strcpy(L1097_ac_String, G0428_apc_SkillLevelNames[AL1092_i_SkillLevel - 2]); + strcat(L1097_ac_String, " "); + strcat(L1097_ac_String, g417_baseSkillName[AL1090_ui_SkillIndex]); + break; + case Common::FR_FRA: + strcat(L1097_ac_String, g417_baseSkillName[AL1090_ui_SkillIndex]); + strcat(L1097_ac_String, " "); + strcpy(L1097_ac_String, G0428_apc_SkillLevelNames[AL1092_i_SkillLevel - 2]); + break; + } _vm->_textMan->f52_printToViewport(108, L1091_i_Y, k13_ColorLightestGray, L1097_ac_String); L1091_i_Y += 7; } diff --git a/engines/dm/inventory.h b/engines/dm/inventory.h index 7a3543902a..0af166180d 100644 --- a/engines/dm/inventory.h +++ b/engines/dm/inventory.h @@ -47,10 +47,13 @@ enum PanelContent { k5_PanelContentResurrectReincarnate = 5 // @ C05_PANEL_RESURRECT_REINCARNATE }; -extern char* G0428_apc_SkillLevelNames[15]; +extern char* G0428_apc_SkillLevelNames[15]; // @ G0428_apc_SkillLevelNames class InventoryMan { DMEngine *_vm; + + void initConstants(); + public: explicit InventoryMan(DMEngine *vm); diff --git a/engines/dm/loadsave.cpp b/engines/dm/loadsave.cpp index d6e37b312c..7eb29d6a90 100644 --- a/engines/dm/loadsave.cpp +++ b/engines/dm/loadsave.cpp @@ -155,7 +155,20 @@ LoadgameResponse DMEngine::f435_loadgame(int16 slot) { _g526_dungeonId = dmSaveHeader._dungeonId; _g524_restartGameAllowed = true; - _dialog->f427_dialogDraw(nullptr, "LOADING GAME . . .", nullptr, nullptr, nullptr, nullptr, true, true, true); // TODO: localization + + switch (getGameLanguage()) { // localized + default: + case Common::EN_ANY: + _dialog->f427_dialogDraw(nullptr, "LOADING GAME . . .", nullptr, nullptr, nullptr, nullptr, true, true, true); + break; + case Common::GR_GRE: + _dialog->f427_dialogDraw(nullptr, "SPIEL WIRD GELADEN . . .", nullptr, nullptr, nullptr, nullptr, true, true, true); + break; + case Common::FR_FRA: + _dialog->f427_dialogDraw(nullptr, "CHARGEMENT DU JEU . . .", nullptr, nullptr, nullptr, nullptr, true, true, true); + break; + } + } _championMan->_g303_partyDead = false; @@ -169,12 +182,32 @@ void DMEngine::f433_processCommand140_saveGame(uint16 slot, const Common::String _menuMan->f456_drawDisabledMenu(); _eventMan->f78_showMouse(); - // TODO: localization - _dialog->f427_dialogDraw(message, nullptr, "SAVE AND PLAY", "SAVE AND QUIT", "CANCEL", nullptr, false, false, false); + switch (getGameLanguage()) { // localized + default: + case Common::EN_ANY: + _dialog->f427_dialogDraw(message, nullptr, "SAVE AND PLAY", "SAVE AND QUIT", "CANCEL", nullptr, false, false, false); + break; + case Common::GR_GRE: + _dialog->f427_dialogDraw(message, nullptr, "SICHERN/SPIEL", "SICHERN/ENDEN", "WIDERRUFEN", nullptr, false, false, false); + break; + case Common::FR_FRA: + _dialog->f427_dialogDraw(message, nullptr, "GARDER/JOUER", "GARDER/SORTIR", "ANNULLER", nullptr, false, false, false); + break; + } int16 saveAndPlayChoice = _dialog->f424_dialogGetChoice(3, k0_DIALOG_SET_VIEWPORT, 0, k0_DIALOG_CHOICE_NONE); - // TODO: localization - _dialog->f427_dialogDraw(nullptr, "SAVING GAME . . .", nullptr, nullptr, nullptr, nullptr, false, false, false); + switch (getGameLanguage()) { // localized + default: + case Common::EN_ANY: + _dialog->f427_dialogDraw(nullptr, "SAVING GAME . . .", nullptr, nullptr, nullptr, nullptr, false, false, false); + break; + case Common::GR_GRE: + _dialog->f427_dialogDraw(nullptr, "SPIEL WIRD GESICHERT . . .", nullptr, nullptr, nullptr, nullptr, false, false, false); + break; + case Common::FR_FRA: + _dialog->f427_dialogDraw(nullptr, "UN MOMENT A SAUVEGARDER DU JEU...", nullptr, nullptr, nullptr, nullptr, false, false, false); + break; + } uint16 champHandObjWeight = 0; if (!_championMan->_g415_leaderEmptyHanded) { @@ -266,7 +299,7 @@ void DMEngine::f433_processCommand140_saveGame(uint16 slot, const Common::String tmp = ((map._difficulty & 0xF) << 12) | ((map._creatureTypeCount & 0xF) << 4) | (map._doorOrnCount & 0xF); file->writeUint16BE(tmp); - tmp = ((map._doorSet1 & 0xF) << 12) | ((map._doorSet0 & 0xF) << 8) + tmp = ((map._doorSet1 & 0xF) << 12) | ((map._doorSet0 & 0xF) << 8) | ((map._wallSet & 0xF) << 4) | (map._floorSet & 0xF); file->writeUint16BE(tmp); } diff --git a/engines/dm/menus.cpp b/engines/dm/menus.cpp index 5fa9eeb172..4ccc5f1fb2 100644 --- a/engines/dm/menus.cpp +++ b/engines/dm/menus.cpp @@ -683,18 +683,38 @@ void MenuMan::f410_menusPrintSpellFailureMessage(Champion* champ, uint16 failure } _vm->_textMan->f51_messageAreaPrintLineFeed(); _vm->_textMan->f47_messageAreaPrintMessage(k4_ColorCyan, champ->_name); + + char *messages_EN_ANY[4] = {" NEEDS MORE PRACTICE WITH THIS ", " SPELL.", " MUMBLES A MEANINGLESS SPELL."," NEEDS AN EMPTY FLASK IN HAND FOR POTION."}; + char *messages_GR_GRE[4] = {" BRAUCHT MEHR UEBUNG MIT DIESEM ", " ZAUBERSPRUCH.", + " MURMELT EINEN SINNLOSEN ZAUBERSPRUCH.", " MUSS FUER DEN TRANK EINE LEERE FLASCHE BEREITHALTEN."}; + char *messages_FR_FRA[5] = {" DOIT PRATIQUER DAVANTAGE SON ", "ENVOUTEMENT.", " MARMONNE UNE CONJURATION IMCOMPREHENSIBLE.", + " DOIT AVOIR UN FLACON VIDE EN MAIN POUR LA POTION.", "EXORCISME."}; + char **messages; + switch (_vm->getGameLanguage()) { // localized + default: + case Common::EN_ANY: + messages = messages_EN_ANY; break; + case Common::GR_GRE: + messages = messages_GR_GRE; break; + case Common::FR_FRA: + messages = messages_FR_FRA; break; + } + switch (failureType) { case k0_failureNeedsMorePractice: - // TODO: localization - _vm->_textMan->f47_messageAreaPrintMessage(k4_ColorCyan, " NEEDS MORE PRACTICE WITH THIS "); + _vm->_textMan->f47_messageAreaPrintMessage(k4_ColorCyan, messages[0]); _vm->_textMan->f47_messageAreaPrintMessage(k4_ColorCyan, g417_baseSkillName[skillIndex]); - L1264_pc_Message = " SPELL."; + if (_vm->getGameLanguage() != Common::FR_FRA || skillIndex == k3_ChampionSkillWizard) { + L1264_pc_Message = messages[1]; + } else { + L1264_pc_Message = messages[4]; + } break; case k1_failureMeaninglessSpell: - L1264_pc_Message = " MUMBLES A MEANINGLESS SPELL."; // TODO: localization + L1264_pc_Message = messages[2]; break; case k10_failureNeedsFlaskInHand: - L1264_pc_Message = " NEEDS AN EMPTY FLASK IN HAND FOR POTION."; // TODO: localization + L1264_pc_Message = messages[3]; break; } _vm->_textMan->f47_messageAreaPrintMessage(k4_ColorCyan, L1264_pc_Message); @@ -1162,14 +1182,24 @@ T0407032: _vm->_championMan->f326_championShootProjectile(L1247_ps_Champion, AL1250_T_Object, L1256_ps_WeaponInfoActionHand->_kineticEnergy + L1257_ps_WeaponInfoReadyHand->_kineticEnergy, (L1256_ps_WeaponInfoActionHand->getShootAttack() + _vm->_championMan->f303_getSkillLevel(champIndex, k11_ChampionSkillShoot)) << 1, AL1246_i_StepEnergy); } break; - case k5_ChampionActionFlip: - // TODO: localization + case k5_ChampionActionFlip: { + char *messages_EN_ANY[2] = {"IT COMES UP HEADS.", "IT COMES UP TAILS."}; + char *messages_GR_GRE[2] = {"DIE KOPFSEITE IST OBEN.", "DIE ZAHL IST OBEN."}; + char *messages_FR_FRA[2] = {"C'EST FACE.", "C'EST PILE."}; + char **message; + switch (_vm->getGameLanguage()) { // localized + default: + case Common::EN_ANY: message = messages_EN_ANY; break; + case Common::GR_GRE: message = messages_GR_GRE; break; + case Common::FR_FRA: message = messages_FR_FRA; break; + } if (_vm->getRandomNumber(2)) { - f381_printMessageAfterReplacements("IT COMES UP HEADS."); + f381_printMessageAfterReplacements(message[0]); } else { - f381_printMessageAfterReplacements("IT COMES UP TAILS."); + f381_printMessageAfterReplacements(message[1]); } - break; + } + break; case k33_ChampionActionSpellshield: case k34_ChampionActionFireshield: if (!f403_isPartySpellOrFireShieldSuccessful(L1247_ps_Champion, actionIndex == k33_ChampionActionSpellshield, 280, true)) { @@ -1682,12 +1712,27 @@ void MenuMan::f385_drawActionDamage(int16 damage) { _vm->_displayMan->_g578_useByteBoxCoordinates = false; _vm->_displayMan->D24_fillScreenBox(g1_BoxActionArea, k0_ColorBlack); if (damage < 0) { + static char *messages_EN_ANY[2] = {"CAN'T REACH", "NEED AMMO"}; + static char *messages_GR_GRE[2] = {"ZU WEIT WEG", "MEHR MUNITION"}; + static char *messages_FR_FRA[2] = {"TROP LOIN", "SANS MUNITION"}; + static int16 pos_EN_ANY[2] = {242, 248}; + static int16 pos_GR_GRE[2] = {242, 236}; + static int16 pos_FR_FRA[2] = {248, 236}; + char **message; + int16 *pos; + switch (_vm->getGameLanguage()) { // localized + default: + case Common::EN_ANY: message = messages_EN_ANY; pos = pos_EN_ANY; break; + case Common::GR_GRE: message = messages_GR_GRE; pos = pos_GR_GRE; break; + case Common::FR_FRA: message = messages_FR_FRA; pos = pos_FR_FRA; break; + } + if (damage == kM1_damageCantReach) { - AL1176_i_X = 242; - AL1178_puc_String = (unsigned char*)"CAN'T REACH"; // TODO: localization + AL1176_i_X = pos[0]; + AL1178_puc_String = (byte*)message[0]; } else { - AL1176_i_X = 248; - AL1178_puc_String = (unsigned char*)"NEED AMMO"; // TODO: localization + AL1176_i_X = pos[1]; + AL1178_puc_String = (byte*)message[1]; } _vm->_textMan->f53_printToLogicalScreen(AL1176_i_X, 100, k4_ColorCyan, k0_ColorBlack, (char *)AL1178_puc_String); } else { diff --git a/engines/dm/objectman.cpp b/engines/dm/objectman.cpp index d85ca40828..56ecc3a3e3 100644 --- a/engines/dm/objectman.cpp +++ b/engines/dm/objectman.cpp @@ -241,9 +241,20 @@ void ObjectMan::f34_drawLeaderObjectName(Thing thing) { if (L0007_i_IconIndex == k147_IconIndiceJunkChampionBones) { Junk *junk = (Junk*)_vm->_dungeonMan->f156_getThingData(thing); char champBonesName[16]; - // TODO: localization - strcpy(champBonesName, _vm->_championMan->_gK71_champions[junk->getChargeCount()]._name); - strcat(champBonesName, _g352_objectNames[L0007_i_IconIndex]); + + switch (_vm->getGameLanguage()) { // localized + default: + case Common::EN_ANY: + case Common::GR_GRE: // english and german version are the same + strcpy(champBonesName, _vm->_championMan->_gK71_champions[junk->getChargeCount()]._name); + strcat(champBonesName, _g352_objectNames[L0007_i_IconIndex]); + break; + case Common::FR_FRA: + strcat(champBonesName, _g352_objectNames[L0007_i_IconIndex]); + strcpy(champBonesName, _vm->_championMan->_gK71_champions[junk->getChargeCount()]._name); + break; + } + objectName = champBonesName; } else { objectName = _g352_objectNames[L0007_i_IconIndex]; |
