aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
authorBendegúz Nagy2016-07-07 20:15:38 +0200
committerBendegúz Nagy2016-08-26 23:02:22 +0200
commit0d4b09980e7b7bb3cb0a63b9df6de7e01067a977 (patch)
tree22f68b71ed6fe1b4b7689caa17a6dcb8685a6b63 /engines
parent723c96fffe2d0eb1775983f3059828ac58354a0e (diff)
downloadscummvm-rg350-0d4b09980e7b7bb3cb0a63b9df6de7e01067a977.tar.gz
scummvm-rg350-0d4b09980e7b7bb3cb0a63b9df6de7e01067a977.tar.bz2
scummvm-rg350-0d4b09980e7b7bb3cb0a63b9df6de7e01067a977.zip
DM: Replace ChampionMan::f292_drawChampionState with original
Diffstat (limited to 'engines')
-rw-r--r--engines/dm/champion.cpp297
-rw-r--r--engines/dm/eventman.cpp4
-rw-r--r--engines/dm/gfx.cpp201
-rw-r--r--engines/dm/gfx.h7
-rw-r--r--engines/dm/inventory.cpp64
-rw-r--r--engines/dm/inventory.h1
-rw-r--r--engines/dm/menus.cpp16
-rw-r--r--engines/dm/objectman.cpp6
-rw-r--r--engines/dm/text.cpp2
9 files changed, 329 insertions, 269 deletions
diff --git a/engines/dm/champion.cpp b/engines/dm/champion.cpp
index 644914081e..96604e3140 100644
--- a/engines/dm/champion.cpp
+++ b/engines/dm/champion.cpp
@@ -1187,7 +1187,7 @@ void ChampionMan::f280_addCandidateChampionToParty(uint16 championPortraitIndex)
{ // limit destBox scope
Box &destBox = gBoxChampionPortrait;
dispMan.f132_blitToBitmap(dispMan.f489_getNativeBitmapOrGraphic(k26_ChampionPortraitsIndice), champ->_portrait,
- destBox, M27_getChampionPortraitX(championPortraitIndex), M28_getChampionPortraitY(championPortraitIndex), 128, 16, k255_ColorNoTransparency);
+ destBox, M27_getChampionPortraitX(championPortraitIndex), M28_getChampionPortraitY(championPortraitIndex), 128, 16, kM1_ColorNoTransparency);
}
champ->_actionIndex = k255_ChampionActionNone;
@@ -1442,186 +1442,175 @@ uint16 ChampionMan::f309_getMaximumLoad(Champion *champ) {
}
void ChampionMan::f292_drawChampionState(ChampionIndex champIndex) {
- InventoryMan &invMan = *_vm->_inventoryMan;
- DisplayMan &dispMan = *_vm->_displayMan;
- MenuMan &menuMan = *_vm->_menuMan;
- EventManager &eventMan = *_vm->_eventMan;
-
- Box box;
- int16 champStatusBoxX = champIndex * k69_ChampionStatusBoxSpacing;
- Champion *champ = &_gK71_champions[champIndex];
- uint16 champAttributes = champ->getAttributes();
- if (!((champAttributes) & (k0x0080_ChampionAttributeNameTitle | k0x0100_ChampionAttributeStatistics | k0x0200_ChampionAttributeLoad | k0x0400_ChampionAttributeIcon |
- k0x0800_ChampionAttributePanel | k0x1000_ChampionAttributeStatusBox | k0x2000_ChampionAttributeWounds | k0x4000_ChampionAttributeViewport |
- k0x8000_ChampionAttributeActionHand))) {
+ uint16 L0862_ui_ChampionAttributes;
+ bool L0863_B_IsInventoryChampion;
+ int16 L0864_i_Multiple;
+#define AL0864_i_BorderCount L0864_i_Multiple
+#define AL0864_i_ColorIndex L0864_i_Multiple
+#define AL0864_i_Load L0864_i_Multiple
+#define AL0864_i_ChampionIconIndex L0864_i_Multiple
+#define AL0864_i_StatisticIndex L0864_i_Multiple
+#define AL0864_i_SlotIndex L0864_i_Multiple
+ Champion* L0865_ps_Champion;
+ char* L0866_pc_ChampionName;
+ char L0867_c_ChampionTitleFirstCharacter;
+ int16 L0868_i_ChampionStatusBoxX;
+ int16 L0869_i_ChampionTitleX;
+ int16 L0870_i_Multiple;
+#define AL0870_i_NativeBitmapIndex L0870_i_Multiple
+#define AL0870_i_Color L0870_i_Multiple
+ Box L0871_s_Box;
+ int16 L0872_ai_NativeBitmapIndices[3];
+
+
+ L0868_i_ChampionStatusBoxX = champIndex * k69_ChampionStatusBoxSpacing;
+ L0865_ps_Champion = &_vm->_championMan->_gK71_champions[champIndex];
+ L0862_ui_ChampionAttributes = L0865_ps_Champion->_attributes;
+ if (!getFlag(L0862_ui_ChampionAttributes, k0x0080_ChampionAttributeNameTitle | k0x0100_ChampionAttributeStatistics | k0x0200_ChampionAttributeLoad | k0x0400_ChampionAttributeIcon | k0x0800_ChampionAttributePanel | k0x1000_ChampionAttributeStatusBox | k0x2000_ChampionAttributeWounds | k0x4000_ChampionAttributeViewport | k0x8000_ChampionAttributeActionHand)) {
return;
}
- bool isInventoryChamp = (_vm->M0_indexToOrdinal(champIndex) == invMan._g432_inventoryChampionOrdinal);
- dispMan._g578_useByteBoxCoordinates = false;
- if (champAttributes & k0x1000_ChampionAttributeStatusBox) {
- box._y1 = 0;
- box._y2 = 28;
- box._x1 = champStatusBoxX;
- box._x2 = box._x1 + 66;
- if (champ->_currHealth) {
- dispMan.D24_fillScreenBox(box, k12_ColorDarkestGray);
- int16 nativeBitmapIndices[3];
- for (int16 i = 0; i < 3; ++i)
- nativeBitmapIndices[i] = 0;
- int16 AL_0_borderCount = 0;
- if (_g407_party._fireShieldDefense > 0)
- nativeBitmapIndices[AL_0_borderCount++] = k38_BorderPartyFireshieldIndice;
- if (_g407_party._spellShieldDefense > 0)
- nativeBitmapIndices[AL_0_borderCount++] = k39_BorderPartySpellshieldIndice;
- if (_g407_party._shieldDefense > 0)
- nativeBitmapIndices[AL_0_borderCount++] = k37_BorderPartyShieldIndice;
- while (AL_0_borderCount--) {
- dispMan.f132_blitToBitmap(dispMan.f489_getNativeBitmapOrGraphic(nativeBitmapIndices[AL_0_borderCount]),
- dispMan._g348_bitmapScreen, box, 0, 0, 40, k160_byteWidthScreen, k10_ColorFlesh);
+ L0863_B_IsInventoryChampion = (_vm->M0_indexToOrdinal(champIndex) == _vm->_inventoryMan->_g432_inventoryChampionOrdinal);
+ _vm->_displayMan->_g578_useByteBoxCoordinates = false;
+ _vm->_eventMan->f78_showMouse();
+ if (getFlag(L0862_ui_ChampionAttributes, k0x1000_ChampionAttributeStatusBox)) {
+ L0871_s_Box._y1 = 0;
+ L0871_s_Box._y2 = 28;
+ L0871_s_Box._x2 = (L0871_s_Box._x1 = L0868_i_ChampionStatusBoxX) + 66;
+ if (L0865_ps_Champion->_currHealth) {
+ _vm->_displayMan->D24_fillScreenBox(L0871_s_Box, k12_ColorDarkestGray);
+ for (uint16 i = 0; i < 3; ++i)
+ L0872_ai_NativeBitmapIndices[i] = 0;
+ AL0864_i_BorderCount = 0;
+ if (_vm->_championMan->_g407_party._fireShieldDefense > 0) {
+ L0872_ai_NativeBitmapIndices[AL0864_i_BorderCount++] = k38_BorderPartyFireshieldIndice;
+ }
+ if (_vm->_championMan->_g407_party._spellShieldDefense > 0) {
+ L0872_ai_NativeBitmapIndices[AL0864_i_BorderCount++] = k39_BorderPartySpellshieldIndice;
+ }
+ if ((_vm->_championMan->_g407_party._shieldDefense > 0) || L0865_ps_Champion->_shieldDefense) {
+ L0872_ai_NativeBitmapIndices[AL0864_i_BorderCount++] = k37_BorderPartyShieldIndice;
}
- if (isInventoryChamp) {
- invMan.f354_drawStatusBoxPortrait(champIndex);
- champAttributes |= k0x0100_ChampionAttributeStatistics;
+ while (AL0864_i_BorderCount--) {
+ _vm->_displayMan->f21_blitToScreen(_vm->_displayMan->f489_getNativeBitmapOrGraphic(L0872_ai_NativeBitmapIndices[AL0864_i_BorderCount]), &L0871_s_Box, k40_byteWidth, k10_ColorFlesh, 29);
+ }
+ if (L0863_B_IsInventoryChampion) {
+ _vm->_inventoryMan->f354_drawStatusBoxPortrait(champIndex);
+ setFlag(L0862_ui_ChampionAttributes, k0x0100_ChampionAttributeStatistics);
} else {
- champAttributes |= (k0x0080_ChampionAttributeNameTitle | k0x0100_ChampionAttributeStatistics | k0x2000_ChampionAttributeWounds | k0x8000_ChampionAttributeActionHand);
+ setFlag(L0862_ui_ChampionAttributes, k0x0080_ChampionAttributeNameTitle | k0x0100_ChampionAttributeStatistics | k0x2000_ChampionAttributeWounds | k0x8000_ChampionAttributeActionHand);
}
} else {
- dispMan.f132_blitToBitmap(dispMan.f489_getNativeBitmapOrGraphic(k8_StatusBoxDeadChampion), dispMan._g348_bitmapScreen,
- box, 0, 0, 40, k160_byteWidthScreen, k255_ColorNoTransparency);
- _vm->_textMan->f53_printToLogicalScreen(champStatusBoxX + 1, 5, k13_ColorLightestGray, k1_ColorDarkGary, champ->_name);
- menuMan.f386_drawActionIcon(champIndex);
- goto T0292042_green;
- }
- }
-
- if (!champ->_currHealth)
- goto T0292042_green;
-
- if (champAttributes & k0x0080_ChampionAttributeNameTitle) {
- Color AL_0_colorIndex = (champIndex == _g411_leaderIndex) ? k9_ColorGold : k13_ColorLightestGray; // unused because of missing functions
- if (isInventoryChamp) {
- char *champName = champ->_name;
- _vm->_textMan->f52_printToViewport(3, 7, AL_0_colorIndex, champName);
- int16 champTitleX = 6 * strlen(champName) + 3;
- char champTitleFirstChar = champ->_title[0];
- if ((champTitleFirstChar != ',') && (champTitleFirstChar != ';') && (champTitleFirstChar != '-')) {
- champTitleX += 6;
+ _vm->_displayMan->f21_blitToScreen(_vm->_displayMan->f489_getNativeBitmapOrGraphic(k8_StatusBoxDeadChampion), &L0871_s_Box, k40_byteWidth, kM1_ColorNoTransparency, 29);
+ _vm->_textMan->f53_printToLogicalScreen(L0868_i_ChampionStatusBoxX + 1, 5, k13_ColorLightestGray, k1_ColorDarkGary, L0865_ps_Champion->_name);
+ _vm->_menuMan->f386_drawActionIcon(champIndex);
+ goto T0292042;
+ }
+ }
+ if (!(L0865_ps_Champion->_currHealth))
+ goto T0292042;
+ if (getFlag(L0862_ui_ChampionAttributes, k0x0080_ChampionAttributeNameTitle)) {
+ AL0864_i_ColorIndex = (champIndex == _vm->_championMan->_g411_leaderIndex) ? k9_ColorGold : k13_ColorLightestGray;
+ if (L0863_B_IsInventoryChampion) {
+ _vm->_textMan->f52_printToViewport(3, 7, (Color)AL0864_i_ColorIndex, L0866_pc_ChampionName = L0865_ps_Champion->_name);
+ L0869_i_ChampionTitleX = 6 * strlen(L0866_pc_ChampionName) + 3;
+ L0867_c_ChampionTitleFirstCharacter = L0865_ps_Champion->_title[0];
+ if ((L0867_c_ChampionTitleFirstCharacter != ',') && (L0867_c_ChampionTitleFirstCharacter != ';') && (L0867_c_ChampionTitleFirstCharacter != '-')) {
+ L0869_i_ChampionTitleX += 6;
}
- _vm->_textMan->f52_printToViewport(champTitleX, 7, AL_0_colorIndex, champ->_title);
- champAttributes |= k0x4000_ChampionAttributeViewport;
+ _vm->_textMan->f52_printToViewport(L0869_i_ChampionTitleX, 7, (Color)AL0864_i_ColorIndex, L0865_ps_Champion->_title);
+ setFlag(L0862_ui_ChampionAttributes, k0x4000_ChampionAttributeViewport);
} else {
- box._y1 = 0;
- box._y2 = 6;
- box._x1 = champStatusBoxX;
- box._x2 = box._x1 + 42;
- dispMan.D24_fillScreenBox(box, k1_ColorDarkGary);
- _vm->_textMan->f53_printToLogicalScreen(champStatusBoxX + 1, 5, AL_0_colorIndex, k1_ColorDarkGary, champ->_name);
- }
- }
-
- if (champAttributes & k0x0100_ChampionAttributeStatistics) {
- f287_drawChampionBarGraphs(champIndex);
- if (isInventoryChamp) {
- f290_drawHealthStaminaManaValues(champ);
- int16 AL_2_nativeBitmapIndex;
- if ((champ->_food < 0) || (champ->_water < 0) || (champ->_poisonEventCount)) {
- AL_2_nativeBitmapIndex = k34_SlotBoxWoundedIndice;
+ L0871_s_Box._y1 = 0;
+ L0871_s_Box._y2 = 6;
+ L0871_s_Box._x2 = (L0871_s_Box._x1 = L0868_i_ChampionStatusBoxX) + 42;
+ _vm->_displayMan->D24_fillScreenBox(L0871_s_Box, k1_ColorDarkGary);
+ _vm->_textMan->f53_printToLogicalScreen(L0868_i_ChampionStatusBoxX + 1, 5, (Color)AL0864_i_ColorIndex, k1_ColorDarkGary, L0865_ps_Champion->_name);
+ }
+ }
+ if (getFlag(L0862_ui_ChampionAttributes, k0x0100_ChampionAttributeStatistics)) {
+ _vm->_championMan->f287_drawChampionBarGraphs(champIndex);
+ if (L0863_B_IsInventoryChampion) {
+ _vm->_championMan->f290_drawHealthStaminaManaValues(L0865_ps_Champion);
+ if ((L0865_ps_Champion->_food < 0) || (L0865_ps_Champion->_water < 0) || (L0865_ps_Champion->_poisonEventCount)) {
+ AL0870_i_NativeBitmapIndex = k34_SlotBoxWoundedIndice;
} else {
- AL_2_nativeBitmapIndex = k33_SlotBoxNormalIndice;
+ AL0870_i_NativeBitmapIndex = k33_SlotBoxNormalIndice;
}
- dispMan.f132_blitToBitmap(dispMan.f489_getNativeBitmapOrGraphic(AL_2_nativeBitmapIndex), dispMan._g296_bitmapViewport,
- gBoxMouth, 0, 0, 16, k112_byteWidthViewport, k12_ColorDarkestGray);
- AL_2_nativeBitmapIndex = k33_SlotBoxNormalIndice;
- for (int16 AL_0_statisticIndex = k1_ChampionStatStrength; AL_0_statisticIndex <= k6_ChampionStatAntifire; AL_0_statisticIndex++) {
- if (champ->getStatistic((ChampionStatisticType)AL_0_statisticIndex, k1_ChampionStatCurrent)
- < champ->getStatistic((ChampionStatisticType)AL_0_statisticIndex, k0_ChampionStatMaximum)) {
- AL_2_nativeBitmapIndex = k34_SlotBoxWoundedIndice;
+ _vm->_displayMan->f20_blitToViewport(_vm->_displayMan->f489_getNativeBitmapOrGraphic(AL0870_i_NativeBitmapIndex), gBoxMouth, k16_byteWidth, k12_ColorDarkestGray, 18);
+ AL0870_i_NativeBitmapIndex = k33_SlotBoxNormalIndice;
+ for (AL0864_i_StatisticIndex = k1_ChampionStatStrength; AL0864_i_StatisticIndex <= k6_ChampionStatAntifire; AL0864_i_StatisticIndex++) {
+ if ((L0865_ps_Champion->_statistics[AL0864_i_StatisticIndex][k1_ChampionStatCurrent] < L0865_ps_Champion->_statistics[AL0864_i_StatisticIndex][k0_ChampionStatMaximum])) {
+ AL0870_i_NativeBitmapIndex = k34_SlotBoxWoundedIndice;
break;
}
}
- dispMan.f132_blitToBitmap(dispMan.f489_getNativeBitmapOrGraphic(AL_2_nativeBitmapIndex), dispMan._g296_bitmapViewport, gBoxEye,
- 0, 0, 16, k112_byteWidthViewport, k12_ColorDarkestGray);
- champAttributes |= k0x4000_ChampionAttributeViewport;
+ _vm->_displayMan->f20_blitToViewport(_vm->_displayMan->f489_getNativeBitmapOrGraphic(AL0870_i_NativeBitmapIndex), gBoxEye, k16_byteWidth, k12_ColorDarkestGray, 18);
+ setFlag(L0862_ui_ChampionAttributes, k0x4000_ChampionAttributeViewport);
}
}
-
- if (champAttributes & k0x2000_ChampionAttributeWounds) {
- for (int16 AL_0_slotIndex = isInventoryChamp ? k5_ChampionSlotFeet : k1_ChampionSlotActionHand; AL_0_slotIndex >= k0_ChampionSlotReadyHand; AL_0_slotIndex--) {
- f291_drawSlot(champIndex, (ChampionSlot)AL_0_slotIndex);
+ if (getFlag(L0862_ui_ChampionAttributes, k0x2000_ChampionAttributeWounds)) {
+ for (AL0864_i_SlotIndex = L0863_B_IsInventoryChampion ? k5_ChampionSlotFeet : k1_ChampionSlotActionHand; AL0864_i_SlotIndex >= k0_ChampionSlotReadyHand; AL0864_i_SlotIndex--) {
+ _vm->_championMan->f291_drawSlot(champIndex, AL0864_i_SlotIndex);
}
- if (isInventoryChamp) {
- champAttributes |= k0x4000_ChampionAttributeViewport;
+ if (L0863_B_IsInventoryChampion) {
+ setFlag(L0862_ui_ChampionAttributes, k0x4000_ChampionAttributeViewport);
}
}
-
- if ((champAttributes & k0x0200_ChampionAttributeLoad) && isInventoryChamp) {
- Color loadColor;
- int16 champMaxLoad = f309_getMaximumLoad(champ);
- if (champ->_load > champMaxLoad) {
- loadColor = k8_ColorRed;
- } else if (((int32)champ->_load) * 8 > ((int32)champMaxLoad) * 5) {
- loadColor = k11_ColorYellow;
+ if (getFlag(L0862_ui_ChampionAttributes, k0x0200_ChampionAttributeLoad) && L0863_B_IsInventoryChampion) {
+ if (L0865_ps_Champion->_load > (AL0864_i_Load = _vm->_championMan->f309_getMaximumLoad(L0865_ps_Champion))) {
+ AL0870_i_Color = k8_ColorRed;
} else {
- loadColor = k13_ColorLightestGray;
- }
- _vm->_textMan->f52_printToViewport(104, 132, loadColor, "LOAD ");
-
- int16 loadTmp = champ->_load / 10;
- Common::String str = f288_getStringFromInteger(loadTmp, true, 3);
- str += '.';
- loadTmp = champ->_load - (loadTmp * 10);
- str += f288_getStringFromInteger(loadTmp, false, 1);
- str += '/';
- loadTmp = (f309_getMaximumLoad(champ) + 5) / 10;
- str += "KG";
- _vm->_textMan->f52_printToViewport(148, 132, loadColor, str.c_str());
- champAttributes |= k0x4000_ChampionAttributeViewport;
- }
-
- { // block so goto won't skip AL_0_championIconIndex initialization
- int16 AL_0_championIconIndex = M26_championIconIndex(champ->_cell, _vm->_dungeonMan->_g308_partyDir);
-
- if ((champAttributes & k28_ChampionIcons) && (eventMan._g599_useChampionIconOrdinalAsMousePointerBitmap != _vm->M0_indexToOrdinal(AL_0_championIconIndex))) {
- dispMan.D24_fillScreenBox(g54_BoxChampionIcons[AL_0_championIconIndex], g46_ChampionColor[champIndex]);
- dispMan.f132_blitToBitmap(dispMan.f489_getNativeBitmapOrGraphic(k28_ChampionIcons),
- dispMan._g348_bitmapScreen,
- g54_BoxChampionIcons[AL_0_championIconIndex << 2],
- M26_championIconIndex(champ->_dir, _vm->_dungeonMan->_g308_partyDir) * 19, 0,
- 40, k160_byteWidthScreen, k12_ColorDarkestGray);
+ if (((long)L0865_ps_Champion->_load << 3) > ((long)AL0864_i_Load * 5)) {
+ AL0870_i_Color = k11_ColorYellow;
+ } else {
+ AL0870_i_Color = k13_ColorLightestGray;
+ }
}
- }
-
- if ((champAttributes & k0x0800_ChampionAttributePanel) && isInventoryChamp) {
+ _vm->_textMan->f52_printToViewport(104, 132, (Color)AL0870_i_Color, "LOAD ");
+ AL0864_i_Load = L0865_ps_Champion->_load / 10;
+ strcpy(_vm->_g353_stringBuildBuffer, _vm->_championMan->f288_getStringFromInteger(AL0864_i_Load, true, 3).c_str());
+ strcat(_vm->_g353_stringBuildBuffer, ".");
+ AL0864_i_Load = L0865_ps_Champion->_load - (AL0864_i_Load * 10);
+ strcat(_vm->_g353_stringBuildBuffer, _vm->_championMan->f288_getStringFromInteger(AL0864_i_Load, false, 1).c_str());
+ strcat(_vm->_g353_stringBuildBuffer, "/");
+ AL0864_i_Load = (_vm->_championMan->f309_getMaximumLoad(L0865_ps_Champion) + 5) / 10;
+ strcat(_vm->_g353_stringBuildBuffer, _vm->_championMan->f288_getStringFromInteger(AL0864_i_Load, true, 3).c_str());
+ strcat(_vm->_g353_stringBuildBuffer, " KG");
+ _vm->_textMan->f52_printToViewport(148, 132, (Color)AL0870_i_Color, _vm->_g353_stringBuildBuffer);
+ setFlag(L0862_ui_ChampionAttributes, k0x4000_ChampionAttributeViewport);
+ }
+ AL0864_i_ChampionIconIndex = _vm->_championMan->M26_championIconIndex(L0865_ps_Champion->_cell, _vm->_dungeonMan->_g308_partyDir);
+ if (getFlag(L0862_ui_ChampionAttributes, k0x0400_ChampionAttributeIcon) && (_vm->_eventMan->_g599_useChampionIconOrdinalAsMousePointerBitmap != _vm->M0_indexToOrdinal(AL0864_i_ChampionIconIndex))) {
+ _vm->_displayMan->D24_fillScreenBox(g54_BoxChampionIcons[AL0864_i_ChampionIconIndex << 2], g46_ChampionColor[champIndex]);
+ _vm->_displayMan->f132_blitToBitmap(_vm->_displayMan->f489_getNativeBitmapOrGraphic(k28_ChampionIcons), _vm->_displayMan->_g348_bitmapScreen, g54_BoxChampionIcons[AL0864_i_ChampionIconIndex << 2], _vm->_championMan->M26_championIconIndex(L0865_ps_Champion->_dir, _vm->_dungeonMan->_g308_partyDir) * 19, 0, k40_byteWidth, k160_byteWidthScreen, k12_ColorDarkestGray, 14, k200_heightScreen);
+ }
+ if (getFlag(L0862_ui_ChampionAttributes, k0x0800_ChampionAttributePanel) && L0863_B_IsInventoryChampion) {
if (_vm->_g333_pressingMouth) {
- invMan.f345_drawPanelFoodWaterPoisoned();
- } else if (_vm->_g331_pressingEye) {
- if (_g415_leaderEmptyHanded) {
- warning("MISSING CODE: F0351_INVENTORY_DrawChampionSkillsAndStatistics");
- }
+ _vm->_inventoryMan->f345_drawPanelFoodWaterPoisoned();
} else {
- invMan.f347_drawPanel();
+ if (_vm->_g331_pressingEye) {
+ if (_vm->_championMan->_g415_leaderEmptyHanded) {
+ _vm->_inventoryMan->f351_drawChampionSkillsAndStatistics();
+ }
+ } else {
+ _vm->_inventoryMan->f347_drawPanel();
+ }
}
- champAttributes |= k0x4000_ChampionAttributeViewport;
+ setFlag(L0862_ui_ChampionAttributes, k0x4000_ChampionAttributeViewport);
}
-
- if (champAttributes & k0x8000_ChampionAttributeActionHand) {
- f291_drawSlot(champIndex, k1_ChampionSlotActionHand);
- menuMan.f386_drawActionIcon(champIndex);
- if (isInventoryChamp) {
- champAttributes |= k0x4000_ChampionAttributeViewport;
+ if (getFlag(L0862_ui_ChampionAttributes, k0x8000_ChampionAttributeActionHand)) {
+ _vm->_championMan->f291_drawSlot(champIndex, k1_ChampionSlotActionHand);
+ _vm->_menuMan->f386_drawActionIcon(champIndex);
+ if (L0863_B_IsInventoryChampion) {
+ setFlag(L0862_ui_ChampionAttributes, k0x4000_ChampionAttributeViewport);
}
}
-
- if (champAttributes & k0x4000_ChampionAttributeViewport) {
- dispMan.f97_drawViewport(k0_viewportNotDungeonView);
+ if (getFlag(L0862_ui_ChampionAttributes, k0x4000_ChampionAttributeViewport)) {
+ _vm->_displayMan->f97_drawViewport(k0_viewportNotDungeonView);
}
-
-
-T0292042_green:
- champ->setAttributeFlag((ChampionAttribute)(k0x0080_ChampionAttributeNameTitle | k0x0100_ChampionAttributeStatistics | k0x0200_ChampionAttributeLoad | k0x0400_ChampionAttributeIcon |
- k0x0800_ChampionAttributePanel | k0x1000_ChampionAttributeStatusBox | k0x2000_ChampionAttributeWounds | k0x4000_ChampionAttributeViewport |
- k0x8000_ChampionAttributeActionHand), false);
- _vm->_eventMan->f78_showMouse();
+T0292042:
+ clearFlag(L0865_ps_Champion->_attributes, k0x0080_ChampionAttributeNameTitle | k0x0100_ChampionAttributeStatistics | k0x0200_ChampionAttributeLoad | k0x0400_ChampionAttributeIcon | k0x0800_ChampionAttributePanel | k0x1000_ChampionAttributeStatusBox | k0x2000_ChampionAttributeWounds | k0x4000_ChampionAttributeViewport | k0x8000_ChampionAttributeActionHand);
+ _vm->_eventMan->f77_hideMouse();
}
uint16 ChampionMan::M26_championIconIndex(int16 val, direction dir) {
diff --git a/engines/dm/eventman.cpp b/engines/dm/eventman.cpp
index 99a0e17769..2fbefb118d 100644
--- a/engines/dm/eventman.cpp
+++ b/engines/dm/eventman.cpp
@@ -359,7 +359,7 @@ void EventManager::f68_setPointerToObject(byte* bitmap) {
L0051_puc_Bitmap = _g615_mousePointerOriginalColorsObject;
memset(L0051_puc_Bitmap, 0, 32 * 18);
_vm->_displayMan->f129_blitToBitmapShrinkWithPalChange(bitmap, _gK190_mousePointerTempBuffer, 16, 16, 16, 16, gK27_palChangesMousepointerOjbectIconShadow);
- _vm->_displayMan->f132_blitToBitmap(_gK190_mousePointerTempBuffer, L0051_puc_Bitmap, g619_BoxMousePointerObjectShadow, 0, 0, 8, 16, k255_ColorNoTransparency, 16, 18);
+ _vm->_displayMan->f132_blitToBitmap(_gK190_mousePointerTempBuffer, L0051_puc_Bitmap, g619_BoxMousePointerObjectShadow, 0, 0, 8, 16, kM1_ColorNoTransparency, 16, 18);
_vm->_displayMan->f129_blitToBitmapShrinkWithPalChange(bitmap, _gK190_mousePointerTempBuffer, 16, 16, 16, 16, g44_palChangesMousePointerIcon);
_vm->_displayMan->f132_blitToBitmap(_gK190_mousePointerTempBuffer, L0051_puc_Bitmap, g620_BoxMousePointerObject, 0, 0, 8, 16, k0_ColorBlack, 16, 18);
_gK100_preventBuildPointerScreenArea = false;
@@ -472,7 +472,7 @@ void EventManager::f78_showMouse() {
}
void EventManager::f77_hideMouse() {
- CursorMan.showMouse(false);
+ // CursorMan.showMouse(false);
}
diff --git a/engines/dm/gfx.cpp b/engines/dm/gfx.cpp
index 7411f0cc0c..25f0e4bd59 100644
--- a/engines/dm/gfx.cpp
+++ b/engines/dm/gfx.cpp
@@ -708,16 +708,16 @@ DisplayMan::DisplayMan(DMEngine *dmEngine) : _vm(dmEngine) {
g186_doorFrame_D1C = new DoorFrames( // @ G0186_s_Graphic558_Frames_Door_D1C
/* { X1, X2, Y1, Y2, ByteWidth, Height, X, Y } */
- Frame(64, 159, 17, 102, 48, 88, 0, 0), /* Closed Or Destroyed */
- Frame(64, 159, 17, 38, 48, 88, 0, 66), /* Vertical Closed one fourth */
- Frame(64, 159, 17, 60, 48, 88, 0, 44), /* Vertical Closed half */
- Frame(64, 159, 17, 82, 48, 88, 0, 22), /* Vertical Closed three fourth */
- Frame(64, 75, 17, 102, 48, 88, 36, 0), /* Left Horizontal Closed one fourth */
- Frame(64, 87, 17, 102, 48, 88, 24, 0), /* Left Horizontal Closed half */
- Frame(64, 99, 17, 102, 48, 88, 12, 0), /* Left Horizontal Closed three fourth */
- Frame(148, 159, 17, 102, 48, 88, 48, 0), /* Right Horizontal Closed one fourth */
- Frame(136, 159, 17, 102, 48, 88, 48, 0), /* Right Horizontal Closed half */
- Frame(124, 159, 17, 102, 48, 88, 48, 0) /* Right Horizontal Closed three fourth */
+ Frame(64, 159, 17, 102, 48, 88, 0, 0), /* Closed Or Destroyed */
+ Frame(64, 159, 17, 38, 48, 88, 0, 66), /* Vertical Closed one fourth */
+ Frame(64, 159, 17, 60, 48, 88, 0, 44), /* Vertical Closed half */
+ Frame(64, 159, 17, 82, 48, 88, 0, 22), /* Vertical Closed three fourth */
+ Frame(64, 75, 17, 102, 48, 88, 36, 0), /* Left Horizontal Closed one fourth */
+ Frame(64, 87, 17, 102, 48, 88, 24, 0), /* Left Horizontal Closed half */
+ Frame(64, 99, 17, 102, 48, 88, 12, 0), /* Left Horizontal Closed three fourth */
+ Frame(148, 159, 17, 102, 48, 88, 48, 0), /* Right Horizontal Closed one fourth */
+ Frame(136, 159, 17, 102, 48, 88, 48, 0), /* Right Horizontal Closed half */
+ Frame(124, 159, 17, 102, 48, 88, 48, 0) /* Right Horizontal Closed three fourth */
);
}
@@ -1056,7 +1056,7 @@ void DisplayMan::f566_viewportBlitToScreen() {
warning("MISSING FUNCTIONALITY: using correct colorpalette");
Box box(0, 223, 33, 33 + 135);
- f132_blitToBitmap(_g296_bitmapViewport, _g348_bitmapScreen, box, 0, 0, k112_byteWidthViewport, k160_byteWidthScreen, k255_ColorNoTransparency);
+ f132_blitToBitmap(_g296_bitmapViewport, _g348_bitmapScreen, box, 0, 0, k112_byteWidthViewport, k160_byteWidthScreen, kM1_ColorNoTransparency);
}
void DisplayMan::loadPalette(uint16 *palette) {
@@ -1442,6 +1442,15 @@ void DisplayMan::f112_drawCeilingPit(int16 nativeBitmapIndex, Frame* frame, int1
}
}
+void DisplayMan::f20_blitToViewport(byte* bitmap, Box& box, int16 byteWidth, Color transparent, int16 height) {
+ f132_blitToBitmap(bitmap, _g296_bitmapViewport, box, 0, 0, byteWidth, k112_byteWidthViewport, transparent, height, k136_heightViewport);
+}
+
+void DisplayMan::f20_blitToViewport(byte* bitmap, int16* box, int16 byteWidth, Color transparent, int16 height) {
+ Box actualBox(box[0], box[1], box[2], box[3]);
+ f20_blitToViewport(bitmap, actualBox, byteWidth, transparent, height);
+}
+
void DisplayMan::f21_blitToScreen(byte *bitmap, int16* box, int16 byteWidth, Color transparent, int16 height) {
Box actualBox(box[0], box[1], box[2], box[3]);
f21_blitToScreen(bitmap, &actualBox, byteWidth, transparent, height);
@@ -1454,7 +1463,7 @@ void DisplayMan::f21_blitToScreen(byte* bitmap, Box* box, int16 viewDoorOrnIndex
void DisplayMan::f101_drawWallSetBitmapWithoutTransparency(byte *bitmap, Frame &f) {
if (f._srcByteWidth)
- f132_blitToBitmap(bitmap, _g296_bitmapViewport, f._box, f._srcX, f._srcY, f._srcByteWidth, k112_byteWidthViewport, k255_ColorNoTransparency);
+ f132_blitToBitmap(bitmap, _g296_bitmapViewport, f._box, f._srcX, f._srcY, f._srcByteWidth, k112_byteWidthViewport, kM1_ColorNoTransparency);
}
void DisplayMan::f100_drawWallSetBitmap(byte *bitmap, Frame &f) {
@@ -1467,16 +1476,16 @@ void DisplayMan::f100_drawWallSetBitmap(byte *bitmap, Frame &f) {
void DisplayMan::f116_drawSquareD3L(direction dir, int16 posX, int16 posY) {
static DoorFrames g179_doorFrame_D3L = DoorFrames( // @ G0179_s_Graphic558_Frames_Door_D3L
/* { X1, X2, Y1, Y2, ByteWidth, Height, X, Y } */
- Frame(24, 71, 28, 67, 24, 41, 0, 0), /* Closed Or Destroyed */
- Frame(24, 71, 28, 38, 24, 41, 0, 30), /* Vertical Closed one fourth */
- Frame(24, 71, 28, 48, 24, 41, 0, 20), /* Vertical Closed half */
- Frame(24, 71, 28, 58, 24, 41, 0, 10), /* Vertical Closed three fourth */
- Frame(24, 29, 28, 67, 24, 41, 18, 0), /* Left Horizontal Closed one fourth */
- Frame(24, 35, 28, 67, 24, 41, 12, 0), /* Left Horizontal Closed half */
- Frame(24, 41, 28, 67, 24, 41, 6, 0), /* Left Horizontal Closed three fourth */
- Frame(66, 71, 28, 67, 24, 41, 24, 0), /* Right Horizontal Closed one fourth */
- Frame(60, 71, 28, 67, 24, 41, 24, 0), /* Right Horizontal Closed half */
- Frame(54, 71, 28, 67, 24, 41, 24, 0)
+ Frame(24, 71, 28, 67, 24, 41, 0, 0), /* Closed Or Destroyed */
+ Frame(24, 71, 28, 38, 24, 41, 0, 30), /* Vertical Closed one fourth */
+ Frame(24, 71, 28, 48, 24, 41, 0, 20), /* Vertical Closed half */
+ Frame(24, 71, 28, 58, 24, 41, 0, 10), /* Vertical Closed three fourth */
+ Frame(24, 29, 28, 67, 24, 41, 18, 0), /* Left Horizontal Closed one fourth */
+ Frame(24, 35, 28, 67, 24, 41, 12, 0), /* Left Horizontal Closed half */
+ Frame(24, 41, 28, 67, 24, 41, 6, 0), /* Left Horizontal Closed three fourth */
+ Frame(66, 71, 28, 67, 24, 41, 24, 0), /* Right Horizontal Closed one fourth */
+ Frame(60, 71, 28, 67, 24, 41, 24, 0), /* Right Horizontal Closed half */
+ Frame(54, 71, 28, 67, 24, 41, 24, 0)
); /* Right Horizontal Closed three fourth */
uint16 squareAspect[5];
@@ -1532,16 +1541,16 @@ T0116017_orangeElk:
void DisplayMan::f117_drawSquareD3R(direction dir, int16 posX, int16 posY) {
static DoorFrames g181_doorFrame_D3R = DoorFrames( // @ G0181_s_Graphic558_Frames_Door_D3R
/* { X1, X2, Y1, Y2, ByteWidth, Height, X, Y } */
- Frame(150, 197, 28, 67, 24, 41, 0, 0), /* Closed Or Destroyed */
- Frame(150, 197, 28, 38, 24, 41, 0, 30), /* Vertical Closed one fourth */
- Frame(150, 197, 28, 48, 24, 41, 0, 20), /* Vertical Closed half */
- Frame(150, 197, 28, 58, 24, 41, 0, 10), /* Vertical Closed three fourth */
- Frame(150, 153, 28, 67, 24, 41, 18, 0), /* Left Horizontal Closed one fourth */
- Frame(150, 161, 28, 67, 24, 41, 12, 0), /* Left Horizontal Closed half */
- Frame(150, 167, 28, 67, 24, 41, 6, 0), /* Left Horizontal Closed three fourth */
- Frame(192, 197, 28, 67, 24, 41, 24, 0), /* Right Horizontal Closed one fourth */
- Frame(186, 197, 28, 67, 24, 41, 24, 0), /* Right Horizontal Closed half */
- Frame(180, 197, 28, 67, 24, 41, 24, 0) /* Right Horizontal Closed three fourth */
+ Frame(150, 197, 28, 67, 24, 41, 0, 0), /* Closed Or Destroyed */
+ Frame(150, 197, 28, 38, 24, 41, 0, 30), /* Vertical Closed one fourth */
+ Frame(150, 197, 28, 48, 24, 41, 0, 20), /* Vertical Closed half */
+ Frame(150, 197, 28, 58, 24, 41, 0, 10), /* Vertical Closed three fourth */
+ Frame(150, 153, 28, 67, 24, 41, 18, 0), /* Left Horizontal Closed one fourth */
+ Frame(150, 161, 28, 67, 24, 41, 12, 0), /* Left Horizontal Closed half */
+ Frame(150, 167, 28, 67, 24, 41, 6, 0), /* Left Horizontal Closed three fourth */
+ Frame(192, 197, 28, 67, 24, 41, 24, 0), /* Right Horizontal Closed one fourth */
+ Frame(186, 197, 28, 67, 24, 41, 24, 0), /* Right Horizontal Closed half */
+ Frame(180, 197, 28, 67, 24, 41, 24, 0) /* Right Horizontal Closed three fourth */
);
int16 order;
@@ -1603,16 +1612,16 @@ T0117018:
void DisplayMan::f118_drawSquareD3C(direction dir, int16 posX, int16 posY) {
static DoorFrames g180_doorFrame_D3C = DoorFrames( // @ G0180_s_Graphic558_Frames_Door_D3C
/* { X1, X2, Y1, Y2, ByteWidth, Height, X, Y } */
- Frame(88, 135, 28, 67, 24, 41, 0, 0), /* Closed Or Destroyed */
- Frame(88, 135, 28, 38, 24, 41, 0, 30), /* Vertical Closed one fourth */
- Frame(88, 135, 28, 48, 24, 41, 0, 20), /* Vertical Closed half */
- Frame(88, 135, 28, 58, 24, 41, 0, 10), /* Vertical Closed three fourth */
- Frame(88, 93, 28, 67, 24, 41, 18, 0), /* Left Horizontal Closed one fourth */
- Frame(88, 99, 28, 67, 24, 41, 12, 0), /* Left Horizontal Closed half */
- Frame(88, 105, 28, 67, 24, 41, 6, 0), /* Left Horizontal Closed three fourth */
- Frame(130, 135, 28, 67, 24, 41, 24, 0), /* Right Horizontal Closed one fourth */
- Frame(124, 135, 28, 67, 24, 41, 24, 0), /* Right Horizontal Closed half */
- Frame(118, 135, 28, 67, 24, 41, 24, 0) /* Right Horizontal Closed three fourth */
+ Frame(88, 135, 28, 67, 24, 41, 0, 0), /* Closed Or Destroyed */
+ Frame(88, 135, 28, 38, 24, 41, 0, 30), /* Vertical Closed one fourth */
+ Frame(88, 135, 28, 48, 24, 41, 0, 20), /* Vertical Closed half */
+ Frame(88, 135, 28, 58, 24, 41, 0, 10), /* Vertical Closed three fourth */
+ Frame(88, 93, 28, 67, 24, 41, 18, 0), /* Left Horizontal Closed one fourth */
+ Frame(88, 99, 28, 67, 24, 41, 12, 0), /* Left Horizontal Closed half */
+ Frame(88, 105, 28, 67, 24, 41, 6, 0), /* Left Horizontal Closed three fourth */
+ Frame(130, 135, 28, 67, 24, 41, 24, 0), /* Right Horizontal Closed one fourth */
+ Frame(124, 135, 28, 67, 24, 41, 24, 0), /* Right Horizontal Closed half */
+ Frame(118, 135, 28, 67, 24, 41, 24, 0) /* Right Horizontal Closed three fourth */
);
int16 order;
int16 squareAspect[5];
@@ -1667,16 +1676,16 @@ T0118028:
void DisplayMan::f119_drawSquareD2L(direction dir, int16 posX, int16 posY) {
static DoorFrames g182_doorFrame_D2L = DoorFrames( // @ G0182_s_Graphic558_Frames_Door_D2L
/* { X1, X2, Y1, Y2, ByteWidth, Height, X, Y } */
- Frame(0, 63, 24, 82, 32, 61, 0, 0), /* Closed Or Destroyed */
- Frame(0, 63, 24, 39, 32, 61, 0, 45), /* Vertical Closed one fourth */
- Frame(0, 63, 24, 54, 32, 61, 0, 30), /* Vertical Closed half */
- Frame(0, 63, 24, 69, 32, 61, 0, 15), /* Vertical Closed three fourth */
- Frame(0, 7, 24, 82, 32, 61, 24, 0), /* Left Horizontal Closed one fourth */
- Frame(0, 15, 24, 82, 32, 61, 16, 0), /* Left Horizontal Closed half */
- Frame(0, 23, 24, 82, 32, 61, 8, 0), /* Left Horizontal Closed three fourth */
- Frame(56, 63, 24, 82, 32, 61, 32, 0), /* Right Horizontal Closed one fourth */
- Frame(48, 63, 24, 82, 32, 61, 32, 0), /* Right Horizontal Closed half */
- Frame(40, 63, 24, 82, 32, 61, 32, 0) /* Right Horizontal Closed three fourth */
+ Frame(0, 63, 24, 82, 32, 61, 0, 0), /* Closed Or Destroyed */
+ Frame(0, 63, 24, 39, 32, 61, 0, 45), /* Vertical Closed one fourth */
+ Frame(0, 63, 24, 54, 32, 61, 0, 30), /* Vertical Closed half */
+ Frame(0, 63, 24, 69, 32, 61, 0, 15), /* Vertical Closed three fourth */
+ Frame(0, 7, 24, 82, 32, 61, 24, 0), /* Left Horizontal Closed one fourth */
+ Frame(0, 15, 24, 82, 32, 61, 16, 0), /* Left Horizontal Closed half */
+ Frame(0, 23, 24, 82, 32, 61, 8, 0), /* Left Horizontal Closed three fourth */
+ Frame(56, 63, 24, 82, 32, 61, 32, 0), /* Right Horizontal Closed one fourth */
+ Frame(48, 63, 24, 82, 32, 61, 32, 0), /* Right Horizontal Closed half */
+ Frame(40, 63, 24, 82, 32, 61, 32, 0) /* Right Horizontal Closed three fourth */
);
int16 order;
@@ -1733,16 +1742,16 @@ T0119020:
void DisplayMan::f120_drawSquareD2R(direction dir, int16 posX, int16 posY) {
static DoorFrames g184_doorFrame_D2R = DoorFrames( // @ G0184_s_Graphic558_Frames_Door_D2R
/* { X1, X2, Y1, Y2, ByteWidth, Height, X, Y } */
- Frame(160, 223, 24, 82, 32, 61, 0, 0), /* Closed Or Destroyed */
- Frame(160, 223, 24, 39, 32, 61, 0, 45), /* Vertical Closed one fourth */
- Frame(160, 223, 24, 54, 32, 61, 0, 30), /* Vertical Closed half */
- Frame(160, 223, 24, 69, 32, 61, 0, 15), /* Vertical Closed three fourth */
- Frame(160, 167, 24, 82, 32, 61, 24, 0), /* Left Horizontal Closed one fourth */
- Frame(160, 175, 24, 82, 32, 61, 16, 0), /* Left Horizontal Closed half */
- Frame(160, 183, 24, 82, 32, 61, 8, 0), /* Left Horizontal Closed three fourth */
- Frame(216, 223, 24, 82, 32, 61, 32, 0), /* Right Horizontal Closed one fourth */
- Frame(208, 223, 24, 82, 32, 61, 32, 0), /* Right Horizontal Closed half */
- Frame(200, 223, 24, 82, 32, 61, 32, 0) /* Right Horizontal Closed three fourth */
+ Frame(160, 223, 24, 82, 32, 61, 0, 0), /* Closed Or Destroyed */
+ Frame(160, 223, 24, 39, 32, 61, 0, 45), /* Vertical Closed one fourth */
+ Frame(160, 223, 24, 54, 32, 61, 0, 30), /* Vertical Closed half */
+ Frame(160, 223, 24, 69, 32, 61, 0, 15), /* Vertical Closed three fourth */
+ Frame(160, 167, 24, 82, 32, 61, 24, 0), /* Left Horizontal Closed one fourth */
+ Frame(160, 175, 24, 82, 32, 61, 16, 0), /* Left Horizontal Closed half */
+ Frame(160, 183, 24, 82, 32, 61, 8, 0), /* Left Horizontal Closed three fourth */
+ Frame(216, 223, 24, 82, 32, 61, 32, 0), /* Right Horizontal Closed one fourth */
+ Frame(208, 223, 24, 82, 32, 61, 32, 0), /* Right Horizontal Closed half */
+ Frame(200, 223, 24, 82, 32, 61, 32, 0) /* Right Horizontal Closed three fourth */
);
int16 order;
@@ -1801,16 +1810,16 @@ T0120029:
void DisplayMan::f121_drawSquareD2C(direction dir, int16 posX, int16 posY) {
static DoorFrames g183_doorFrame_D2C = DoorFrames( // @ G0183_s_Graphic558_Frames_Door_D2C
/* { X1, X2, Y1, Y2, ByteWidth, Height, X, Y } */
- Frame(80, 143, 24, 82, 32, 61, 0, 0), /* Closed Or Destroyed */
- Frame(80, 143, 24, 39, 32, 61, 0, 45), /* Vertical Closed one fourth */
- Frame(80, 143, 24, 54, 32, 61, 0, 30), /* Vertical Closed half */
- Frame(80, 143, 24, 69, 32, 61, 0, 15), /* Vertical Closed three fourth */
- Frame(80, 87, 24, 82, 32, 61, 24, 0), /* Left Horizontal Closed one fourth */
- Frame(80, 95, 24, 82, 32, 61, 16, 0), /* Left Horizontal Closed half */
- Frame(80, 103, 24, 82, 32, 61, 8, 0), /* Left Horizontal Closed three fourth */
- Frame(136, 143, 24, 82, 32, 61, 32, 0), /* Right Horizontal Closed one fourth */
- Frame(128, 143, 24, 82, 32, 61, 32, 0), /* Right Horizontal Closed half */
- Frame(120, 143, 24, 82, 32, 61, 32, 0) /* Right Horizontal Closed three fourth */
+ Frame(80, 143, 24, 82, 32, 61, 0, 0), /* Closed Or Destroyed */
+ Frame(80, 143, 24, 39, 32, 61, 0, 45), /* Vertical Closed one fourth */
+ Frame(80, 143, 24, 54, 32, 61, 0, 30), /* Vertical Closed half */
+ Frame(80, 143, 24, 69, 32, 61, 0, 15), /* Vertical Closed three fourth */
+ Frame(80, 87, 24, 82, 32, 61, 24, 0), /* Left Horizontal Closed one fourth */
+ Frame(80, 95, 24, 82, 32, 61, 16, 0), /* Left Horizontal Closed half */
+ Frame(80, 103, 24, 82, 32, 61, 8, 0), /* Left Horizontal Closed three fourth */
+ Frame(136, 143, 24, 82, 32, 61, 32, 0), /* Right Horizontal Closed one fourth */
+ Frame(128, 143, 24, 82, 32, 61, 32, 0), /* Right Horizontal Closed half */
+ Frame(120, 143, 24, 82, 32, 61, 32, 0) /* Right Horizontal Closed three fourth */
);
int16 order;
@@ -1867,16 +1876,16 @@ T0121016:
void DisplayMan::f122_drawSquareD1L(direction dir, int16 posX, int16 posY) {
static DoorFrames g185_doorFrame_D1L = DoorFrames( // @ G0185_s_Graphic558_Frames_Door_D1L
/* { X1, X2, Y1, Y2, ByteWidth, Height, X, Y } */
- Frame(0, 31, 17, 102, 48, 88, 64, 0), /* Closed Or Destroyed */
- Frame(0, 31, 17, 38, 48, 88, 64, 66), /* Vertical Closed one fourth */
- Frame(0, 31, 17, 60, 48, 88, 64, 44), /* Vertical Closed half */
- Frame(0, 31, 17, 82, 48, 88, 64, 22), /* Vertical Closed three fourth */
- Frame(0, 0, 0, 0, 0, 0, 0, 0), /* Left Horizontal Closed one fourth */
- Frame(0, 0, 0, 0, 0, 0, 0, 0), /* Left Horizontal Closed half */
- Frame(0, 0, 0, 0, 0, 0, 0, 0), /* Left Horizontal Closed three fourth */
- Frame(20, 31, 17, 102, 48, 88, 48, 0), /* Right Horizontal Closed one fourth */
- Frame(8, 31, 17, 102, 48, 88, 48, 0), /* Right Horizontal Closed half */
- Frame(0, 31, 17, 102, 48, 88, 52, 0) /* Right Horizontal Closed three fourth */
+ Frame(0, 31, 17, 102, 48, 88, 64, 0), /* Closed Or Destroyed */
+ Frame(0, 31, 17, 38, 48, 88, 64, 66), /* Vertical Closed one fourth */
+ Frame(0, 31, 17, 60, 48, 88, 64, 44), /* Vertical Closed half */
+ Frame(0, 31, 17, 82, 48, 88, 64, 22), /* Vertical Closed three fourth */
+ Frame(0, 0, 0, 0, 0, 0, 0, 0), /* Left Horizontal Closed one fourth */
+ Frame(0, 0, 0, 0, 0, 0, 0, 0), /* Left Horizontal Closed half */
+ Frame(0, 0, 0, 0, 0, 0, 0, 0), /* Left Horizontal Closed three fourth */
+ Frame(20, 31, 17, 102, 48, 88, 48, 0), /* Right Horizontal Closed one fourth */
+ Frame(8, 31, 17, 102, 48, 88, 48, 0), /* Right Horizontal Closed half */
+ Frame(0, 31, 17, 102, 48, 88, 52, 0) /* Right Horizontal Closed three fourth */
);
int16 order;
@@ -1934,16 +1943,16 @@ T0122021:
void DisplayMan::f123_drawSquareD1R(direction dir, int16 posX, int16 posY) {
static DoorFrames g187_doorFrame_D1R = DoorFrames( // @ G0187_s_Graphic558_Frames_Door_D1R
/* { X1, X2, Y1, Y2, ByteWidth, Height, X, Y } */
- Frame(192, 223, 17, 102, 48, 88, 0, 0), /* Closed Or Destroyed */
- Frame(192, 223, 17, 38, 48, 88, 0, 66), /* Vertical Closed one fourth */
- Frame(192, 223, 17, 60, 48, 88, 0, 44), /* Vertical Closed half */
- Frame(192, 223, 17, 82, 48, 88, 0, 22), /* Vertical Closed three fourth */
- Frame(192, 203, 17, 102, 48, 88, 36, 0), /* Left Horizontal Closed one fourth */
- Frame(192, 215, 17, 102, 48, 88, 24, 0), /* Left Horizontal Closed half */
- Frame(192, 223, 17, 102, 48, 88, 12, 0), /* Left Horizontal Closed three fourth */
- Frame(0, 0, 0, 0, 0, 0, 0, 0), /* Right Horizontal Closed one fourth */
- Frame(0, 0, 0, 0, 0, 0, 0, 0), /* Right Horizontal Closed half */
- Frame(0, 0, 0, 0, 0, 0, 0, 0)
+ Frame(192, 223, 17, 102, 48, 88, 0, 0), /* Closed Or Destroyed */
+ Frame(192, 223, 17, 38, 48, 88, 0, 66), /* Vertical Closed one fourth */
+ Frame(192, 223, 17, 60, 48, 88, 0, 44), /* Vertical Closed half */
+ Frame(192, 223, 17, 82, 48, 88, 0, 22), /* Vertical Closed three fourth */
+ Frame(192, 203, 17, 102, 48, 88, 36, 0), /* Left Horizontal Closed one fourth */
+ Frame(192, 215, 17, 102, 48, 88, 24, 0), /* Left Horizontal Closed half */
+ Frame(192, 223, 17, 102, 48, 88, 12, 0), /* Left Horizontal Closed three fourth */
+ Frame(0, 0, 0, 0, 0, 0, 0, 0), /* Right Horizontal Closed one fourth */
+ Frame(0, 0, 0, 0, 0, 0, 0, 0), /* Right Horizontal Closed half */
+ Frame(0, 0, 0, 0, 0, 0, 0, 0)
); /* Right Horizontal Closed three fourth */
int16 order;
@@ -2023,7 +2032,7 @@ void DisplayMan::f124_drawSquareD1C(direction dir, int16 posX, int16 posY) {
g107_BoxThievesEyeVisibleArea,
g106_BoxThievesEye_ViewPortVisibleArea._x1,
g106_BoxThievesEye_ViewPortVisibleArea._y1,
- k112_byteWidthViewport, 48, k255_ColorNoTransparency, 136, 95);
+ k112_byteWidthViewport, 48, kM1_ColorNoTransparency, 136, 95);
bitmap = f489_getNativeBitmapOrGraphic(k41_holeInWall_GraphicIndice);
/* BUG0_74 Creatures are drawn with wrong colors when viewed through a wall with the 'Thieve's Eye' spell. The 'hole in wall'
graphic is applied to the visible area with transparency on color 10. However the visible area may contain creature graphics
@@ -2330,12 +2339,12 @@ void DisplayMan::f96_loadCurrentMapGraphics() {
f99_copyBitmapAndFlipHorizontal(_g95_bitmapWall_D3LCR_Native = _g698_bitmapWallSet_Wall_D3LCR, _g74_tmpBitmap,
g163_FrameWalls[k0_ViewSquare_D3C]._srcByteWidth, g163_FrameWalls[k0_ViewSquare_D3C]._srcHeight);
f134_fillBitmap(_g90_bitmapWall_D3LCR_Flipped, k10_ColorFlesh, 64, 51);
- f132_blitToBitmap(_g74_tmpBitmap, _g90_bitmapWall_D3LCR_Flipped, g161_BoxWallBitmap_D3LCR, 11, 0, 64, 64, k255_ColorNoTransparency);
+ f132_blitToBitmap(_g74_tmpBitmap, _g90_bitmapWall_D3LCR_Flipped, g161_BoxWallBitmap_D3LCR, 11, 0, 64, 64, kM1_ColorNoTransparency);
f99_copyBitmapAndFlipHorizontal(_g96_bitmapWall_D2LCR_Native = _g699_bitmapWallSet_Wall_D2LCR, _g74_tmpBitmap,
g163_FrameWalls[k3_ViewSquare_D2C]._srcByteWidth, g163_FrameWalls[k3_ViewSquare_D2C]._srcHeight);
f134_fillBitmap(_g91_bitmapWall_D2LCR_Flipped, k10_ColorFlesh, 72, 71);
- f132_blitToBitmap(_g74_tmpBitmap, _g91_bitmapWall_D2LCR_Flipped, g162_BoxWallBitmap_D2LCR, 8, 0, 72, 72, k255_ColorNoTransparency);
+ f132_blitToBitmap(_g74_tmpBitmap, _g91_bitmapWall_D2LCR_Flipped, g162_BoxWallBitmap_D2LCR, 8, 0, 72, 72, kM1_ColorNoTransparency);
f99_copyBitmapAndFlipHorizontal(_g97_bitmapWall_D1LCR_Native = _g700_bitmapWallSet_Wall_D1LCR, _g92_bitmapWall_D1LCR_Flipped,
g163_FrameWalls[k6_ViewSquare_D1C]._srcByteWidth, g163_FrameWalls[k6_ViewSquare_D1C]._srcHeight);
@@ -2538,7 +2547,7 @@ bool DisplayMan::f107_isDrawnWallOrnAnAlcove(int16 wallOrnOrd, ViewWall viewWall
f132_blitToBitmap(_g700_bitmapWallSet_Wall_D1LCR, _g296_bitmapViewport,
g202_BoxWallPatchBehindInscription, 94, 28,
g163_FrameWalls[k6_ViewSquare_D1C]._srcByteWidth,
- k112_byteWidthViewport, k255_ColorNoTransparency, g163_FrameWalls[k6_ViewSquare_D1C]._srcHeight, k136_heightViewport);
+ k112_byteWidthViewport, kM1_ColorNoTransparency, g163_FrameWalls[k6_ViewSquare_D1C]._srcHeight, k136_heightViewport);
byte *AL0090_puc_String = L0099_auc_InscriptionString;
L0092_puc_Bitmap = f489_getNativeBitmapOrGraphic(k120_InscriptionFont);
L0097_i_TextLineIndex = 0;
diff --git a/engines/dm/gfx.h b/engines/dm/gfx.h
index 2fc01fbc45..2ca77b99d1 100644
--- a/engines/dm/gfx.h
+++ b/engines/dm/gfx.h
@@ -339,7 +339,7 @@ enum ViewWall {
};
enum Color {
- k255_ColorNoTransparency = 255,
+ kM1_ColorNoTransparency = -1,
k0_ColorBlack = 0,
k1_ColorDarkGary = 1,
k2_ColorLightGray = 2,
@@ -644,7 +644,8 @@ public:
void f109_drawDoorOrnament(int16 doorOrnOdinal, int16 viewDoorOrnIndex); // @ F0109_DUNGEONVIEW_DrawDoorOrnament
void f112_drawCeilingPit(int16 nativeBitmapIndex, Frame *frame, int16 mapX, int16 mapY, bool flipHorizontal); // @ F0112_DUNGEONVIEW_DrawCeilingPit
-
+ void f20_blitToViewport(byte *bitmap, Box &box, int16 byteWidth, Color transparent, int16 height); // @ F0020_MAIN_BlitToViewport
+ void f20_blitToViewport(byte *bitmap, int16 *box, int16 byteWidth, Color transparent, int16 height); // @ F0020_MAIN_BlitToViewport
void f21_blitToScreen(byte* bitmap, int16 *box, int16 viewDoorOrnIndex, Color transparent, int16 doorOrnOrdinal); // @ F0021_MAIN_BlitToScreen
void f21_blitToScreen(byte* bitmap, Box *box, int16 viewDoorOrnIndex, Color transparent, int16 doorOrnOrdinal); // @ F0021_MAIN_BlitToScreen
@@ -654,7 +655,7 @@ public:
match the original exatcly, if need arises for heights then we'll have to retrospectively add them in old function calls*/
/* Expects inclusive boundaries in box */
void f132_blitToBitmap(byte *srcBitmap, byte *destBitmap, Box &box, uint16 srcX, uint16 srcY, uint16 srcByteWidth,
- uint16 destByteWidth, Color transparent = k255_ColorNoTransparency, int16 srcHeight = -1, int16 destHight = -1); // @ F0132_VIDEO_Blit
+ uint16 destByteWidth, Color transparent = kM1_ColorNoTransparency, int16 srcHeight = -1, int16 destHight = -1); // @ F0132_VIDEO_Blit
/* Expects inclusive boundaries in box */
void f133_blitBoxFilledWithMaskedBitmap(byte *src, byte *dest, byte *mask, byte *tmp, Box &box, int16 lastUnitIndex,
int16 firstUnitIndex, int16 destByteWidth, Color transparent,
diff --git a/engines/dm/inventory.cpp b/engines/dm/inventory.cpp
index 35bdf21ebb..30bb05c73b 100644
--- a/engines/dm/inventory.cpp
+++ b/engines/dm/inventory.cpp
@@ -130,7 +130,7 @@ void InventoryMan::f354_drawStatusBoxPortrait(ChampionIndex championIndex) {
box._y2 = 28;
box._x1 = championIndex * k69_ChampionStatusBoxSpacing + 7;
box._x2 = box._x1 + 31;
- dispMan.f132_blitToBitmap(_vm->_championMan->_gK71_champions[championIndex]._portrait, dispMan._g348_bitmapScreen, box, 0, 0, 16, k160_byteWidthScreen, k255_ColorNoTransparency);
+ dispMan.f132_blitToBitmap(_vm->_championMan->_gK71_champions[championIndex]._portrait, dispMan._g348_bitmapScreen, box, 0, 0, 16, k160_byteWidthScreen, kM1_ColorNoTransparency);
}
void InventoryMan::f343_drawPanelHorizontalBar(int16 x, int16 y, int16 pixelWidth, Color color) {
@@ -337,7 +337,7 @@ void InventoryMan::f332_drawIconToViewport(IconIndice iconIndex, int16 xPos, int
box._x2 = (box._x1 = xPos) + 15;
box._y2 = (box._y1 = yPos) + 15;
_vm->_objectMan->f36_extractIconFromBitmap(iconIndex, iconBitmap);
- _vm->_displayMan->f132_blitToBitmap(iconBitmap, _vm->_displayMan->_g296_bitmapViewport, box, 0, 0, 8, k112_byteWidthViewport, k255_ColorNoTransparency);
+ _vm->_displayMan->f132_blitToBitmap(iconBitmap, _vm->_displayMan->_g296_bitmapViewport, box, 0, 0, 8, k112_byteWidthViewport, kM1_ColorNoTransparency);
}
void InventoryMan::f336_buildObjectAttributeString(int16 potentialAttribMask, int16 actualAttribMask, char** attribStrings, char* destString, char* prefixString, char* suffixString) {
@@ -682,4 +682,64 @@ void InventoryMan::f338_decreaseTorchesLightPower() {
_vm->_championMan->f296_drawChangedObjectIcons();
}
}
+
+void InventoryMan::f351_drawChampionSkillsAndStatistics() {
+ uint16 L1090_ui_Multiple;
+#define AL1090_ui_SkillIndex L1090_ui_Multiple
+#define AL1090_ui_StatisticIndex L1090_ui_Multiple
+ int16 L1091_i_Y;
+ int16 L1092_i_Multiple;
+#define AL1092_i_SkillLevel L1092_i_Multiple
+#define AL1092_i_StatisticCurrentValue L1092_i_Multiple
+ uint16 L1093_ui_ChampionIndex;
+ Champion* L1094_ps_Champion;
+ 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"};
+
+
+ _vm->_inventoryMan->f334_closeChest();
+ L1094_ps_Champion = &_vm->_championMan->_gK71_champions[L1093_ui_ChampionIndex = _vm->M1_ordinalToIndex(_vm->_inventoryMan->_g432_inventoryChampionOrdinal)];
+ _vm->_displayMan->f20_blitToViewport(_vm->_displayMan->f489_getNativeBitmapOrGraphic(k20_PanelEmptyIndice), g32_BoxPanel, k72_byteWidth, k8_ColorRed, 73);
+ L1091_i_Y = 58;
+ for (AL1090_ui_SkillIndex = k0_ChampionSkillFighter; AL1090_ui_SkillIndex <= k3_ChampionSkillWizard; AL1090_ui_SkillIndex++) {
+ AL1092_i_SkillLevel = MIN((uint16)16, _vm->_championMan->f303_getSkillLevel(L1093_ui_ChampionIndex, AL1090_ui_SkillIndex | k0x8000_IgnoreTemporaryExperience));
+ if (AL1092_i_SkillLevel == 1)
+ continue;
+#ifdef COMPILE17_DM10aEN_DM10bEN_DM11EN_DM12EN_CSB20EN_CSB21EN_DMDEMO20EN_DM20EN_DM21EN_DM22EN /* CHANGE4_00_LOCALIZATION Translation to German language */
+ strcpy(L1097_ac_String, G0428_apc_SkillLevelNames[AL1092_i_SkillLevel - 2]);
+ strcat(L1097_ac_String, " ");
+ strcat(L1097_ac_String, G0417_apc_BaseSkillNames[AL1090_ui_SkillIndex]);
+#endif
+#ifdef COMPILE36_DM12GE_DM13aFR_DM13bFR_DM20GE_DM20FR_DM22GE /* CHANGE4_00_LOCALIZATION Translation to German language */
+ strcpy(L1097_ac_String, G0417_apc_BaseSkillNames[AL1090_ui_SkillIndex]);
+ strcat(L1097_ac_String, " ");
+ strcat(L1097_ac_String, G0428_apc_SkillLevelNames[AL1092_i_SkillLevel - 2]);
+#endif
+ _vm->_textMan->f52_printToViewport(108, L1091_i_Y, k13_ColorLightestGray, L1097_ac_String);
+ L1091_i_Y += 7;
+ }
+ L1091_i_Y = 86;
+ for (AL1090_ui_StatisticIndex = k1_ChampionStatStrength; AL1090_ui_StatisticIndex <= k6_ChampionStatAntifire; AL1090_ui_StatisticIndex++) {
+ _vm->_textMan->f52_printToViewport(108, L1091_i_Y, k13_ColorLightestGray, G0431_apc_StatisticNames[AL1090_ui_StatisticIndex]);
+ AL1092_i_StatisticCurrentValue = L1094_ps_Champion->_statistics[AL1090_ui_StatisticIndex][k1_ChampionStatCurrent];
+ L1096_ui_StatisticMaximumValue = L1094_ps_Champion->_statistics[AL1090_ui_StatisticIndex][k0_ChampionStatMaximum];
+ if (AL1092_i_StatisticCurrentValue < L1096_ui_StatisticMaximumValue) {
+ L1095_i_StatisticColor = k8_ColorRed;
+ } else {
+ if (AL1092_i_StatisticCurrentValue > L1096_ui_StatisticMaximumValue) {
+ L1095_i_StatisticColor = k7_ColorLightGreen;
+ } else {
+ L1095_i_StatisticColor = k13_ColorLightestGray;
+ }
+ }
+ _vm->_textMan->f52_printToViewport(174, L1091_i_Y, (Color)L1095_i_StatisticColor, _vm->_championMan->f288_getStringFromInteger(AL1092_i_StatisticCurrentValue, true, 3).c_str());
+ strcpy(L1097_ac_String, "/");
+ strcat(L1097_ac_String, _vm->_championMan->f288_getStringFromInteger(L1096_ui_StatisticMaximumValue, true, 3).c_str());
+ _vm->_textMan->f52_printToViewport(192, 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 35a76c4e9f..93bb17fbe6 100644
--- a/engines/dm/inventory.h
+++ b/engines/dm/inventory.h
@@ -80,6 +80,7 @@ public:
void f342_drawPanelObject(Thing thingToDraw, bool pressingEye); // @ F0342_INVENTORY_DrawPanel_Object
void f337_setDungeonViewPalette(); // @ F0337_INVENTORY_SetDungeonViewPalette
void f338_decreaseTorchesLightPower(); // @ F0338_INVENTORY_DecreaseTorchesLightPower_CPSE
+ void f351_drawChampionSkillsAndStatistics(); // @ F0351_INVENTORY_DrawChampionSkillsAndStatistics
};
diff --git a/engines/dm/menus.cpp b/engines/dm/menus.cpp
index f42d955b3d..1338130459 100644
--- a/engines/dm/menus.cpp
+++ b/engines/dm/menus.cpp
@@ -66,7 +66,7 @@ void MenuMan::f395_drawMovementArrows() {
Box &dest = g2_BoxMovementArrows;
uint16 byteWidth = disp.getPixelWidth(k13_MovementArrowsIndice) / 2;
- disp.f132_blitToBitmap(arrowsBitmap, disp._g348_bitmapScreen, dest, 0, 0, byteWidth, k160_byteWidthScreen, k255_ColorNoTransparency);
+ disp.f132_blitToBitmap(arrowsBitmap, disp._g348_bitmapScreen, dest, 0, 0, byteWidth, k160_byteWidthScreen, kM1_ColorNoTransparency);
}
void MenuMan::f388_clearActingChampion() {
ChampionMan &cm = *_vm->_championMan;
@@ -115,7 +115,7 @@ T0386006:
box2._x2 = box._x2 - 2;
box2._y1 = 95;
box2._y2 = 110;
- dm.f132_blitToBitmap(bitmapIcon, dm._g348_bitmapScreen, box2, 0, 0, 8, k160_byteWidthScreen, k255_ColorNoTransparency);
+ dm.f132_blitToBitmap(bitmapIcon, dm._g348_bitmapScreen, box2, 0, 0, 8, k160_byteWidthScreen, kM1_ColorNoTransparency);
if (champion.getAttributes(k0x0008_ChampionAttributeDisableAction) || _vm->_championMan->_g299_candidateChampionOrdinal || _vm->_championMan->_g300_partyIsSleeping) {
warning("MISSING CODE: F0136_VIDEO_ShadeScreenBox");
}
@@ -211,7 +211,7 @@ void MenuMan::f387_drawActionArea() {
if (_g713_actionList._actionIndices[1] == k255_ChampionActionNone)
box = g501_BoxActionArea1ActionMenu;
dispMan.f132_blitToBitmap(dispMan.f489_getNativeBitmapOrGraphic(k10_MenuActionAreaIndice), dispMan._g348_bitmapScreen,
- box, 0, 0, 48, k160_byteWidthScreen, k255_ColorNoTransparency);
+ box, 0, 0, 48, k160_byteWidthScreen, kM1_ColorNoTransparency);
textMan.f41_printWithTrailingSpaces(dispMan._g348_bitmapScreen, k160_byteWidthScreen,
235, 83, k0_ColorBlack, k4_ColorCyan, champMan._gK71_champions[_vm->M1_ordinalToIndex(champMan._g506_actingChampionOrdinal)]._name,
k7_ChampionNameMaximumLength, k200_heightScreen);
@@ -320,7 +320,7 @@ void MenuMan::f392_buildSpellAreaLine(int16 spellAreaBitmapLine) {
if (spellAreaBitmapLine == k2_SpellAreaAvailableSymbols) {
dispMan._g578_useByteBoxCoordinates = false;
dispMan.f132_blitToBitmap(dispMan.f489_getNativeBitmapOrGraphic(k11_MenuSpellAreLinesIndice), _gK72_bitmapSpellAreaLine,
- gK74_BoxSpellAreaLine, 0, 12, 48, 48, k255_ColorNoTransparency);
+ gK74_BoxSpellAreaLine, 0, 12, 48, 48, kM1_ColorNoTransparency);
int16 x = 1;
byte c = 96 + (6 * champ._symbolStep);
char spellSymbolString[2] = {'\0', '\0'};
@@ -331,7 +331,7 @@ void MenuMan::f392_buildSpellAreaLine(int16 spellAreaBitmapLine) {
} else if (spellAreaBitmapLine == k3_SpellAreaChampionSymbols) {
dispMan._g578_useByteBoxCoordinates = false;
dispMan.f132_blitToBitmap(dispMan.f489_getNativeBitmapOrGraphic(k11_MenuSpellAreLinesIndice), _gK72_bitmapSpellAreaLine,
- gK74_BoxSpellAreaLine, 0, 24, 48, 48, k255_ColorNoTransparency);
+ gK74_BoxSpellAreaLine, 0, 24, 48, 48, kM1_ColorNoTransparency);
char spellSymbolString[2] = {'\0', '\0'};
int16 x = 8;
for (uint16 symbolIndex = 0; symbolIndex < 4; symbolIndex++) {
@@ -352,7 +352,7 @@ void MenuMan::f394_setMagicCasterAndDrawSpellArea(int16 champIndex) {
if (champMan._g514_magicCasterChampionIndex == kM1_ChampionNone) {
warning("MISSING CODE: F0077_MOUSE_HidePointer_CPSE");
dispMan.f132_blitToBitmap(dispMan.f489_getNativeBitmapOrGraphic(k9_MenuSpellAreaBackground), dispMan._g348_bitmapScreen, g0_BoxSpellArea, 0, 0,
- 48, k160_byteWidthScreen, k255_ColorNoTransparency);
+ 48, k160_byteWidthScreen, kM1_ColorNoTransparency);
warning("MISSING CODE: F0078_MOUSE_ShowPointer");
}
if (champIndex == kM1_ChampionNone) {
@@ -368,9 +368,9 @@ void MenuMan::f394_setMagicCasterAndDrawSpellArea(int16 champIndex) {
f392_buildSpellAreaLine(k2_SpellAreaAvailableSymbols);
warning("MISSING CODE: F0077_MOUSE_HidePointer_CPSE");
f393_drawSpellAreaControls((ChampionIndex)champIndex);
- dispMan.f132_blitToBitmap(_gK72_bitmapSpellAreaLine, dispMan._g348_bitmapScreen, gK75_BoxSpellAreaLine2, 0, 0, 48, k160_byteWidthScreen, k255_ColorNoTransparency);
+ dispMan.f132_blitToBitmap(_gK72_bitmapSpellAreaLine, dispMan._g348_bitmapScreen, gK75_BoxSpellAreaLine2, 0, 0, 48, k160_byteWidthScreen, kM1_ColorNoTransparency);
f392_buildSpellAreaLine(k3_SpellAreaChampionSymbols);
- dispMan.f132_blitToBitmap(_gK72_bitmapSpellAreaLine, dispMan._g348_bitmapScreen, gK76_BoxSpellAreaLine3, 0, 0, 48, k160_byteWidthScreen, k255_ColorNoTransparency);
+ dispMan.f132_blitToBitmap(_gK72_bitmapSpellAreaLine, dispMan._g348_bitmapScreen, gK76_BoxSpellAreaLine3, 0, 0, 48, k160_byteWidthScreen, kM1_ColorNoTransparency);
warning("MISSING CODE: F0078_MOUSE_ShowPointer");
}
diff --git a/engines/dm/objectman.cpp b/engines/dm/objectman.cpp
index 976e671730..6ab49fbf44 100644
--- a/engines/dm/objectman.cpp
+++ b/engines/dm/objectman.cpp
@@ -199,7 +199,7 @@ void ObjectMan::f36_extractIconFromBitmap(uint16 iconIndex, byte *destBitmap) {
iconIndex -= g26_IconGraphicFirstIndex[i];
_vm->_displayMan->_g578_useByteBoxCoordinates = true;
Box box(0, 0, 15, 15);
- _vm->_displayMan->f132_blitToBitmap(srcBitmap, destBitmap, box, (iconIndex & 0x000F) << 4, iconIndex & 0x0FF0, 128, 8, k255_ColorNoTransparency);
+ _vm->_displayMan->f132_blitToBitmap(srcBitmap, destBitmap, box, (iconIndex & 0x000F) << 4, iconIndex & 0x0FF0, 128, 8, kM1_ColorNoTransparency);
}
void ObjectMan::f38_drawIconInSlotBox(uint16 slotBoxIndex, int16 iconIndex) {
@@ -227,10 +227,10 @@ void ObjectMan::f38_drawIconInSlotBox(uint16 slotBoxIndex, int16 iconIndex) {
_vm->_displayMan->_g578_useByteBoxCoordinates = false;
if (slotBoxIndex >= k8_SlotBoxInventoryFirstSlot) {
- _vm->_displayMan->f132_blitToBitmap(iconsBitmap, _vm->_displayMan->_g296_bitmapViewport, box, (iconIndex & 0x000F) << 4, iconIndex & 0x0FF0, 128, k112_byteWidthViewport, k255_ColorNoTransparency);
+ _vm->_displayMan->f132_blitToBitmap(iconsBitmap, _vm->_displayMan->_g296_bitmapViewport, box, (iconIndex & 0x000F) << 4, iconIndex & 0x0FF0, 128, k112_byteWidthViewport, kM1_ColorNoTransparency);
} else {
- _vm->_displayMan->f132_blitToBitmap(iconsBitmap, _vm->_displayMan->_g348_bitmapScreen, box, (iconIndex & 0x000F) << 4, iconIndex & 0x0FF0, 128, k160_byteWidthScreen, k255_ColorNoTransparency);
+ _vm->_displayMan->f132_blitToBitmap(iconsBitmap, _vm->_displayMan->_g348_bitmapScreen, box, (iconIndex & 0x000F) << 4, iconIndex & 0x0FF0, 128, k160_byteWidthScreen, kM1_ColorNoTransparency);
}
}
diff --git a/engines/dm/text.cpp b/engines/dm/text.cpp
index 06a10b2784..4329cb3083 100644
--- a/engines/dm/text.cpp
+++ b/engines/dm/text.cpp
@@ -73,7 +73,7 @@ void TextMan::f40_printTextToBitmap(byte* destBitmap, uint16 destByteWidth, uint
uint16 srcX = (1 + 5) * toupper(*begin); // 1 + 5 is not the letter width, arbitrary choice of the unpacking code
Box box((nextX == destX) ? (nextX + 1) : nextX, nextX + k5_LetterWidth + 1, nextY, nextY + k6_LetterHeight - 1);
- _vm->_displayMan->f132_blitToBitmap(srcBitmap, destBitmap, box, (nextX == destX) ? (srcX + 1) : srcX, 0, 6 * 128 / 2, destByteWidth, k255_ColorNoTransparency);
+ _vm->_displayMan->f132_blitToBitmap(srcBitmap, destBitmap, box, (nextX == destX) ? (srcX + 1) : srcX, 0, 6 * 128 / 2, destByteWidth, kM1_ColorNoTransparency);
nextX += k5_LetterWidth + 1;
}