aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
authorBendegúz Nagy2016-08-15 11:56:21 +0200
committerBendegúz Nagy2016-08-26 23:02:22 +0200
commit3fffb08a408b042d185fd615e2ea826e53b842fd (patch)
treecf18cd7d3fca14048ac139e33244e55c10c7f20c /engines
parentc7b353385d08b3c848a59967e769a0eeec837d4e (diff)
downloadscummvm-rg350-3fffb08a408b042d185fd615e2ea826e53b842fd.tar.gz
scummvm-rg350-3fffb08a408b042d185fd615e2ea826e53b842fd.tar.bz2
scummvm-rg350-3fffb08a408b042d185fd615e2ea826e53b842fd.zip
DM: Add missing localization warnings and query function for language
Diffstat (limited to 'engines')
-rw-r--r--engines/dm/TODOs/todo.txt6
-rw-r--r--engines/dm/champion.cpp3
-rw-r--r--engines/dm/detection.cpp4
-rw-r--r--engines/dm/dm.cpp5
-rw-r--r--engines/dm/dm.h5
-rw-r--r--engines/dm/inventory.cpp2
-rw-r--r--engines/dm/loadsave.cpp1
-rw-r--r--engines/dm/objectman.cpp1
8 files changed, 17 insertions, 10 deletions
diff --git a/engines/dm/TODOs/todo.txt b/engines/dm/TODOs/todo.txt
index 4bfd18c029..1eafa4d80b 100644
--- a/engines/dm/TODOs/todo.txt
+++ b/engines/dm/TODOs/todo.txt
@@ -1,14 +1,11 @@
Bugs:
Display:
- Broken palette for cursor
No food and water bar graphs
Spellcasting tabs are displayed inproperly, switching between them is possible tho
- When reordering a champions, the icons in the top right corner ar drawn twice under the cursor
+ Cursor icons are drawn twice
Logic:
Items thrown on the right side end up on the left side
- I'm not sure, but the cooldown between champion actions when fighting monsters seems too muh
- Clicking wit ha scroll in hand on the eye in the inventory makes userinput glitchy
Possible bugs:
@@ -19,7 +16,6 @@ Possible bugs:
Todo:
Add wiki entry for DM
- I forgot to add localization warnings
Double check enums with hex literals
Double check strcat, strstr usages
I forgot to add a bunch of warning for show/hide mouse pointer and other mouse functions
diff --git a/engines/dm/champion.cpp b/engines/dm/champion.cpp
index 4c434b81f5..11371dfc7c 100644
--- a/engines/dm/champion.cpp
+++ b/engines/dm/champion.cpp
@@ -40,7 +40,7 @@
namespace DM {
-const char *g417_baseSkillName[4] = {"FIGHTER", "NINJA", "PRIEST", "WIZARD"};
+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
@@ -2149,6 +2149,7 @@ void ChampionMan::f292_drawChampionState(ChampionIndex champIndex) {
else
loadColor = k13_ColorLightestGray;
+ // TODO: localization
_vm->_textMan->f52_printToViewport(104, 132, loadColor, "LOAD ");
maxLoad = curChampion->_load / 10;
strcpy(_vm->_g353_stringBuildBuffer, f288_getStringFromInteger(maxLoad, true, 3).c_str());
diff --git a/engines/dm/detection.cpp b/engines/dm/detection.cpp
index 7d1c463045..a1fd6bccd3 100644
--- a/engines/dm/detection.cpp
+++ b/engines/dm/detection.cpp
@@ -46,7 +46,7 @@ static const ADGameDescription gameDescriptions[] = {
{"Dungeon.dat", 0, "43a213da8eda413541dd12f90ce202f6", 25006},
AD_LISTEND
},
- Common::EN_GRB, Common::kPlatformAmiga, ADGF_NO_FLAGS, GUIO1(GUIO_NONE)
+ Common::EN_ANY, Common::kPlatformAmiga, ADGF_NO_FLAGS, GUIO1(GUIO_NONE)
},
AD_TABLE_END_MARKER
@@ -86,7 +86,7 @@ public:
virtual bool createInstance(OSystem *syst, Engine **engine, const ADGameDescription *desc) const {
if(desc)
- *engine = new DM::DMEngine(syst);
+ *engine = new DM::DMEngine(syst, desc);
return desc != nullptr;
}
virtual int getMaximumSaveSlot() const { return 99; }
diff --git a/engines/dm/dm.cpp b/engines/dm/dm.cpp
index 66475dbea4..13c8c63d21 100644
--- a/engines/dm/dm.cpp
+++ b/engines/dm/dm.cpp
@@ -56,6 +56,7 @@
#include "projexpl.h"
#include "dialog.h"
#include <graphics/cursorman.h>
+#include <advancedDetector.h>
namespace DM {
void warning(bool repeat, const char* s, ...) {
@@ -140,7 +141,7 @@ int16 M38_distance(int16 mapx1, int16 mapy1, int16 mapx2, int16 mapy2) {
return ABS(mapx1 - mapx2) + ABS(mapy1 - mapy2);
}
-DMEngine::DMEngine(OSystem *syst) : Engine(syst), _console(nullptr) {
+DMEngine::DMEngine(OSystem *syst, const ADGameDescription *desc) : Engine(syst), _console(nullptr), _gameVersion(desc) {
// Do not load data files
// Do not initialize graphics here
// Do not initialize audio devices here
@@ -646,6 +647,7 @@ 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");
curPalette[1] = D03_RGB_PINK;
curPalette[4] = D09_RGB_WHITE;
@@ -932,4 +934,5 @@ void DMEngine::f445_STARTEND_fuseSequenceUpdate() {
The ending animation when Lord Chaos is fused plays too quickly because the execution speed is not limited */
}
+Common::Language DMEngine::getGameLanguage() { return _gameVersion->language; }
} // End of namespace DM
diff --git a/engines/dm/dm.h b/engines/dm/dm.h
index 739ef170d1..85910eda82 100644
--- a/engines/dm/dm.h
+++ b/engines/dm/dm.h
@@ -37,6 +37,7 @@
#include "console.h"
+struct ADGameDescription;
namespace DM {
@@ -244,7 +245,7 @@ class DMEngine : public Engine {
void f439_drawEntrance(); // @ F0439_STARTEND_DrawEntrance
void f503_loadSounds(); // @ F0503_SOUND_LoadAll
public:
- explicit DMEngine(OSystem *syst);
+ explicit DMEngine(OSystem *syst, const ADGameDescription *gameDesc);
~DMEngine();
virtual bool hasFeature(EngineFeature f) const;
GUI::Debugger *getDebugger() { return _console; }
@@ -270,6 +271,7 @@ public:
void f442_SARTEND_processCommand202_entranceDrawCredits();
void f446_STARTEND_fuseSequnce(); // @ F0446_STARTEND_FuseSequence
void f445_STARTEND_fuseSequenceUpdate(); // @ F0445_STARTEND_FuseSequenceUpdate
+ Common::Language getGameLanguage();
private:
int16 _g528_saveFormat; // @ G0528_i_Format
@@ -281,6 +283,7 @@ private:
SoundData _gK24_soundData[k34_D13_soundCount]; // @ K0024_as_SoundData
Common::Queue<PendingSound> _pendingSounds;
byte *_savedScreenForOpenEntranceDoors; // ad-hoc HACK
+ const ADGameDescription *_gameVersion;
public:
Console *_console;
DisplayMan *_displayMan;
diff --git a/engines/dm/inventory.cpp b/engines/dm/inventory.cpp
index 698210ae0e..6f4e4e49ae 100644
--- a/engines/dm/inventory.cpp
+++ b/engines/dm/inventory.cpp
@@ -180,6 +180,7 @@ 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),
@@ -707,6 +708,7 @@ 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]);
diff --git a/engines/dm/loadsave.cpp b/engines/dm/loadsave.cpp
index 408ad9ca30..d6e37b312c 100644
--- a/engines/dm/loadsave.cpp
+++ b/engines/dm/loadsave.cpp
@@ -173,6 +173,7 @@ void DMEngine::f433_processCommand140_saveGame(uint16 slot, const Common::String
_dialog->f427_dialogDraw(message, nullptr, "SAVE AND PLAY", "SAVE AND QUIT", "CANCEL", nullptr, false, false, false);
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);
uint16 champHandObjWeight = 0;
diff --git a/engines/dm/objectman.cpp b/engines/dm/objectman.cpp
index 0c00e20f01..d85ca40828 100644
--- a/engines/dm/objectman.cpp
+++ b/engines/dm/objectman.cpp
@@ -241,6 +241,7 @@ 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]);
objectName = champBonesName;