diff options
author | Strangerke | 2016-08-22 23:24:49 +0200 |
---|---|---|
committer | Bendegúz Nagy | 2016-08-26 23:02:22 +0200 |
commit | fecb869af99927326b6cb6689c0e8e6d499a5977 (patch) | |
tree | 553ff1dbe6fe57c7e178c863869528fc9df8455b | |
parent | 2bdabc3b7afe9ba857bfc2be7ac638a566d09bf4 (diff) | |
download | scummvm-rg350-fecb869af99927326b6cb6689c0e8e6d499a5977.tar.gz scummvm-rg350-fecb869af99927326b6cb6689c0e8e6d499a5977.tar.bz2 scummvm-rg350-fecb869af99927326b6cb6689c0e8e6d499a5977.zip |
DM: Fix some more GCC warnings, move some globals to MenuMan
-rw-r--r-- | engines/dm/group.cpp | 5 | ||||
-rw-r--r-- | engines/dm/inventory.cpp | 65 | ||||
-rw-r--r-- | engines/dm/menus.cpp | 153 | ||||
-rw-r--r-- | engines/dm/menus.h | 12 |
4 files changed, 134 insertions, 101 deletions
diff --git a/engines/dm/group.cpp b/engines/dm/group.cpp index 22915a9daa..c9f7e30958 100644 --- a/engines/dm/group.cpp +++ b/engines/dm/group.cpp @@ -256,9 +256,9 @@ void GroupMan::f186_dropCreatureFixedPossessions(uint16 creatureType, int16 mapX return; } - uint16 currFixedPossession; + uint16 currFixedPossession = *fixedPossessions++; bool weaponDropped = false; - while (currFixedPossession = *fixedPossessions++) { + while (currFixedPossession) { if (getFlag(currFixedPossession, k0x8000_randomDrop) && _vm->getRandomNumber(2)) continue; @@ -285,6 +285,7 @@ void GroupMan::f186_dropCreatureFixedPossessions(uint16 creatureType, int16 mapX currWeapon->setCursed(cursedPossessions); nextUnusedThing = M15_thingWithNewCell(nextUnusedThing, ((cell == k255_CreatureTypeSingleCenteredCreature) || !_vm->getRandomNumber(4)) ? _vm->getRandomNumber(4) : cell); _vm->_moveSens->f267_getMoveResult(nextUnusedThing, kM1_MapXNotOnASquare, 0, mapX, mapY); + currFixedPossession = *fixedPossessions++; } _vm->_sound->f064_SOUND_RequestPlay_CPSD(weaponDropped ? k00_soundMETALLIC_THUD : k04_soundWOODEN_THUD_ATTACK_TROLIN_ANTMAN_STONE_GOLEM, mapX, mapY, mode); } diff --git a/engines/dm/inventory.cpp b/engines/dm/inventory.cpp index 5e2ccaa513..5463a21d85 100644 --- a/engines/dm/inventory.cpp +++ b/engines/dm/inventory.cpp @@ -440,7 +440,7 @@ void InventoryMan::f336_buildObjectAttributeString(int16 potentialAttribMask, in strcat(destString, suffixString); } -void InventoryMan::f335_drawPanelObjectDescriptionString(char* descString) { +void InventoryMan::f335_drawPanelObjectDescriptionString(char *descString) { if (descString[0] == '\f') { // form feed descString++; _g421_objDescTextXpos = 108; @@ -476,23 +476,22 @@ void InventoryMan::f335_drawPanelObjectDescriptionString(char* descString) { } } -Box g33_BoxArrowOrEye = Box(83, 98, 57, 65); // @ G0033_s_Graphic562_Box_ArrowOrEye - void InventoryMan::f339_drawPanelArrowOrEye(bool pressingEye) { + static Box boxArrowOrEye(83, 98, 57, 65); // @ G0033_s_Graphic562_Box_ArrowOrEye + DisplayMan &dispMan = *_vm->_displayMan; dispMan.f20_blitToViewport(_vm->_displayMan->f489_getNativeBitmapOrGraphic(pressingEye ? k19_EyeForObjectDescriptionIndice : k18_ArrowForChestContentIndice), - g33_BoxArrowOrEye, k8_byteWidth, k8_ColorRed, 9); + boxArrowOrEye, k8_byteWidth, k8_ColorRed, 9); } - -Box g34_BoxObjectDescCircle = Box(105, 136, 53, 79); // @ G0034_s_Graphic562_Box_ObjectDescriptionCircle - #define k0x0001_DescriptionMaskConsumable 0x0001 // @ MASK0x0001_DESCRIPTION_CONSUMABLE #define k0x0002_DescriptionMaskPoisoned 0x0002 // @ MASK0x0002_DESCRIPTION_POISONED #define k0x0004_DescriptionMaskBroken 0x0004 // @ MASK0x0004_DESCRIPTION_BROKEN #define k0x0008_DescriptionMaskCursed 0x0008 // @ MASK0x0008_DESCRIPTION_CURSED void InventoryMan::f342_drawPanelObject(Thing thingToDraw, bool pressingEye) { + static Box boxObjectDescCircle(105, 136, 53, 79); // @ G0034_s_Graphic562_Box_ObjectDescriptionCircle + DungeonMan &dunMan = *_vm->_dungeonMan; ObjectMan &objMan = *_vm->_objectMan; DisplayMan &dispMan = *_vm->_displayMan; @@ -515,7 +514,7 @@ void InventoryMan::f342_drawPanelObject(Thing thingToDraw, bool pressingEye) { dispMan.f20_blitToViewport(_vm->_displayMan->f489_getNativeBitmapOrGraphic(k20_PanelEmptyIndice), g32_BoxPanel, k72_byteWidth, k8_ColorRed, 73); dispMan.f20_blitToViewport(_vm->_displayMan->f489_getNativeBitmapOrGraphic(k29_ObjectDescCircleIndice), - g34_BoxObjectDescCircle, k16_byteWidth, k12_ColorDarkestGray, 27); + boxObjectDescCircle, k16_byteWidth, k12_ColorDarkestGray, 27); char *descString = nullptr; char str[40]; @@ -587,18 +586,24 @@ void InventoryMan::f342_drawPanelObject(Thing thingToDraw, bool pressingEye) { break; } case k10_JunkThingType: { - Junk *junk = (Junk *)rawThingPtr; if ((iconIndex >= k8_IconIndiceJunkWater) && (iconIndex <= k9_IconIndiceJunkWaterSkin)) { potentialAttribMask = 0; char *descString_EN_ANY[4] = {"(EMPTY)", "(ALMOST EMPTY)", "(ALMOST FULL)", "(FULL)"}; char *descString_DE_DEU[4] = {"(LEER)", "(FAST LEER)", "(FAST VOLL)", "(VOLL)"}; char *descString_FR_FRA[4] = {"(VIDE)", "(PRESQUE VIDE)", "(PRESQUE PLEINE)", "(PLEINE)"}; + Junk *junk = (Junk *)rawThingPtr; switch (_vm->getGameLanguage()) { // localized default: - case Common::EN_ANY: descString = descString_EN_ANY[junk->getChargeCount()]; break; - case Common::DE_DEU: descString = descString_DE_DEU[junk->getChargeCount()]; break; - case Common::FR_FRA: descString = descString_FR_FRA[junk->getChargeCount()]; break; + case Common::EN_ANY: + descString = descString_EN_ANY[junk->getChargeCount()]; + break; + case Common::DE_DEU: + descString = descString_DE_DEU[junk->getChargeCount()]; + break; + case Common::FR_FRA: + descString = descString_FR_FRA[junk->getChargeCount()]; + break; } f335_drawPanelObjectDescriptionString(descString); @@ -607,9 +612,15 @@ void InventoryMan::f342_drawPanelObject(Thing thingToDraw, bool pressingEye) { switch (_vm->getGameLanguage()) { // localized default: - case Common::EN_ANY: strcpy(str, "PARTY FACING "); break; - case Common::DE_DEU: strcpy(str, "GRUPPE BLICKT NACH "); break; - case Common::FR_FRA: strcpy(str, "GROUPE FACE "); break; + case Common::EN_ANY: + strcpy(str, "PARTY FACING "); + break; + case Common::DE_DEU: + strcpy(str, "GRUPPE BLICKT NACH "); + break; + case Common::FR_FRA: + strcpy(str, "GROUPE FACE "); + break; } @@ -625,11 +636,14 @@ void InventoryMan::f342_drawPanelObject(Thing thingToDraw, bool pressingEye) { f335_drawPanelObjectDescriptionString(str); } else { + Junk *junk = (Junk *)rawThingPtr; potentialAttribMask = k0x0001_DescriptionMaskConsumable; actualAttribMask = _vm->_dungeonMan->_objectInfo[k127_ObjectInfoIndexFirstJunk + junk->getType()].getAllowedSlots(); } break; } + default: + break; } // end of switch if (potentialAttribMask) { @@ -1006,7 +1020,8 @@ void InventoryMan::f349_processCommand70_clickOnMouth() { case k14_PotionTypeVi: AL1088_ui_HealWoundIterationCount = MAX(1, (((Potion*)L1082_ps_Junk)->getPower() / 42)); L1083_ps_Champion->_currHealth += L1083_ps_Champion->_maxHealth / L1086_ui_Counter; - if (L1087_i_Wounds = L1083_ps_Champion->_wounds) { /* If the champion is wounded */ + L1087_i_Wounds = L1083_ps_Champion->_wounds; + if (L1087_i_Wounds) { /* If the champion is wounded */ L1086_ui_Counter = 10; do { for (AL1085_ui_Counter = 0; AL1085_ui_Counter < AL1088_ui_HealWoundIterationCount; AL1085_ui_Counter++) { @@ -1019,19 +1034,21 @@ void InventoryMan::f349_processCommand70_clickOnMouth() { break; case k15_PotionTypeWaterFlask: L1083_ps_Champion->_water = MIN(L1083_ps_Champion->_water + 1600, 2048); + break; + default: + break; } ((Potion*)L1082_ps_Junk)->setType(k20_PotionTypeEmptyFlask); - } else { - if ((L1079_ui_IconIndex >= k168_IconIndiceJunkApple) && (L1079_ui_IconIndex < k176_IconIndiceJunkIronKey)) { - L1083_ps_Champion->_food = MIN(L1083_ps_Champion->_food + G0242_ai_Graphic559_FoodAmounts[L1079_ui_IconIndex - k168_IconIndiceJunkApple], 2048); - } + } else if ((L1079_ui_IconIndex >= k168_IconIndiceJunkApple) && (L1079_ui_IconIndex < k176_IconIndiceJunkIronKey)) { + L1083_ps_Champion->_food = MIN(L1083_ps_Champion->_food + G0242_ai_Graphic559_FoodAmounts[L1079_ui_IconIndex - k168_IconIndiceJunkApple], 2048); } - if (L1083_ps_Champion->_currStamina > L1083_ps_Champion->_maxStamina) { + + if (L1083_ps_Champion->_currStamina > L1083_ps_Champion->_maxStamina) L1083_ps_Champion->_currStamina = L1083_ps_Champion->_maxStamina; - } - if (L1083_ps_Champion->_currHealth > L1083_ps_Champion->_maxHealth) { + + if (L1083_ps_Champion->_currHealth > L1083_ps_Champion->_maxHealth) L1083_ps_Champion->_currHealth = L1083_ps_Champion->_maxHealth; - } + if (L1081_B_RemoveObjectFromLeaderHand) { for (L1086_ui_Counter = 5; --L1086_ui_Counter; _vm->f22_delay(8)) { /* Animate mouth icon */ _vm->_objectMan->f37_drawIconToScreen(k205_IconIndiceMouthOpen + !(L1086_ui_Counter & 0x0001), 56, 46); diff --git a/engines/dm/menus.cpp b/engines/dm/menus.cpp index 9aaff30f46..30fe420c07 100644 --- a/engines/dm/menus.cpp +++ b/engines/dm/menus.cpp @@ -42,63 +42,63 @@ namespace DM { -unsigned char g496_ActionSkillIndex[44] = { // @ G0496_auc_Graphic560_ActionSkillIndex - 0, /* N */ - 7, /* BLOCK */ - 6, /* CHOP */ - 0, /* X */ - 14, /* BLOW HORN */ - 12, /* FLIP */ - 9, /* PUNCH */ - 9, /* KICK */ - 7, /* WAR CRY Atari ST Versions 1.0 1987-12-08 1987-12-11 1.1: 14 */ - 9, /* STAB */ - 8, /* CLIMB DOWN */ - 14, /* FREEZE LIFE */ - 9, /* HIT */ - 4, /* SWING */ - 5, /* STAB */ - 5, /* THRUST */ - 5, /* JAB */ - 7, /* PARRY */ - 4, /* HACK */ - 4, /* BERZERK */ - 16, /* FIREBALL */ - 17, /* DISPELL */ - 14, /* CONFUSE */ - 17, /* LIGHTNING */ - 17, /* DISRUPT */ - 6, /* MELEE */ - 8, /* X */ - 3, /* INVOKE */ - 4, /* SLASH */ - 4, /* CLEAVE */ - 6, /* BASH */ - 6, /* STUN */ - 11, /* SHOOT */ - 15, /* SPELLSHIELD */ - 15, /* FIRESHIELD */ - 3, /* FLUXCAGE */ - 13, /* HEAL */ - 14, /* CALM */ - 17, /* LIGHT */ - 18, /* WINDOW */ - 16, /* SPIT */ - 14, /* BRANDISH */ - 10, /* THROW */ - 3}; /* FUSE */ - - -Box g499_BoxActionArea3ActionMenu = Box(224, 319, 77, 121); // @ G0499_s_Graphic560_Box_ActionArea3ActionsMenu -Box g500_BoxActionArea2ActionMenu = Box(224, 319, 77, 109); // @ G0500_s_Graphic560_Box_ActionArea2ActionsMenu -Box g501_BoxActionArea1ActionMenu = Box(224, 319, 77, 97); // @ G0501_s_Graphic560_Box_ActionArea1ActionMenu -Box g1_BoxActionArea = Box(224, 319, 77, 121); // @ G0001_s_Graphic562_Box_ActionArea -byte g498_PalChangesActionAreaObjectIcon[16] = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 40, 0, 0, 0}; // @ G0498_auc_Graphic560_PaletteChanges_ActionAreaObjectIcon - -Box gK74_BoxSpellAreaLine = Box(0, 95, 0, 11); // @ K0074_s_Box_SpellAreaLine -Box gK75_BoxSpellAreaLine2 = Box(224, 319, 50, 61); // @ K0075_s_Box_SpellAreaLine2 -Box gK76_BoxSpellAreaLine3 = Box(224, 319, 62, 73); // @ K0076_s_Box_SpellAreaLine3 -Box g0_BoxSpellArea = Box(224, 319, 42, 74); +void MenuMan::initConstants() { + static unsigned char actionSkillIndex[44] = { // @ G0496_auc_Graphic560_ActionSkillIndex + 0, /* N */ + 7, /* BLOCK */ + 6, /* CHOP */ + 0, /* X */ + 14, /* BLOW HORN */ + 12, /* FLIP */ + 9, /* PUNCH */ + 9, /* KICK */ + 7, /* WAR CRY Atari ST Versions 1.0 1987-12-08 1987-12-11 1.1: 14 */ + 9, /* STAB */ + 8, /* CLIMB DOWN */ + 14, /* FREEZE LIFE */ + 9, /* HIT */ + 4, /* SWING */ + 5, /* STAB */ + 5, /* THRUST */ + 5, /* JAB */ + 7, /* PARRY */ + 4, /* HACK */ + 4, /* BERZERK */ + 16, /* FIREBALL */ + 17, /* DISPELL */ + 14, /* CONFUSE */ + 17, /* LIGHTNING */ + 17, /* DISRUPT */ + 6, /* MELEE */ + 8, /* X */ + 3, /* INVOKE */ + 4, /* SLASH */ + 4, /* CLEAVE */ + 6, /* BASH */ + 6, /* STUN */ + 11, /* SHOOT */ + 15, /* SPELLSHIELD */ + 15, /* FIRESHIELD */ + 3, /* FLUXCAGE */ + 13, /* HEAL */ + 14, /* CALM */ + 17, /* LIGHT */ + 18, /* WINDOW */ + 16, /* SPIT */ + 14, /* BRANDISH */ + 10, /* THROW */ + 3 /* FUSE */ + }; + + boxActionArea1ActionMenu = Box(224, 319, 77, 97); // @ G0501_s_Graphic560_Box_ActionArea1ActionMenu + boxActionArea2ActionMenu = Box(224, 319, 77, 109); // @ G0500_s_Graphic560_Box_ActionArea2ActionsMenu + boxActionArea3ActionMenu = Box(224, 319, 77, 121); // @ G0499_s_Graphic560_Box_ActionArea3ActionsMenu + boxActionArea = Box(224, 319, 77, 121); // @ G0001_s_Graphic562_Box_ActionArea + boxSpellArea = Box(224, 319, 42, 74); + + for (int i = 0; i < 40; i++) + g496_ActionSkillIndex[i] = actionSkillIndex[i]; +} MenuMan::MenuMan(DMEngine *vm) : _vm(vm) { _g508_refreshActionArea = false; @@ -109,6 +109,8 @@ MenuMan::MenuMan(DMEngine *vm) : _vm(vm) { _gK73_bitmapSpellAreaLines = new byte[3 * 96 * 12]; _g517_actionTargetGroupThing = Thing(0); _g507_actionCount = 0; + + initConstants(); } MenuMan::~MenuMan() { @@ -133,6 +135,8 @@ void MenuMan::f388_clearActingChampion() { } void MenuMan::f386_drawActionIcon(ChampionIndex championIndex) { + static byte palChangesActionAreaObjectIcon[16] = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 40, 0, 0, 0}; // @ G0498_auc_Graphic560_PaletteChanges_ActionAreaObjectIcon + if (!_g509_actionAreaContainsIcons) return; DisplayMan &dm = *_vm->_displayMan; @@ -160,7 +164,7 @@ void MenuMan::f386_drawActionIcon(ChampionIndex championIndex) { goto T0386006; } _vm->_objectMan->f36_extractIconFromBitmap(iconIndex, bitmapIcon); - dm.f129_blitToBitmapShrinkWithPalChange(bitmapIcon, bitmapIcon, 16, 16, 16, 16, g498_PalChangesActionAreaObjectIcon); + dm.f129_blitToBitmapShrinkWithPalChange(bitmapIcon, bitmapIcon, 16, 16, 16, 16, palChangesActionAreaObjectIcon); T0386006: dm.D24_fillScreenBox(box, k4_ColorCyan); Box box2; @@ -185,8 +189,8 @@ void MenuMan::f456_drawDisabledMenu() { } else { _vm->_displayMan->f136_shadeScreenBox(&_vm->_displayMan->_boxMovementArrows, k0_ColorBlack); } - _vm->_displayMan->f136_shadeScreenBox(&g0_BoxSpellArea, k0_ColorBlack); - _vm->_displayMan->f136_shadeScreenBox(&g1_BoxActionArea, k0_ColorBlack); + _vm->_displayMan->f136_shadeScreenBox(&boxSpellArea, k0_ColorBlack); + _vm->_displayMan->f136_shadeScreenBox(&boxActionArea, k0_ColorBlack); _vm->_eventMan->f67_setMousePointerToNormal(k0_pointerArrow); } } @@ -253,16 +257,16 @@ void MenuMan::f387_drawActionArea() { _vm->_eventMan->f77_hideMouse(); dispMan._g578_useByteBoxCoordinates = false; - dispMan.D24_fillScreenBox(g1_BoxActionArea, k0_ColorBlack); + dispMan.D24_fillScreenBox(boxActionArea, k0_ColorBlack); if (_g509_actionAreaContainsIcons) { for (uint16 champIndex = k0_ChampionFirst; champIndex < champMan._g305_partyChampionCount; ++champIndex) f386_drawActionIcon((ChampionIndex)champIndex); } else if (champMan._g506_actingChampionOrdinal) { - Box box = g499_BoxActionArea3ActionMenu; + Box box = boxActionArea3ActionMenu; if (_g713_actionList._actionIndices[2] == k255_ChampionActionNone) - box = g500_BoxActionArea2ActionMenu; + box = boxActionArea2ActionMenu; if (_g713_actionList._actionIndices[1] == k255_ChampionActionNone) - box = g501_BoxActionArea1ActionMenu; + box = boxActionArea1ActionMenu; dispMan.f21_blitToScreen(_vm->_displayMan->f489_getNativeBitmapOrGraphic(k10_MenuActionAreaIndice), &box, k48_byteWidth, kM1_ColorNoTransparency, 45); textMan.f41_printWithTrailingSpaces(dispMan._g348_bitmapScreen, k160_byteWidthScreen, @@ -365,11 +369,13 @@ T0393003: #define k3_SpellAreaChampionSymbols 3 // @ C3_SPELL_AREA_CHAMPION_SYMBOLS void MenuMan::f392_buildSpellAreaLine(int16 spellAreaBitmapLine) { + static Box boxSpellAreaLine(0, 95, 0, 11); // @ K0074_s_Box_SpellAreaLine + char L1204_ac_SpellSymbolString[2] = {'\0', '\0'}; Champion *L1203_ps_Champion = &_vm->_championMan->_gK71_champions[_vm->_championMan->_g514_magicCasterChampionIndex]; if (spellAreaBitmapLine == k2_SpellAreaAvailableSymbols) { _vm->_displayMan->_g578_useByteBoxCoordinates = false; - _vm->_displayMan->f132_blitToBitmap(_gK73_bitmapSpellAreaLines, _gK72_bitmapSpellAreaLine, gK74_BoxSpellAreaLine, 0, 12, k48_byteWidth, k48_byteWidth, kM1_ColorNoTransparency, 36, 12); + _vm->_displayMan->f132_blitToBitmap(_gK73_bitmapSpellAreaLines, _gK72_bitmapSpellAreaLine, boxSpellAreaLine, 0, 12, k48_byteWidth, k48_byteWidth, kM1_ColorNoTransparency, 36, 12); int16 x = 1; char character = 96 + (6 * L1203_ps_Champion->_symbolStep); for (uint16 symbolIndex = 0; symbolIndex < 6; symbolIndex++) { @@ -378,7 +384,7 @@ void MenuMan::f392_buildSpellAreaLine(int16 spellAreaBitmapLine) { } } else if (spellAreaBitmapLine == k3_SpellAreaChampionSymbols) { _vm->_displayMan->_g578_useByteBoxCoordinates = false; - _vm->_displayMan->f132_blitToBitmap(_gK73_bitmapSpellAreaLines, _gK72_bitmapSpellAreaLine, gK74_BoxSpellAreaLine, 0, 24, k48_byteWidth, k48_byteWidth, kM1_ColorNoTransparency, 36, 12); + _vm->_displayMan->f132_blitToBitmap(_gK73_bitmapSpellAreaLines, _gK72_bitmapSpellAreaLine, boxSpellAreaLine, 0, 24, k48_byteWidth, k48_byteWidth, kM1_ColorNoTransparency, 36, 12); int16 x = 8; for (uint16 symbolIndex = 0; symbolIndex < 4; symbolIndex++) { if ((L1204_ac_SpellSymbolString[0] = L1203_ps_Champion->_symbols[symbolIndex]) == '\0') @@ -389,6 +395,9 @@ void MenuMan::f392_buildSpellAreaLine(int16 spellAreaBitmapLine) { } void MenuMan::f394_setMagicCasterAndDrawSpellArea(int16 champIndex) { + static Box boxSpellAreaLine2(224, 319, 50, 61); // @ K0075_s_Box_SpellAreaLine2 + static Box boxSpellAreaLine3(224, 319, 62, 73); // @ K0076_s_Box_SpellAreaLine3 + Champion* L1213_ps_Champion; if ((champIndex == _vm->_championMan->_g514_magicCasterChampionIndex) || ((champIndex != kM1_ChampionNone) && !_vm->_championMan->_gK71_champions[champIndex]._currHealth)) { @@ -396,14 +405,14 @@ void MenuMan::f394_setMagicCasterAndDrawSpellArea(int16 champIndex) { } if (_vm->_championMan->_g514_magicCasterChampionIndex == kM1_ChampionNone) { _vm->_eventMan->f78_showMouse(); - _vm->_displayMan->f21_blitToScreen(_vm->_displayMan->f489_getNativeBitmapOrGraphic(k9_MenuSpellAreaBackground), &g0_BoxSpellArea, k48_byteWidth, kM1_ColorNoTransparency, 33); + _vm->_displayMan->f21_blitToScreen(_vm->_displayMan->f489_getNativeBitmapOrGraphic(k9_MenuSpellAreaBackground), &boxSpellArea, k48_byteWidth, kM1_ColorNoTransparency, 33); _vm->_eventMan->f77_hideMouse(); } if (champIndex == kM1_ChampionNone) { _vm->_championMan->_g514_magicCasterChampionIndex = kM1_ChampionNone; _vm->_eventMan->f78_showMouse(); _vm->_displayMan->_g578_useByteBoxCoordinates = false; - _vm->_displayMan->D24_fillScreenBox(g0_BoxSpellArea, k0_ColorBlack); + _vm->_displayMan->D24_fillScreenBox(boxSpellArea, k0_ColorBlack); _vm->_eventMan->f77_hideMouse(); return; } @@ -411,9 +420,9 @@ void MenuMan::f394_setMagicCasterAndDrawSpellArea(int16 champIndex) { f392_buildSpellAreaLine(k2_SpellAreaAvailableSymbols); _vm->_eventMan->f78_showMouse(); f393_drawSpellAreaControls((ChampionIndex)champIndex); - _vm->_displayMan->f21_blitToScreen(_gK72_bitmapSpellAreaLine, &gK75_BoxSpellAreaLine2, k48_byteWidth, kM1_ColorNoTransparency, 12); + _vm->_displayMan->f21_blitToScreen(_gK72_bitmapSpellAreaLine, &boxSpellAreaLine2, k48_byteWidth, kM1_ColorNoTransparency, 12); f392_buildSpellAreaLine(k3_SpellAreaChampionSymbols); - _vm->_displayMan->f21_blitToScreen(_gK72_bitmapSpellAreaLine, &gK76_BoxSpellAreaLine3, k48_byteWidth, kM1_ColorNoTransparency, 12); + _vm->_displayMan->f21_blitToScreen(_gK72_bitmapSpellAreaLine, &boxSpellAreaLine3, k48_byteWidth, kM1_ColorNoTransparency, 12); _vm->_eventMan->f77_hideMouse(); } @@ -1708,7 +1717,7 @@ void MenuMan::f385_drawActionDamage(int16 damage) { _vm->_eventMan->f78_showMouse(); _vm->_displayMan->_g578_useByteBoxCoordinates = false; - _vm->_displayMan->D24_fillScreenBox(g1_BoxActionArea, k0_ColorBlack); + _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"}; @@ -1735,7 +1744,7 @@ void MenuMan::f385_drawActionDamage(int16 damage) { _vm->_textMan->f53_printToLogicalScreen(AL1176_i_X, 100, k4_ColorCyan, k0_ColorBlack, (char *)AL1178_puc_String); } else { if (damage > 40) { - L1180_ps_Box = &g499_BoxActionArea3ActionMenu; + L1180_ps_Box = &boxActionArea3ActionMenu; L1177_puc_Bitmap = _vm->_displayMan->f489_getNativeBitmapOrGraphic(k14_damageToCreatureIndice); L1175_i_ByteWidth = k48_byteWidth; L1643_i_Width = 45; diff --git a/engines/dm/menus.h b/engines/dm/menus.h index 40bcfbf689..34f8355251 100644 --- a/engines/dm/menus.h +++ b/engines/dm/menus.h @@ -39,9 +39,6 @@ namespace DM { #define k0x8000_hitNonMaterialCreatures 0x8000 // @ MASK0x8000_HIT_NON_MATERIAL_CREATURES -extern Box g1_BoxActionArea; // @ G0001_s_Graphic562_Box_ActionArea -extern Box g0_BoxSpellArea; // @ G0000_s_Graphic562_Box_SpellArea - class ActionList { public: byte _minimumSkillLevel[3]; /* Bit 7: requires charge, Bit 6-0: minimum skill level. */ @@ -118,6 +115,15 @@ public: void f383_setActionList(ActionSet *actionSet); // @ F0383_MENUS_SetActionList int16 f382_getActionObjectChargeCount(); // @ F0382_MENUS_GetActionObjectChargeCount void f385_drawActionDamage(int16 damage); // @ F0385_MENUS_DrawActionDamage + + Box boxActionArea3ActionMenu; // @ G0499_s_Graphic560_Box_ActionArea3ActionsMenu + Box boxActionArea2ActionMenu; // @ G0500_s_Graphic560_Box_ActionArea2ActionsMenu + Box boxActionArea1ActionMenu; // @ G0501_s_Graphic560_Box_ActionArea1ActionMenu + Box boxActionArea; // @ G0001_s_Graphic562_Box_ActionArea + Box boxSpellArea; + unsigned char g496_ActionSkillIndex[44]; // @ G0496_auc_Graphic560_ActionSkillIndex + + void initConstants(); }; } |