diff options
Diffstat (limited to 'engines/dm')
-rw-r--r-- | engines/dm/dialog.cpp | 6 | ||||
-rw-r--r-- | engines/dm/dialog.h | 8 | ||||
-rw-r--r-- | engines/dm/inventory.cpp | 28 | ||||
-rw-r--r-- | engines/dm/inventory.h | 6 | ||||
-rw-r--r-- | engines/dm/menus.cpp | 28 | ||||
-rw-r--r-- | engines/dm/menus.h | 2 |
6 files changed, 39 insertions, 39 deletions
diff --git a/engines/dm/dialog.cpp b/engines/dm/dialog.cpp index c069bb462b..6772d32f04 100644 --- a/engines/dm/dialog.cpp +++ b/engines/dm/dialog.cpp @@ -37,7 +37,7 @@ DialogMan::DialogMan(DMEngine *vm) : _vm(vm) { _g335_selectedDialogChoice = 0; } -void DialogMan::f427_dialogDraw(char *msg1, char *msg2, char *choice1, char *choice2, char *choice3, char *choice4, bool screenDialog, bool clearScreen, bool fading) { +void DialogMan::f427_dialogDraw(const char *msg1, const char *msg2, const char *choice1, const char *choice2, const char *choice3, const char *choice4, bool screenDialog, bool clearScreen, bool fading) { static Box constBox1 = Box(0, 223, 101, 125); static Box constBox2 = Box(0, 223, 76, 100); static Box constBox3 = Box(0, 223, 51, 75); @@ -140,14 +140,14 @@ void DialogMan::f427_dialogDraw(char *msg1, char *msg2, char *choice1, char *cho _vm->_displayMan->updateScreen(); } -void DialogMan::f425_printCenteredChoice(byte *bitmap, char *str, int16 posX, int16 posY) { +void DialogMan::f425_printCenteredChoice(byte *bitmap, const char *str, int16 posX, int16 posY) { if (str) { posX -= (strlen(str) * 6) >> 1; _vm->_textMan->f40_printTextToBitmap(bitmap, k112_byteWidthViewport, posX, posY, k9_ColorGold, k5_ColorLightBrown, str, k136_heightViewport); } } -bool DialogMan::f426_isMessageOnTwoLines(char *str, char *part1, char *part2) { +bool DialogMan::f426_isMessageOnTwoLines(const char *str, char *part1, char *part2) { uint16 strLength = strlen(str); if (strLength <= 30) return false; diff --git a/engines/dm/dialog.h b/engines/dm/dialog.h index 48a1accb1c..1ac88fec7f 100644 --- a/engines/dm/dialog.h +++ b/engines/dm/dialog.h @@ -47,10 +47,10 @@ class DialogMan { public: uint16 _g335_selectedDialogChoice; // @ G0335_ui_SelectedDialogChoice explicit DialogMan(DMEngine *vm); - void f427_dialogDraw(char *msg1, char *msg2, char *choice1, char *choice2, - char *choice3, char *choice4, bool screenDialog, bool clearScreen, bool fading); // @ F0427_DIALOG_Draw - void f425_printCenteredChoice(byte *bitmap, char *str, int16 posX, int16 posY); // @ F0425_DIALOG_PrintCenteredChoice - bool f426_isMessageOnTwoLines(char *str, char *part1, char *part2); // @ F0426_DIALOG_IsMessageOnTwoLines + void f427_dialogDraw(const char *msg1, const char *msg2, const char *choice1, const char *choice2, + const char *choice3, const char *choice4, bool screenDialog, bool clearScreen, bool fading); // @ F0427_DIALOG_Draw + void f425_printCenteredChoice(byte *bitmap, const char *str, int16 posX, int16 posY); // @ F0425_DIALOG_PrintCenteredChoice + bool f426_isMessageOnTwoLines(const char *str, char *part1, char *part2); // @ F0426_DIALOG_IsMessageOnTwoLines int16 f424_dialogGetChoice(uint16 choiceCount, uint16 dialogSetIndex, int16 driveType, int16 automaticChoiceIfFlopyInDrive); // @ F0424_DIALOG_GetChoice }; diff --git a/engines/dm/inventory.cpp b/engines/dm/inventory.cpp index 5463a21d85..78dc28a63d 100644 --- a/engines/dm/inventory.cpp +++ b/engines/dm/inventory.cpp @@ -402,7 +402,7 @@ void InventoryMan::f332_drawIconToViewport(IconIndice iconIndex, int16 xPos, int _vm->_displayMan->f20_blitToViewport(iconBitmap, box, k8_byteWidth, kM1_ColorNoTransparency, 16); } -void InventoryMan::f336_buildObjectAttributeString(int16 potentialAttribMask, int16 actualAttribMask, char** attribStrings, char* destString, char* prefixString, char* suffixString) { +void InventoryMan::f336_buildObjectAttributeString(int16 potentialAttribMask, int16 actualAttribMask, const char** attribStrings, char* destString, const char* prefixString, const char* suffixString) { uint16 identicalBitCount = 0; int16 attribMask = 1; for (uint16 stringIndex = 0; stringIndex < 16; stringIndex++, attribMask <<= 1) { @@ -440,7 +440,7 @@ void InventoryMan::f336_buildObjectAttributeString(int16 potentialAttribMask, in strcat(destString, suffixString); } -void InventoryMan::f335_drawPanelObjectDescriptionString(char *descString) { +void InventoryMan::f335_drawPanelObjectDescriptionString(const char *descString) { if (descString[0] == '\f') { // form feed descString++; _g421_objDescTextXpos = 108; @@ -516,7 +516,7 @@ void InventoryMan::f342_drawPanelObject(Thing thingToDraw, bool pressingEye) { dispMan.f20_blitToViewport(_vm->_displayMan->f489_getNativeBitmapOrGraphic(k29_ObjectDescCircleIndice), boxObjectDescCircle, k16_byteWidth, k12_ColorDarkestGray, 27); - char *descString = nullptr; + const char *descString = nullptr; char str[40]; if (iconIndex == k147_IconIndiceJunkChampionBones) { switch (_vm->getGameLanguage()) { // localized @@ -624,9 +624,9 @@ void InventoryMan::f342_drawPanelObject(Thing thingToDraw, bool pressingEye) { } - static char* directionName_EN_ANY[4] = {"NORTH", "EAST", "SOUTH", "WEST"}; - static char* directionName_DE_DEU[4] = {"NORDEN", "OSTEN", "SUEDEN", "WESTEN"}; - static char* directionName_FR_FRA[4] = {"AU NORD", "A L'EST", "AU SUD", "A L'OUEST"}; + const static char* directionName_EN_ANY[4] = {"NORTH", "EAST", "SOUTH", "WEST"}; + const static char* directionName_DE_DEU[4] = {"NORDEN", "OSTEN", "SUEDEN", "WESTEN"}; + const 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; @@ -647,10 +647,10 @@ void InventoryMan::f342_drawPanelObject(Thing thingToDraw, bool pressingEye) { } // end of switch if (potentialAttribMask) { - char *attribString_EN_ANY[4] = {"CONSUMABLE", "POISONED", "BROKEN", "CURSED"}; - char *attribString_DE_DEU[4] = {"ESSBAR", "VERGIFTET", "DEFEKT", "VERFLUCHT"}; - char *attribString_FR_FRA[4] = {"COMESTIBLE", "EMPOISONNE", "BRISE", "MAUDIT"}; - char **attribString = nullptr; + static const char *attribString_EN_ANY[4] = {"CONSUMABLE", "POISONED", "BROKEN", "CURSED"}; + static const char *attribString_DE_DEU[4] = {"ESSBAR", "VERGIFTET", "DEFEKT", "VERFLUCHT"}; + static const char *attribString_FR_FRA[4] = {"COMESTIBLE", "EMPOISONNE", "BRISE", "MAUDIT"}; + static const char **attribString = nullptr; switch (_vm->getGameLanguage()) { // localized default: @@ -813,10 +813,10 @@ void InventoryMan::f351_drawChampionSkillsAndStatistics() { uint16 L1096_ui_StatisticMaximumValue; char L1097_ac_String[20]; - static char* G0431_apc_StatisticNames_EN_ANY[7] = {"L", "STRENGTH", "DEXTERITY", "WISDOM", "VITALITY", "ANTI-MAGIC", "ANTI-FIRE"}; - static char* G0431_apc_StatisticNames_DE_DEU[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; + static const char* G0431_apc_StatisticNames_EN_ANY[7] = {"L", "STRENGTH", "DEXTERITY", "WISDOM", "VITALITY", "ANTI-MAGIC", "ANTI-FIRE"}; + static const char* G0431_apc_StatisticNames_DE_DEU[7] = {"L", "STAERKE", "FLINKHEIT", "WEISHEIT", "VITALITAET", "ANTI-MAGIE", "ANTI-FEUER"}; + static const char* G0431_apc_StatisticNames_FR_FRA[7] = {"L", "FORCE", "DEXTERITE", "SAGESSE", "VITALITE", "ANTI-MAGIE", "ANTI-FEU"}; + const char **G0431_apc_StatisticNames; switch (_vm->getGameLanguage()) { // localized default: case Common::EN_ANY: G0431_apc_StatisticNames = G0431_apc_StatisticNames_EN_ANY; break; diff --git a/engines/dm/inventory.h b/engines/dm/inventory.h index 856f7d02f8..c15a26ce2c 100644 --- a/engines/dm/inventory.h +++ b/engines/dm/inventory.h @@ -73,9 +73,9 @@ public: void f341_drawPanelScroll(Scroll *scoll); // @ F0341_INVENTORY_DrawPanel_Scroll void f333_openAndDrawChest(Thing thingToOpen, Container *chest, bool isPressingEye); // @ F0333_INVENTORY_OpenAndDrawChest void f332_drawIconToViewport(IconIndice iconIndex, int16 xPos, int16 yPos); // @ F0332_INVENTORY_DrawIconToViewport - void f336_buildObjectAttributeString(int16 potentialAttribMask, int16 actualAttribMask, char ** attribStrings, - char *destString, char *prefixString, char *suffixString); // @ F0336_INVENTORY_DrawPanel_BuildObjectAttributesString - void f335_drawPanelObjectDescriptionString(char *descString); // @ F0335_INVENTORY_DrawPanel_ObjectDescriptionString + void f336_buildObjectAttributeString(int16 potentialAttribMask, int16 actualAttribMask, const char ** attribStrings, + char *destString, const char *prefixString, const char *suffixString); // @ F0336_INVENTORY_DrawPanel_BuildObjectAttributesString + void f335_drawPanelObjectDescriptionString(const char *descString); // @ F0335_INVENTORY_DrawPanel_ObjectDescriptionString void f339_drawPanelArrowOrEye(bool pressingEye); // @ F0339_INVENTORY_DrawPanel_ArrowOrEye void f342_drawPanelObject(Thing thingToDraw, bool pressingEye); // @ F0342_INVENTORY_DrawPanel_Object void f337_setDungeonViewPalette(); // @ F0337_INVENTORY_SetDungeonViewPalette diff --git a/engines/dm/menus.cpp b/engines/dm/menus.cpp index 30fe420c07..3134bbb2a4 100644 --- a/engines/dm/menus.cpp +++ b/engines/dm/menus.cpp @@ -686,7 +686,7 @@ Spell* MenuMan::f409_getSpellFromSymbols(byte* symbols) { } void MenuMan::f410_menusPrintSpellFailureMessage(Champion* champ, uint16 failureType, uint16 skillIndex) { - char* L1264_pc_Message = nullptr; + const char *L1264_pc_Message = nullptr; if (skillIndex > k3_ChampionSkillWizard) skillIndex = (skillIndex - 4) / 4; @@ -694,12 +694,12 @@ 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_DE_DEU[4] = {" BRAUCHT MEHR UEBUNG MIT DIESEM ", " ZAUBERSPRUCH.", + const char *messages_EN_ANY[4] = {" NEEDS MORE PRACTICE WITH THIS ", " SPELL.", " MUMBLES A MEANINGLESS SPELL."," NEEDS AN EMPTY FLASK IN HAND FOR POTION."}; + const char *messages_DE_DEU[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.", + const 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; + const char **messages; switch (_vm->getGameLanguage()) { // localized default: case Common::EN_ANY: @@ -1192,10 +1192,10 @@ T0407032: } break; case k5_ChampionActionFlip: { - char *messages_EN_ANY[2] = {"IT COMES UP HEADS.", "IT COMES UP TAILS."}; - char *messages_DE_DEU[2] = {"DIE KOPFSEITE IST OBEN.", "DIE ZAHL IST OBEN."}; - char *messages_FR_FRA[2] = {"C'EST FACE.", "C'EST PILE."}; - char **message; + const char *messages_EN_ANY[2] = {"IT COMES UP HEADS.", "IT COMES UP TAILS."}; + const char *messages_DE_DEU[2] = {"DIE KOPFSEITE IST OBEN.", "DIE ZAHL IST OBEN."}; + const char *messages_FR_FRA[2] = {"C'EST FACE.", "C'EST PILE."}; + const char **message; switch (_vm->getGameLanguage()) { // localized default: case Common::EN_ANY: message = messages_EN_ANY; break; @@ -1544,7 +1544,7 @@ T0401016: return L1232_B_IsGroupFrightenedByAction; } -void MenuMan::f381_printMessageAfterReplacements(char* str) { +void MenuMan::f381_printMessageAfterReplacements(const char* str) { char* L1164_pc_Character; char* L1165_pc_ReplacementString; char L1166_ac_OutputString[128]; @@ -1719,13 +1719,13 @@ void MenuMan::f385_drawActionDamage(int16 damage) { _vm->_displayMan->_g578_useByteBoxCoordinates = false; _vm->_displayMan->D24_fillScreenBox(boxActionArea, k0_ColorBlack); if (damage < 0) { - static char *messages_EN_ANY[2] = {"CAN'T REACH", "NEED AMMO"}; - static char *messages_DE_DEU[2] = {"ZU WEIT WEG", "MEHR MUNITION"}; - static char *messages_FR_FRA[2] = {"TROP LOIN", "SANS MUNITION"}; + static const char *messages_EN_ANY[2] = {"CAN'T REACH", "NEED AMMO"}; + static const char *messages_DE_DEU[2] = {"ZU WEIT WEG", "MEHR MUNITION"}; + static const char *messages_FR_FRA[2] = {"TROP LOIN", "SANS MUNITION"}; static int16 pos_EN_ANY[2] = {242, 248}; static int16 pos_DE_DEU[2] = {242, 236}; static int16 pos_FR_FRA[2] = {248, 236}; - char **message; + const char **message; int16 *pos; switch (_vm->getGameLanguage()) { // localized default: diff --git a/engines/dm/menus.h b/engines/dm/menus.h index 34f8355251..0fe8b447e6 100644 --- a/engines/dm/menus.h +++ b/engines/dm/menus.h @@ -110,7 +110,7 @@ public: bool f402_isMeleeActionPerformed(int16 champIndex, Champion *champ, int16 actionIndex, int16 targetMapX, int16 targetMapY, int16 skillIndex); // @ F0402_MENUS_IsMeleeActionPerformed bool f401_isGroupFrightenedByAction(int16 champIndex, uint16 actionIndex, int16 mapX, int16 mapY); // @ F0401_MENUS_IsGroupFrightenedByAction - void f381_printMessageAfterReplacements(char *str); // @ F0381_MENUS_PrintMessageAfterReplacements + void f381_printMessageAfterReplacements(const char *str); // @ F0381_MENUS_PrintMessageAfterReplacements void f389_processCommands116To119_setActingChampion(uint16 champIndex); // @ F0389_MENUS_ProcessCommands116To119_SetActingChampion void f383_setActionList(ActionSet *actionSet); // @ F0383_MENUS_SetActionList int16 f382_getActionObjectChargeCount(); // @ F0382_MENUS_GetActionObjectChargeCount |