aboutsummaryrefslogtreecommitdiff
path: root/engines/dm
diff options
context:
space:
mode:
authorStrangerke2016-09-16 07:46:10 +0200
committerStrangerke2016-09-16 07:46:10 +0200
commit952abc32433568d0f896eb787ad30236e4a35bbb (patch)
tree3d22df713dc64aa46e953c438e87c210af8619b1 /engines/dm
parentae9ff702046e6430a4d8962e22e6a7124aae1048 (diff)
downloadscummvm-rg350-952abc32433568d0f896eb787ad30236e4a35bbb.tar.gz
scummvm-rg350-952abc32433568d0f896eb787ad30236e4a35bbb.tar.bz2
scummvm-rg350-952abc32433568d0f896eb787ad30236e4a35bbb.zip
DM: More renaming in gfx enums
Diffstat (limited to 'engines/dm')
-rw-r--r--engines/dm/champion.cpp70
-rw-r--r--engines/dm/dialog.cpp54
-rw-r--r--engines/dm/dm.cpp78
-rw-r--r--engines/dm/eventman.cpp62
-rw-r--r--engines/dm/eventman.h2
-rw-r--r--engines/dm/gfx.cpp162
-rw-r--r--engines/dm/gfx.h176
-rw-r--r--engines/dm/inventory.cpp80
-rw-r--r--engines/dm/loadsave.cpp2
-rw-r--r--engines/dm/menus.cpp84
-rw-r--r--engines/dm/movesens.cpp2
-rw-r--r--engines/dm/objectman.cpp10
-rw-r--r--engines/dm/text.cpp16
-rw-r--r--engines/dm/text.h2
-rw-r--r--engines/dm/timeline.cpp2
15 files changed, 401 insertions, 401 deletions
diff --git a/engines/dm/champion.cpp b/engines/dm/champion.cpp
index cc7a4ed876..3712fae0af 100644
--- a/engines/dm/champion.cpp
+++ b/engines/dm/champion.cpp
@@ -51,7 +51,7 @@ void Champion::resetToZero() {
memset(_name, '\0', 8);
memset(_title, '\0', 20);
_dir = kDMDirNorth;
- _cell = k0_ViewCellFronLeft;
+ _cell = kDMViewCellFronLeft;
_actionIndex = kDMActionN;
_symbolStep = 0;
memset(_symbols, '\0', 5);
@@ -86,7 +86,7 @@ void ChampionMan::initConstants() {
Box(281, 299, 15, 28)
};
- static Color championColor[4] = {(Color)7, (Color)11, (Color)8, (Color)14};
+ static Color championColor[4] = {kDMColorLightGreen, kDMColorYellow, kDMColorRed, kDMColorBlue};
int16 lightPowerToLightAmount[16] = {0, 5, 12, 24, 33, 40, 46, 51, 59, 68, 76, 82, 89, 94, 97, 100};
uint16 slotMasks[38] = { // @ G0038_ai_Graphic562_SlotMasks
/* 30 for champion inventory, 8 for chest */
@@ -263,10 +263,10 @@ int16 ChampionMan::getDecodedValue(char *string, uint16 characterCount) {
void ChampionMan::drawHealthOrStaminaOrManaValue(int16 posY, int16 currVal, int16 maxVal) {
Common::String tmp = getStringFromInteger(currVal, true, 3);
- _vm->_textMan->printToViewport(55, posY, k13_ColorLightestGray, tmp.c_str());
- _vm->_textMan->printToViewport(73, posY, k13_ColorLightestGray, "/");
+ _vm->_textMan->printToViewport(55, posY, kDMColorLightestGray, tmp.c_str());
+ _vm->_textMan->printToViewport(73, posY, kDMColorLightestGray, "/");
tmp = getStringFromInteger(maxVal, true, 3);
- _vm->_textMan->printToViewport(79, posY, k13_ColorLightestGray, tmp.c_str());
+ _vm->_textMan->printToViewport(79, posY, kDMColorLightestGray, tmp.c_str());
}
uint16 ChampionMan::getHandSlotIndex(uint16 slotBoxIndex) {
@@ -1401,7 +1401,7 @@ void ChampionMan::applyAndDrawPendingDamageAndWounds() {
blitBox._y2 = 28;
blitBox._x1 = textPosX + 7;
blitBox._x2 = blitBox._x1 + 31; /* Box is over the champion portrait in the status box */
- _vm->_displayMan->blitToScreen(_vm->_displayMan->getNativeBitmapOrGraphic(k16_damageToChampionBig), &blitBox, k16_byteWidth, k10_ColorFlesh, 29);
+ _vm->_displayMan->blitToScreen(_vm->_displayMan->getNativeBitmapOrGraphic(k16_damageToChampionBig), &blitBox, k16_byteWidth, kDMColorFlesh, 29);
// Check the number of digits and sets the position accordingly.
if (pendingDamage < 10) // 1 digit
textPosX += 21;
@@ -1415,7 +1415,7 @@ void ChampionMan::applyAndDrawPendingDamageAndWounds() {
blitBox._y2 = 6;
blitBox._x1 = textPosX;
blitBox._x2 = blitBox._x1 + 47; /* Box is over the champion name in the status box */
- _vm->_displayMan->blitToScreen(_vm->_displayMan->getNativeBitmapOrGraphic(k15_damageToChampionSmallIndice), &blitBox, k24_byteWidth, k10_ColorFlesh, 7);
+ _vm->_displayMan->blitToScreen(_vm->_displayMan->getNativeBitmapOrGraphic(k15_damageToChampionSmallIndice), &blitBox, k24_byteWidth, kDMColorFlesh, 7);
// Check the number of digits and sets the position accordingly.
if (pendingDamage < 10) // 1 digit
textPosX += 19;
@@ -1426,7 +1426,7 @@ void ChampionMan::applyAndDrawPendingDamageAndWounds() {
textPosY = 5;
}
- _vm->_textMan->printToLogicalScreen(textPosX, textPosY, k15_ColorWhite, k8_ColorRed, getStringFromInteger(pendingDamage, false, 3).c_str());
+ _vm->_textMan->printToLogicalScreen(textPosX, textPosY, kDMColorWhite, kDMColorRed, getStringFromInteger(pendingDamage, false, 3).c_str());
int16 eventIndex = championPtr->_hideDamageReceivedIndex;
if (eventIndex == -1) {
@@ -1492,7 +1492,7 @@ void ChampionMan::championKill(uint16 champIndex) {
unpoison(champIndex);
_vm->_displayMan->_useByteBoxCoordinates = false;
- _vm->_displayMan->fillScreenBox(_boxChampionIcons[curChampionIconIndex], k0_ColorBlack);
+ _vm->_displayMan->fillScreenBox(_boxChampionIcons[curChampionIconIndex], kDMColorBlack);
drawChampionState((ChampionIndex)champIndex);
ChampionIndex aliveChampionIndex;
@@ -1875,12 +1875,12 @@ void ChampionMan::addCandidateChampionToParty(uint16 championPortraitIndex) {
championPtr->resetToZero();
// Strangerke - TODO: Check if the new code is possible to run on the older version (example: the portraits could be missing in the data)
_vm->_displayMan->_useByteBoxCoordinates = true;
- _vm->_displayMan->blitToBitmap(_vm->_displayMan->getNativeBitmapOrGraphic(k26_ChampionPortraitsIndice), championPtr->_portrait, _boxChampionPortrait, getChampionPortraitX(championPortraitIndex), getChampionPortraitY(championPortraitIndex), k128_byteWidth, k16_byteWidth, kM1_ColorNoTransparency, 87, 29);
+ _vm->_displayMan->blitToBitmap(_vm->_displayMan->getNativeBitmapOrGraphic(k26_ChampionPortraitsIndice), championPtr->_portrait, _boxChampionPortrait, getChampionPortraitX(championPortraitIndex), getChampionPortraitY(championPortraitIndex), k128_byteWidth, k16_byteWidth, kDMColorNoTransparency, 87, 29);
championPtr->_actionIndex = kDMActionNone;
championPtr->_enableActionEventIndex = -1;
championPtr->_hideDamageReceivedIndex = -1;
championPtr->_dir = _vm->_dungeonMan->_partyDir;
- uint16 viewCell = k0_ViewCellFronLeft;
+ uint16 viewCell = kDMViewCellFronLeft;
while (getIndexInCell(_vm->normalizeModulo4(viewCell + _vm->_dungeonMan->_partyDir)) != kDMChampionNone)
viewCell++;
@@ -2073,7 +2073,7 @@ void ChampionMan::drawChampionBarGraphs(ChampionIndex champIndex) {
if (barGraphHeight < 25) {
box._y1 = 2;
box._y2 = 27 - barGraphHeight;
- _vm->_displayMan->fillScreenBox(box, k12_ColorDarkestGray);
+ _vm->_displayMan->fillScreenBox(box, kDMColorDarkestGray);
}
if (barGraphHeight) {
box._y1 = 27 - barGraphHeight;
@@ -2132,7 +2132,7 @@ void ChampionMan::drawChampionState(ChampionIndex champIndex) {
box._x1 = championStatusBoxX;
box._x2 = box._x1 + 66;
if (curChampion->_currHealth) {
- _vm->_displayMan->fillScreenBox(box, k12_ColorDarkestGray);
+ _vm->_displayMan->fillScreenBox(box, kDMColorDarkestGray);
int16 nativeBitmapIndices[3];
for (uint16 i = 0; i < 3; ++i)
nativeBitmapIndices[i] = 0;
@@ -2148,7 +2148,7 @@ void ChampionMan::drawChampionState(ChampionIndex champIndex) {
nativeBitmapIndices[borderCount++] = k37_BorderPartyShieldIndice;
while (borderCount--)
- _vm->_displayMan->blitToScreen(_vm->_displayMan->getNativeBitmapOrGraphic(nativeBitmapIndices[borderCount]), &box, k40_byteWidth, k10_ColorFlesh, 29);
+ _vm->_displayMan->blitToScreen(_vm->_displayMan->getNativeBitmapOrGraphic(nativeBitmapIndices[borderCount]), &box, k40_byteWidth, kDMColorFlesh, 29);
if (isInventoryChampion) {
_vm->_inventoryMan->drawStatusBoxPortrait(champIndex);
@@ -2156,8 +2156,8 @@ void ChampionMan::drawChampionState(ChampionIndex champIndex) {
} else
setFlag(championAttributes, kDMAttributeNameTitle | kDMAttributeStatistics | kDMAttributeWounds | kDMAttributeActionHand);
} else {
- _vm->_displayMan->blitToScreen(_vm->_displayMan->getNativeBitmapOrGraphic(k8_StatusBoxDeadChampion), &box, k40_byteWidth, kM1_ColorNoTransparency, 29);
- _vm->_textMan->printToLogicalScreen(championStatusBoxX + 1, 5, k13_ColorLightestGray, k1_ColorDarkGary, curChampion->_name);
+ _vm->_displayMan->blitToScreen(_vm->_displayMan->getNativeBitmapOrGraphic(k8_StatusBoxDeadChampion), &box, k40_byteWidth, kDMColorNoTransparency, 29);
+ _vm->_textMan->printToLogicalScreen(championStatusBoxX + 1, 5, kDMColorLightestGray, kDMColorDarkGary, curChampion->_name);
_vm->_menuMan->drawActionIcon(champIndex);
clearFlag(curChampion->_attributes, kDMAttributeNameTitle | kDMAttributeStatistics | kDMAttributeLoad | kDMAttributeIcon | kDMAttributePanel | kDMAttributeStatusBox | kDMAttributeWounds | kDMAttributeViewport | kDMAttributeActionHand);
@@ -2172,7 +2172,7 @@ void ChampionMan::drawChampionState(ChampionIndex champIndex) {
}
if (getFlag(championAttributes, kDMAttributeNameTitle)) {
- Color nameColor = (champIndex == _leaderIndex) ? k9_ColorGold : k13_ColorLightestGray;
+ Color nameColor = (champIndex == _leaderIndex) ? kDMColorGold : kDMColorLightestGray;
if (isInventoryChampion) {
char *championName = curChampion->_name;
_vm->_textMan->printToViewport(3, 7, nameColor, championName);
@@ -2189,8 +2189,8 @@ void ChampionMan::drawChampionState(ChampionIndex champIndex) {
box._y2 = 6;
box._x1 = championStatusBoxX;
box._x2 = box._x1 + 42;
- _vm->_displayMan->fillScreenBox(box, k1_ColorDarkGary);
- _vm->_textMan->printToLogicalScreen(championStatusBoxX + 1, 5, nameColor, k1_ColorDarkGary, curChampion->_name);
+ _vm->_displayMan->fillScreenBox(box, kDMColorDarkGary);
+ _vm->_textMan->printToLogicalScreen(championStatusBoxX + 1, 5, nameColor, kDMColorDarkGary, curChampion->_name);
}
}
if (getFlag(championAttributes, kDMAttributeStatistics)) {
@@ -2203,7 +2203,7 @@ void ChampionMan::drawChampionState(ChampionIndex champIndex) {
else
nativeBitmapIndex = k33_SlotBoxNormalIndice;
- _vm->_displayMan->blitToViewport(_vm->_displayMan->getNativeBitmapOrGraphic(nativeBitmapIndex), boxMouth, k16_byteWidth, k12_ColorDarkestGray, 18);
+ _vm->_displayMan->blitToViewport(_vm->_displayMan->getNativeBitmapOrGraphic(nativeBitmapIndex), boxMouth, k16_byteWidth, kDMColorDarkestGray, 18);
nativeBitmapIndex = k33_SlotBoxNormalIndice;
for (int i = kDMStatStrength; i <= kDMStatAntifire; i++) {
if ((curChampion->_statistics[i][kDMStatCurrent] < curChampion->_statistics[i][kDMStatMaximum])) {
@@ -2211,7 +2211,7 @@ void ChampionMan::drawChampionState(ChampionIndex champIndex) {
break;
}
}
- _vm->_displayMan->blitToViewport(_vm->_displayMan->getNativeBitmapOrGraphic(nativeBitmapIndex), boxEye, k16_byteWidth, k12_ColorDarkestGray, 18);
+ _vm->_displayMan->blitToViewport(_vm->_displayMan->getNativeBitmapOrGraphic(nativeBitmapIndex), boxEye, k16_byteWidth, kDMColorDarkestGray, 18);
setFlag(championAttributes, kDMAttributeViewport);
}
}
@@ -2226,11 +2226,11 @@ void ChampionMan::drawChampionState(ChampionIndex champIndex) {
uint16 maxLoad = getMaximumLoad(curChampion);
Color loadColor;
if (curChampion->_load > maxLoad)
- loadColor = k8_ColorRed;
+ loadColor = kDMColorRed;
else if (((long)curChampion->_load << 3) > ((long)maxLoad * 5))
- loadColor = k11_ColorYellow;
+ loadColor = kDMColorYellow;
else
- loadColor = k13_ColorLightestGray;
+ loadColor = kDMColorLightestGray;
switch (_vm->getGameLanguage()) { // localized
default:
@@ -2261,7 +2261,7 @@ void ChampionMan::drawChampionState(ChampionIndex champIndex) {
uint16 championIconIndex = getChampionIconIndex(curChampion->_cell, _vm->_dungeonMan->_partyDir);
if (getFlag(championAttributes, kDMAttributeIcon) && (_vm->_eventMan->_useChampionIconOrdinalAsMousePointerBitmap != _vm->indexToOrdinal(championIconIndex))) {
_vm->_displayMan->fillScreenBox(_boxChampionIcons[championIconIndex], _championColor[champIndex]);
- _vm->_displayMan->blitToBitmap(_vm->_displayMan->getNativeBitmapOrGraphic(k28_ChampionIcons), _vm->_displayMan->_bitmapScreen, _boxChampionIcons[championIconIndex], getChampionIconIndex(curChampion->_dir, _vm->_dungeonMan->_partyDir) * 19, 0, k40_byteWidth, k160_byteWidthScreen, k12_ColorDarkestGray, 14, k200_heightScreen);
+ _vm->_displayMan->blitToBitmap(_vm->_displayMan->getNativeBitmapOrGraphic(k28_ChampionIcons), _vm->_displayMan->_bitmapScreen, _boxChampionIcons[championIconIndex], getChampionIconIndex(curChampion->_dir, _vm->_dungeonMan->_partyDir) * 19, 0, k40_byteWidth, k160_byteWidthScreen, kDMColorDarkestGray, 14, k200_heightScreen);
}
if (getFlag(championAttributes, kDMAttributePanel) && isInventoryChampion) {
if (_vm->_pressingMouth)
@@ -2363,11 +2363,11 @@ void ChampionMan::drawSlot(uint16 champIndex, int16 slotIndex) {
if (isInventoryChamp) {
_vm->_displayMan->blitToBitmap(_vm->_displayMan->getNativeBitmapOrGraphic(nativeBitmapIndex),
_vm->_displayMan->_bitmapViewport, box, 0, 0, 16, k112_byteWidthViewport,
- k12_ColorDarkestGray, _vm->_displayMan->getPixelHeight(nativeBitmapIndex), k136_heightViewport);
+ kDMColorDarkestGray, _vm->_displayMan->getPixelHeight(nativeBitmapIndex), k136_heightViewport);
} else {
_vm->_displayMan->blitToBitmap(_vm->_displayMan->getNativeBitmapOrGraphic(nativeBitmapIndex),
_vm->_displayMan->_bitmapScreen, box, 0, 0, 16, k160_byteWidthScreen,
- k12_ColorDarkestGray, _vm->_displayMan->getPixelHeight(nativeBitmapIndex), k136_heightViewport);
+ kDMColorDarkestGray, _vm->_displayMan->getPixelHeight(nativeBitmapIndex), k136_heightViewport);
}
}
@@ -2390,10 +2390,10 @@ void ChampionMan::renameChampion(Champion *champ) {
displayBox._x1 = 3;
displayBox._x2 = displayBox._x1 + 167;
- _vm->_displayMan->fillBoxBitmap(_vm->_displayMan->_bitmapViewport, displayBox, k12_ColorDarkestGray, k112_byteWidthViewport, k136_heightViewport);
- _vm->_displayMan->blitToViewport(_vm->_displayMan->getNativeBitmapOrGraphic(k27_PanelRenameChampionIndice), _vm->_inventoryMan->_boxPanel, k72_byteWidth, k4_ColorCyan, 73);
- _vm->_textMan->printToViewport(177, 58, k13_ColorLightestGray, "_______");
- _vm->_textMan->printToViewport(105, 76, k13_ColorLightestGray, "___________________");
+ _vm->_displayMan->fillBoxBitmap(_vm->_displayMan->_bitmapViewport, displayBox, kDMColorDarkestGray, k112_byteWidthViewport, k136_heightViewport);
+ _vm->_displayMan->blitToViewport(_vm->_displayMan->getNativeBitmapOrGraphic(k27_PanelRenameChampionIndice), _vm->_inventoryMan->_boxPanel, k72_byteWidth, kDMColorCyan, 73);
+ _vm->_textMan->printToViewport(177, 58, kDMColorLightestGray, "_______");
+ _vm->_textMan->printToViewport(105, 76, kDMColorLightestGray, "___________________");
_vm->_eventMan->showMouse();
_vm->_displayMan->drawViewport(k0_viewportNotDungeonView);
_vm->_eventMan->setMousePointerToNormal(k0_pointerArrow);
@@ -2410,7 +2410,7 @@ void ChampionMan::renameChampion(Champion *champ) {
bool championTitleIsFull = ((renamedChampionStringMode == k2_RENAME_CHAMPION_TITLE) && (curCharacterIndex == 19));
if (!championTitleIsFull) {
_vm->_eventMan->showMouse();
- _vm->_textMan->printTextToBitmap(_vm->_displayMan->_bitmapScreen, k160_byteWidthScreen, textPosX, textPosY, k9_ColorGold, k12_ColorDarkestGray, underscoreCharacterString, k200_heightScreen);
+ _vm->_textMan->printTextToBitmap(_vm->_displayMan->_bitmapScreen, k160_byteWidthScreen, textPosX, textPosY, kDMColorGold, kDMColorDarkestGray, underscoreCharacterString, k200_heightScreen);
_vm->_eventMan->hideMouse();
}
@@ -2495,7 +2495,7 @@ void ChampionMan::renameChampion(Champion *champ) {
if (!championTitleIsFull) {
renameChampionInputCharacterString[0] = curCharacter;
_vm->_eventMan->showMouse();
- _vm->_textMan->printTextToBitmap(_vm->_displayMan->_bitmapScreen, k160_byteWidthScreen, textPosX, textPosY, k13_ColorLightestGray, k12_ColorDarkestGray, renameChampionInputCharacterString, k200_heightScreen);
+ _vm->_textMan->printTextToBitmap(_vm->_displayMan->_bitmapScreen, k160_byteWidthScreen, textPosX, textPosY, kDMColorLightestGray, kDMColorDarkestGray, renameChampionInputCharacterString, k200_heightScreen);
_vm->_eventMan->hideMouse();
renamedChampionString[curCharacterIndex++] = curCharacter;
renamedChampionString[curCharacterIndex] = '\0';
@@ -2512,7 +2512,7 @@ void ChampionMan::renameChampion(Champion *champ) {
} else if (curCharacter == '\r') { // Carriage return
if ((renamedChampionStringMode == k1_RENAME_CHAMPION_NAME) && (curCharacterIndex > 0)) {
_vm->_eventMan->showMouse();
- _vm->_textMan->printTextToBitmap(_vm->_displayMan->_bitmapScreen, k160_byteWidthScreen, textPosX, textPosY, k13_ColorLightestGray, k12_ColorDarkestGray, underscoreCharacterString, k200_heightScreen);
+ _vm->_textMan->printTextToBitmap(_vm->_displayMan->_bitmapScreen, k160_byteWidthScreen, textPosX, textPosY, kDMColorLightestGray, kDMColorDarkestGray, underscoreCharacterString, k200_heightScreen);
_vm->_eventMan->hideMouse();
renamedChampionStringMode = k2_RENAME_CHAMPION_TITLE;
renamedChampionString = champ->_title;
@@ -2526,7 +2526,7 @@ void ChampionMan::renameChampion(Champion *champ) {
if (!championTitleIsFull) {
_vm->_eventMan->showMouse();
- _vm->_textMan->printTextToBitmap(_vm->_displayMan->_bitmapScreen, k160_byteWidthScreen, textPosX, textPosY, k13_ColorLightestGray, k12_ColorDarkestGray, underscoreCharacterString, k200_heightScreen);
+ _vm->_textMan->printTextToBitmap(_vm->_displayMan->_bitmapScreen, k160_byteWidthScreen, textPosX, textPosY, kDMColorLightestGray, kDMColorDarkestGray, underscoreCharacterString, k200_heightScreen);
_vm->_eventMan->hideMouse();
}
if (curCharacterIndex == 0) {
diff --git a/engines/dm/dialog.cpp b/engines/dm/dialog.cpp
index 47888090f9..e982219839 100644
--- a/engines/dm/dialog.cpp
+++ b/engines/dm/dialog.cpp
@@ -46,7 +46,7 @@ void DialogMan::dialogDraw(const char *msg1, const char *msg2, const char *choic
_vm->_displayMan->loadIntoBitmap(k0_dialogBoxGraphicIndice, _vm->_displayMan->_bitmapViewport);
//Strangerke: the version should be replaced by a ScummVM/RogueVM (?) string
// TODO: replace with ScummVM version string
- _vm->_textMan->printTextToBitmap(_vm->_displayMan->_bitmapViewport, k112_byteWidthViewport, 192, 7, k2_ColorLightGray, k1_ColorDarkGary, "V2.2", k136_heightViewport);
+ _vm->_textMan->printTextToBitmap(_vm->_displayMan->_bitmapViewport, k112_byteWidthViewport, 192, 7, kDMColorLightGray, kDMColorDarkGary, "V2.2", k136_heightViewport);
int16 choiceCount = 1;
if (choice2)
choiceCount++;
@@ -61,16 +61,16 @@ void DialogMan::dialogDraw(const char *msg1, const char *msg2, const char *choic
_vm->_displayMan->startEndFadeToPalette(_vm->_displayMan->_blankBuffer);
if (clearScreen)
- _vm->_displayMan->fillScreen(k0_ColorBlack);
+ _vm->_displayMan->fillScreen(kDMColorBlack);
_vm->_displayMan->_useByteBoxCoordinates = false;
if (choiceCount == 1) {
- _vm->_displayMan->blitToBitmap(_vm->_displayMan->_bitmapViewport, _vm->_displayMan->_bitmapViewport, constBox1, 0, 64, k112_byteWidthViewport, k112_byteWidthViewport, kM1_ColorNoTransparency, k136_heightViewport, k136_heightViewport);
- _vm->_displayMan->blitToBitmap(_vm->_displayMan->_bitmapViewport, _vm->_displayMan->_bitmapViewport, constBox2, 0, 39, k112_byteWidthViewport, k112_byteWidthViewport, kM1_ColorNoTransparency, k136_heightViewport, k136_heightViewport);
- _vm->_displayMan->blitToBitmap(_vm->_displayMan->_bitmapViewport, _vm->_displayMan->_bitmapViewport, constBox3, 0, 14, k112_byteWidthViewport, k112_byteWidthViewport, kM1_ColorNoTransparency, k136_heightViewport, k136_heightViewport);
+ _vm->_displayMan->blitToBitmap(_vm->_displayMan->_bitmapViewport, _vm->_displayMan->_bitmapViewport, constBox1, 0, 64, k112_byteWidthViewport, k112_byteWidthViewport, kDMColorNoTransparency, k136_heightViewport, k136_heightViewport);
+ _vm->_displayMan->blitToBitmap(_vm->_displayMan->_bitmapViewport, _vm->_displayMan->_bitmapViewport, constBox2, 0, 39, k112_byteWidthViewport, k112_byteWidthViewport, kDMColorNoTransparency, k136_heightViewport, k136_heightViewport);
+ _vm->_displayMan->blitToBitmap(_vm->_displayMan->_bitmapViewport, _vm->_displayMan->_bitmapViewport, constBox3, 0, 14, k112_byteWidthViewport, k112_byteWidthViewport, kDMColorNoTransparency, k136_heightViewport, k136_heightViewport);
printCenteredChoice(_vm->_displayMan->_bitmapViewport, choice1, 112, 114);
} else if (choiceCount == 2) {
- _vm->_displayMan->blitToBitmap(_vm->_displayMan->_bitmapViewport, _vm->_displayMan->_bitmapViewport, dialog2ChoicesPatch, 102, 52, k112_byteWidthViewport, k112_byteWidthViewport, kM1_ColorNoTransparency, k136_heightViewport, k136_heightViewport);
+ _vm->_displayMan->blitToBitmap(_vm->_displayMan->_bitmapViewport, _vm->_displayMan->_bitmapViewport, dialog2ChoicesPatch, 102, 52, k112_byteWidthViewport, k112_byteWidthViewport, kDMColorNoTransparency, k136_heightViewport, k136_heightViewport);
printCenteredChoice(_vm->_displayMan->_bitmapViewport, choice1, 112, 77);
printCenteredChoice(_vm->_displayMan->_bitmapViewport, choice2, 112, 114);
} else if (choiceCount == 3) {
@@ -78,7 +78,7 @@ void DialogMan::dialogDraw(const char *msg1, const char *msg2, const char *choic
printCenteredChoice(_vm->_displayMan->_bitmapViewport, choice2, 59, 114);
printCenteredChoice(_vm->_displayMan->_bitmapViewport, choice3, 166, 114);
} else if (choiceCount == 4) {
- _vm->_displayMan->blitToBitmap(_vm->_displayMan->_bitmapViewport, _vm->_displayMan->_bitmapViewport, dialog4ChoicesPatch, 102, 99, k112_byteWidthViewport, k112_byteWidthViewport, kM1_ColorNoTransparency, k136_heightViewport, k136_heightViewport);
+ _vm->_displayMan->blitToBitmap(_vm->_displayMan->_bitmapViewport, _vm->_displayMan->_bitmapViewport, dialog4ChoicesPatch, 102, 99, k112_byteWidthViewport, k112_byteWidthViewport, kDMColorNoTransparency, k136_heightViewport, k136_heightViewport);
printCenteredChoice(_vm->_displayMan->_bitmapViewport, choice1, 59, 77);
printCenteredChoice(_vm->_displayMan->_bitmapViewport, choice2, 166, 77);
printCenteredChoice(_vm->_displayMan->_bitmapViewport, choice3, 59, 114);
@@ -93,14 +93,14 @@ void DialogMan::dialogDraw(const char *msg1, const char *msg2, const char *choic
if (isMessageOnTwoLines(msg1, L1312_ac_StringPart1, L1313_ac_StringPart2)) {
textPosY = 21;
textPosX = 113 - ((strlen(L1312_ac_StringPart1) * 6) >> 1);
- _vm->_textMan->printTextToBitmap(_vm->_displayMan->_bitmapViewport, k112_byteWidthViewport, textPosX, textPosY, k11_ColorYellow, k5_ColorLightBrown, L1312_ac_StringPart1, k136_heightViewport);
+ _vm->_textMan->printTextToBitmap(_vm->_displayMan->_bitmapViewport, k112_byteWidthViewport, textPosX, textPosY, kDMColorYellow, kDMColorLightBrown, L1312_ac_StringPart1, k136_heightViewport);
textPosY += 8;
textPosX = 113 - ((strlen(L1313_ac_StringPart2) * 6) >> 1);
- _vm->_textMan->printTextToBitmap(_vm->_displayMan->_bitmapViewport, k112_byteWidthViewport, textPosX, textPosY, k11_ColorYellow, k5_ColorLightBrown, L1313_ac_StringPart2, k136_heightViewport);
+ _vm->_textMan->printTextToBitmap(_vm->_displayMan->_bitmapViewport, k112_byteWidthViewport, textPosX, textPosY, kDMColorYellow, kDMColorLightBrown, L1313_ac_StringPart2, k136_heightViewport);
textPosY += 8;
} else {
textPosX = 113 - ((strlen(msg1) * 6) >> 1);
- _vm->_textMan->printTextToBitmap(_vm->_displayMan->_bitmapViewport, k112_byteWidthViewport, textPosX, textPosY, k11_ColorYellow, k5_ColorLightBrown, msg1, k136_heightViewport);
+ _vm->_textMan->printTextToBitmap(_vm->_displayMan->_bitmapViewport, k112_byteWidthViewport, textPosX, textPosY, kDMColorYellow, kDMColorLightBrown, msg1, k136_heightViewport);
textPosY += 8;
}
}
@@ -109,13 +109,13 @@ void DialogMan::dialogDraw(const char *msg1, const char *msg2, const char *choic
char L1313_ac_StringPart2[70];
if (isMessageOnTwoLines(msg2, L1312_ac_StringPart1, L1313_ac_StringPart2)) {
textPosX = 113 - ((strlen(L1312_ac_StringPart1) * 6) >> 1);
- _vm->_textMan->printTextToBitmap(_vm->_displayMan->_bitmapViewport, k112_byteWidthViewport, textPosX, textPosY, k9_ColorGold, k5_ColorLightBrown, L1312_ac_StringPart1, k136_heightViewport);
+ _vm->_textMan->printTextToBitmap(_vm->_displayMan->_bitmapViewport, k112_byteWidthViewport, textPosX, textPosY, kDMColorGold, kDMColorLightBrown, L1312_ac_StringPart1, k136_heightViewport);
textPosY += 8;
textPosX = 113 - ((strlen(L1313_ac_StringPart2) * 6) >> 1);
- _vm->_textMan->printTextToBitmap(_vm->_displayMan->_bitmapViewport, k112_byteWidthViewport, textPosX, textPosY, k9_ColorGold, k5_ColorLightBrown, L1313_ac_StringPart2, k136_heightViewport);
+ _vm->_textMan->printTextToBitmap(_vm->_displayMan->_bitmapViewport, k112_byteWidthViewport, textPosX, textPosY, kDMColorGold, kDMColorLightBrown, L1313_ac_StringPart2, k136_heightViewport);
} else {
textPosX = 113 - ((strlen(msg2) * 6) >> 1);
- _vm->_textMan->printTextToBitmap(_vm->_displayMan->_bitmapViewport, k112_byteWidthViewport, textPosX, textPosY, k9_ColorGold, k5_ColorLightBrown, msg2, k136_heightViewport);
+ _vm->_textMan->printTextToBitmap(_vm->_displayMan->_bitmapViewport, k112_byteWidthViewport, textPosX, textPosY, kDMColorGold, kDMColorLightBrown, msg2, k136_heightViewport);
}
}
if (screenDialog) {
@@ -125,7 +125,7 @@ void DialogMan::dialogDraw(const char *msg1, const char *msg2, const char *choic
displayBox._x1 = 47;
displayBox._x2 = 270;
_vm->_eventMan->showMouse();
- _vm->_displayMan->blitToScreen(_vm->_displayMan->_bitmapViewport, &displayBox, k112_byteWidthViewport, kM1_ColorNoTransparency, k136_heightViewport);
+ _vm->_displayMan->blitToScreen(_vm->_displayMan->_bitmapViewport, &displayBox, k112_byteWidthViewport, kDMColorNoTransparency, k136_heightViewport);
_vm->_eventMan->hideMouse();
} else {
_vm->_displayMan->drawViewport(k0_viewportNotDungeonView);
@@ -142,7 +142,7 @@ void DialogMan::dialogDraw(const char *msg1, const char *msg2, const char *choic
void DialogMan::printCenteredChoice(byte *bitmap, const char *str, int16 posX, int16 posY) {
if (str) {
posX -= (strlen(str) * 6) >> 1;
- _vm->_textMan->printTextToBitmap(bitmap, k112_byteWidthViewport, posX, posY, k9_ColorGold, k5_ColorLightBrown, str, k136_heightViewport);
+ _vm->_textMan->printTextToBitmap(bitmap, k112_byteWidthViewport, posX, posY, kDMColorGold, kDMColorLightBrown, str, k136_heightViewport);
}
}
@@ -195,56 +195,56 @@ int16 DialogMan::getChoice(uint16 choiceCount, uint16 dialogSetIndex, int16 driv
_vm->_displayMan->_drawFloorAndCeilingRequested = true;
Box boxB(0, 0, boxA._x2 - boxA._x1 + 3, boxA._y2 - boxA._y1 + 3);
_vm->_displayMan->blitToBitmap(_vm->_displayMan->_bitmapScreen, _vm->_displayMan->_bitmapViewport,
- boxB, boxA._x1, boxA._y1, k160_byteWidthScreen, k160_byteWidthScreen, kM1_ColorNoTransparency, 200, 25);
+ boxB, boxA._x1, boxA._y1, k160_byteWidthScreen, k160_byteWidthScreen, kDMColorNoTransparency, 200, 25);
_vm->delay(1);
boxB = boxA;
boxB._y2 = boxB._y1;
- _vm->_displayMan->fillScreenBox(boxB, k5_ColorLightBrown);
+ _vm->_displayMan->fillScreenBox(boxB, kDMColorLightBrown);
boxB = boxA;
boxB._x2 = boxB._x1;
boxB._y2--;
- _vm->_displayMan->fillScreenBox(boxB, k5_ColorLightBrown);
+ _vm->_displayMan->fillScreenBox(boxB, kDMColorLightBrown);
boxB = boxA;
boxB._y2--;
boxB._y1 = boxB._y2;
boxB._x1 -= 2;
- _vm->_displayMan->fillScreenBox(boxB, k0_ColorBlack);
+ _vm->_displayMan->fillScreenBox(boxB, kDMColorBlack);
boxB = boxA;
boxB._x1 = boxB._x2;
- _vm->_displayMan->fillScreenBox(boxB, k0_ColorBlack);
+ _vm->_displayMan->fillScreenBox(boxB, kDMColorBlack);
_vm->delay(2);
boxB = boxA;
boxB._y1++;
boxB._y2 = boxB._y1;
boxB._x2 -= 2;
- _vm->_displayMan->fillScreenBox(boxB, k5_ColorLightBrown);
+ _vm->_displayMan->fillScreenBox(boxB, kDMColorLightBrown);
boxB = boxA;
boxB._x1++;
boxB._x2 = boxB._x1;
boxB._y2--;
- _vm->_displayMan->fillScreenBox(boxB, k5_ColorLightBrown);
+ _vm->_displayMan->fillScreenBox(boxB, kDMColorLightBrown);
boxB = boxA;
boxB._x2--;
boxB._x1 = boxB._x2;
- _vm->_displayMan->fillScreenBox(boxB, k0_ColorBlack);
+ _vm->_displayMan->fillScreenBox(boxB, kDMColorBlack);
boxB = boxA;
boxB._y1 = boxB._y2 = boxB._y2 - 2;
boxB._x1++;
- _vm->_displayMan->fillScreenBox(boxB, k0_ColorBlack);
+ _vm->_displayMan->fillScreenBox(boxB, kDMColorBlack);
boxB = boxA;
boxB._y1 = boxB._y2 = boxB._y2 + 2;
boxB._x1--;
boxB._x2 += 2;
- _vm->_displayMan->fillScreenBox(boxB, k13_ColorLightestGray);
+ _vm->_displayMan->fillScreenBox(boxB, kDMColorLightestGray);
boxB = boxA;
boxB._x1 = boxB._x2 = boxB._x2 + 3;
boxB._y2 += 2;
- _vm->_displayMan->fillScreenBox(boxB, k13_ColorLightestGray);
+ _vm->_displayMan->fillScreenBox(boxB, kDMColorLightestGray);
_vm->delay(2);
boxA._x2 += 3;
boxA._y2 += 3;
_vm->_displayMan->blitToBitmap(_vm->_displayMan->_bitmapViewport, _vm->_displayMan->_bitmapScreen,
- boxA, 0, 0, k160_byteWidthScreen, k160_byteWidthScreen, kM1_ColorNoTransparency, 25, k200_heightScreen);
+ boxA, 0, 0, k160_byteWidthScreen, k160_byteWidthScreen, kDMColorNoTransparency, 25, k200_heightScreen);
_vm->_eventMan->hideMouse();
_vm->_eventMan->_primaryMouseInput = primaryMouseInputBackup;
_vm->_eventMan->_secondaryMouseInput = secondaryMouseInputBackup;
diff --git a/engines/dm/dm.cpp b/engines/dm/dm.cpp
index f8d8844cea..475950c5b9 100644
--- a/engines/dm/dm.cpp
+++ b/engines/dm/dm.cpp
@@ -200,7 +200,7 @@ bool DMEngine::hasFeature(EngineFeature f) const {
Common::Error DMEngine::loadGameState(int slot) {
if (loadgame(slot) != kDMLoadgameFailure) {
- _displayMan->fillScreen(k0_ColorBlack);
+ _displayMan->fillScreen(kDMColorBlack);
_displayMan->startEndFadeToPalette(_displayMan->_palDungeonView[0]);
_newGameFl = k0_modeLoadSavedGame;
@@ -313,14 +313,14 @@ void DMEngine::startGame() {
_displayMan->startEndFadeToPalette(_displayMan->_paletteTopAndBottomScreen);
_displayMan->_useByteBoxCoordinates = false;
delay(1);
- _displayMan->fillScreenBox(boxScreenTop, k0_ColorBlack);
- _displayMan->fillScreenBox(boxScreenRight, k0_ColorBlack);
- _displayMan->fillScreenBox(boxScreenBottom, k0_ColorBlack);
+ _displayMan->fillScreenBox(boxScreenTop, kDMColorBlack);
+ _displayMan->fillScreenBox(boxScreenRight, kDMColorBlack);
+ _displayMan->fillScreenBox(boxScreenBottom, kDMColorBlack);
} else {
_displayMan->_useByteBoxCoordinates = false;
- _displayMan->fillScreenBox(boxScreenTop, k0_ColorBlack);
- _displayMan->fillScreenBox(boxScreenRight, k0_ColorBlack);
- _displayMan->fillScreenBox(boxScreenBottom, k0_ColorBlack);
+ _displayMan->fillScreenBox(boxScreenTop, kDMColorBlack);
+ _displayMan->fillScreenBox(boxScreenRight, kDMColorBlack);
+ _displayMan->fillScreenBox(boxScreenBottom, kDMColorBlack);
}
_displayMan->buildPaletteChangeCopperList(_displayMan->_palDungeonView[0], _displayMan->_paletteTopAndBottomScreen);
@@ -416,7 +416,7 @@ void DMEngine::gameloop() {
if (!_inventoryMan->_inventoryChampionOrdinal && !_championMan->_partyIsSleeping) {
Box box(0, 223, 0, 135);
- _displayMan->fillBoxBitmap(_displayMan->_bitmapViewport, box, k0_ColorBlack, k112_byteWidthViewport, k136_heightViewport); // (possibly dummy code)
+ _displayMan->fillBoxBitmap(_displayMan->_bitmapViewport, box, kDMColorBlack, k112_byteWidthViewport, k136_heightViewport); // (possibly dummy code)
_displayMan->drawDungeon(_dungeonMan->_partyDir, _dungeonMan->_partyMapX, _dungeonMan->_partyMapY);
if (_setMousePointerToObjectInMainLoop) {
_setMousePointerToObjectInMainLoop = false;
@@ -519,13 +519,13 @@ void DMEngine::processEntrance() {
_displayMan->_useByteBoxCoordinates = false;
Box displayBox(0, 100, 0, 160);
for (uint16 idx = 1; idx < 4; idx++) {
- _displayMan->blitToBitmap(_entranceDoorAnimSteps[0], _entranceDoorAnimSteps[idx], displayBox, idx << 2, 0, k64_byteWidth, k64_byteWidth, kM1_ColorNoTransparency, 161, 161);
+ _displayMan->blitToBitmap(_entranceDoorAnimSteps[0], _entranceDoorAnimSteps[idx], displayBox, idx << 2, 0, k64_byteWidth, k64_byteWidth, kDMColorNoTransparency, 161, 161);
displayBox._x2 -= 4;
}
displayBox._x2 = 127;
for (uint16 idx = 5; idx < 8; idx++) {
displayBox._x1 += 4;
- _displayMan->blitToBitmap(_entranceDoorAnimSteps[4], _entranceDoorAnimSteps[idx], displayBox, 0, 0, k64_byteWidth, k64_byteWidth, kM1_ColorNoTransparency, 161, 161);
+ _displayMan->blitToBitmap(_entranceDoorAnimSteps[4], _entranceDoorAnimSteps[idx], displayBox, 0, 0, k64_byteWidth, k64_byteWidth, kDMColorNoTransparency, 161, 161);
}
do {
@@ -622,26 +622,26 @@ void DMEngine::endGame(bool doNotDrawCreditsOnly) {
if (doNotDrawCreditsOnly) {
if (_gameWon) {
// Strangerke: Related to portraits. Game data could be missing for earlier versions of the game.
- _displayMan->fillScreen(k12_ColorDarkestGray);
+ _displayMan->fillScreen(kDMColorDarkestGray);
for (int16 championIndex = kDMChampionFirst; championIndex < _championMan->_partyChampionCount; championIndex++) {
int16 textPosY = championIndex * 48;
Champion *curChampion = &_championMan->_champions[championIndex];
- _displayMan->blitToScreen(_displayMan->getNativeBitmapOrGraphic(k208_wallOrn_43_champMirror), &championMirrorBox, k32_byteWidth, k10_ColorFlesh, 43);
- _displayMan->blitToScreen(curChampion->_portrait, &championPortraitBox, k16_byteWidth, k1_ColorDarkGary, 29);
- _textMan->printEndGameString(87, textPosY += 14, k9_ColorGold, curChampion->_name);
+ _displayMan->blitToScreen(_displayMan->getNativeBitmapOrGraphic(k208_wallOrn_43_champMirror), &championMirrorBox, k32_byteWidth, kDMColorFlesh, 43);
+ _displayMan->blitToScreen(curChampion->_portrait, &championPortraitBox, k16_byteWidth, kDMColorDarkGary, 29);
+ _textMan->printEndGameString(87, textPosY += 14, kDMColorGold, curChampion->_name);
int textPosX = (6 * strlen(curChampion->_name)) + 87;
char championTitleFirstCharacter = curChampion->_title[0];
if ((championTitleFirstCharacter != ',') && (championTitleFirstCharacter != ';') && (championTitleFirstCharacter != '-'))
textPosX += 6;
- _textMan->printEndGameString(textPosX, textPosY++, k9_ColorGold, curChampion->_title);
+ _textMan->printEndGameString(textPosX, textPosY++, kDMColorGold, curChampion->_title);
for (int16 idx = kDMSkillFighter; idx <= kDMSkillWizard; idx++) {
uint16 skillLevel = MIN<uint16>(16, _championMan->getSkillLevel(championIndex, idx | (kDMIgnoreObjectModifiers | kDMIgnoreTemporaryExperience)));
if (skillLevel == 1)
continue;
Common::String displStr = Common::String::format("%s %s", _inventoryMan->_skillLevelNames[skillLevel - 2], _championMan->_baseSkillName[idx]);
- _textMan->printEndGameString(105, textPosY = textPosY + 8, k13_ColorLightestGray, displStr.c_str());
+ _textMan->printEndGameString(105, textPosY = textPosY + 8, kDMColorLightestGray, displStr.c_str());
}
championMirrorBox._y1 += 48;
championMirrorBox._y2 += 48;
@@ -653,8 +653,8 @@ void DMEngine::endGame(bool doNotDrawCreditsOnly) {
return;
}
T0444017:
- _displayMan->fillScreen(k0_ColorBlack);
- _displayMan->blitToScreen(_displayMan->getNativeBitmapOrGraphic(k6_theEndIndice), &theEndBox, k40_byteWidth, kM1_ColorNoTransparency, 14);
+ _displayMan->fillScreen(kDMColorBlack);
+ _displayMan->blitToScreen(_displayMan->getNativeBitmapOrGraphic(k6_theEndIndice), &theEndBox, k40_byteWidth, kDMColorNoTransparency, 14);
for (uint16 i = 0; i < 16; ++i)
darkBluePalette[i] = D01_RGB_DARK_BLUE;
uint16 curPalette[16];
@@ -668,19 +668,19 @@ T0444017:
if (_restartGameAllowed) {
_displayMan->_useByteBoxCoordinates = false;
- _displayMan->fillScreenBox(restartOuterBox, k12_ColorDarkestGray);
- _displayMan->fillScreenBox(restartInnerBox, k0_ColorBlack);
+ _displayMan->fillScreenBox(restartOuterBox, kDMColorDarkestGray);
+ _displayMan->fillScreenBox(restartInnerBox, kDMColorBlack);
switch (getGameLanguage()) { // localized
default:
case Common::EN_ANY:
- _textMan->printToLogicalScreen(110, 154, k4_ColorCyan, k0_ColorBlack, "RESTART THIS GAME");
+ _textMan->printToLogicalScreen(110, 154, kDMColorCyan, kDMColorBlack, "RESTART THIS GAME");
break;
case Common::DE_DEU:
- _textMan->printToLogicalScreen(110, 154, k4_ColorCyan, k0_ColorBlack, "DIESES SPIEL NEU STARTEN");
+ _textMan->printToLogicalScreen(110, 154, kDMColorCyan, kDMColorBlack, "DIESES SPIEL NEU STARTEN");
break;
case Common::FR_FRA:
- _textMan->printToLogicalScreen(110, 154, k4_ColorCyan, k0_ColorBlack, "RECOMMENCER CE JEU");
+ _textMan->printToLogicalScreen(110, 154, kDMColorCyan, kDMColorBlack, "RECOMMENCER CE JEU");
break;
}
@@ -696,7 +696,7 @@ T0444017:
_eventMan->showMouse();
if (_restartGameRequest) {
_displayMan->startEndFadeToPalette(darkBluePalette);
- _displayMan->fillScreen(k0_ColorBlack);
+ _displayMan->fillScreen(kDMColorBlack);
_displayMan->startEndFadeToPalette(_displayMan->_palDungeonView[0]);
_newGameFl = k0_modeLoadSavedGame;
if (loadgame(1) != kDMLoadgameFailure) {
@@ -712,7 +712,7 @@ T0444017:
_displayMan->startEndFadeToPalette(darkBluePalette);
}
Box box(0, 319, 0, 199);
- _displayMan->blitToScreen(_displayMan->getNativeBitmapOrGraphic(k5_creditsGraphicIndice), &box, k160_byteWidthScreen, kM1_ColorNoTransparency, k200_heightScreen);
+ _displayMan->blitToScreen(_displayMan->getNativeBitmapOrGraphic(k5_creditsGraphicIndice), &box, k160_byteWidthScreen, kDMColorNoTransparency, k200_heightScreen);
_displayMan->startEndFadeToPalette(_displayMan->_palCredits);
_eventMan->waitForMouseOrKeyActivity();
@@ -767,11 +767,11 @@ void DMEngine::drawEntrance() {
_savedScreenForOpenEntranceDoors = new byte[k200_heightScreen * k160_byteWidthScreen * 2];
memcpy(_savedScreenForOpenEntranceDoors, _displayMan->_bitmapScreen, 320 * 200);
- _displayMan->_useByteBoxCoordinates = false, _displayMan->blitToBitmap(_displayMan->_bitmapScreen, _entranceDoorAnimSteps[8], doorsUpperHalfBox, 0, 30, k160_byteWidthScreen, k128_byteWidth, kM1_ColorNoTransparency, 200, 161);
- _displayMan->_useByteBoxCoordinates = false, _displayMan->blitToBitmap(_displayMan->_bitmapScreen, _entranceDoorAnimSteps[8], doorsLowerHalfBox, 0, 111, k160_byteWidthScreen, k128_byteWidth, kM1_ColorNoTransparency, 200, 161);
+ _displayMan->_useByteBoxCoordinates = false, _displayMan->blitToBitmap(_displayMan->_bitmapScreen, _entranceDoorAnimSteps[8], doorsUpperHalfBox, 0, 30, k160_byteWidthScreen, k128_byteWidth, kDMColorNoTransparency, 200, 161);
+ _displayMan->_useByteBoxCoordinates = false, _displayMan->blitToBitmap(_displayMan->_bitmapScreen, _entranceDoorAnimSteps[8], doorsLowerHalfBox, 0, 111, k160_byteWidthScreen, k128_byteWidth, kDMColorNoTransparency, 200, 161);
- _displayMan->blitToScreen(_entranceDoorAnimSteps[0], &closedDoorLeftBox, k64_byteWidth, kM1_ColorNoTransparency, 161);
- _displayMan->blitToScreen(_entranceDoorAnimSteps[4], &closedDoorRightBox, k64_byteWidth, kM1_ColorNoTransparency, 161);
+ _displayMan->blitToScreen(_entranceDoorAnimSteps[0], &closedDoorLeftBox, k64_byteWidth, kDMColorNoTransparency, 161);
+ _displayMan->blitToScreen(_entranceDoorAnimSteps[4], &closedDoorRightBox, k64_byteWidth, kDMColorNoTransparency, 161);
_displayMan->startEndFadeToPalette(palEntrance);
}
@@ -790,11 +790,11 @@ void DMEngine::openEntranceDoors() {
_sound->play(k02_soundDOOR_RATTLE, 145, 0x40, 0x40);
}
- _displayMan->blitToScreen(_savedScreenForOpenEntranceDoors, &screenBox, 160, kM1_ColorNoTransparency, 200);
+ _displayMan->blitToScreen(_savedScreenForOpenEntranceDoors, &screenBox, 160, kDMColorNoTransparency, 200);
_displayMan->blitToBitmap(leftDoorBitmap, _displayMan->_bitmapScreen, leftDoorBox, leftDoorBlitFrom, 0, 64, k160_byteWidthScreen,
- kM1_ColorNoTransparency, 161, k200_heightScreen);
+ kDMColorNoTransparency, 161, k200_heightScreen);
_displayMan->blitToBitmap(rightDoorBitmap, _displayMan->_bitmapScreen, rightDoorBox, 0, 0, 64, k160_byteWidthScreen,
- kM1_ColorNoTransparency, 161, k200_heightScreen);
+ kDMColorNoTransparency, 161, k200_heightScreen);
_eventMan->discardAllInput();
_displayMan->updateScreen();
@@ -827,16 +827,16 @@ void DMEngine::drawTittle() {
blitPalette[i] = D01_RGB_DARK_BLUE;
_displayMan->startEndFadeToPalette(blitPalette);
- _displayMan->fillScreen(k0_ColorBlack);
+ _displayMan->fillScreen(kDMColorBlack);
// uncomment this to draw 'Presents'
//_displayMan->f132_blitToBitmap(L1384_puc_Bitmap_Title, _displayMan->_g348_bitmapScreen, G0005_s_Graphic562_Box_Title_Presents, 0, 137, k160_byteWidthScreen, k160_byteWidthScreen, kM1_ColorNoTransparency, k200_heightScreen, k200_heightScreen);
blitPalette[15] = D09_RGB_WHITE;
_displayMan->startEndFadeToPalette(blitPalette);
byte *masterStrikesBack = titleSteps;
- _displayMan->blitToBitmap(bitmapTitle, masterStrikesBack, boxTitleStrikesBackSource, 0, 80, k160_byteWidthScreen, k160_byteWidthScreen, kM1_ColorNoTransparency, 200, 57);
+ _displayMan->blitToBitmap(bitmapTitle, masterStrikesBack, boxTitleStrikesBackSource, 0, 80, k160_byteWidthScreen, k160_byteWidthScreen, kDMColorNoTransparency, 200, 57);
titleSteps += 320 * 57;
byte *bitmapDungeonChaos = titleSteps; /* Unreferenced on Atari ST */
- _displayMan->blitToBitmap(bitmapTitle, bitmapDungeonChaos, boxTitleDungeonChaos, 0, 0, k160_byteWidthScreen, k160_byteWidthScreen, kM1_ColorNoTransparency, 200, 80);
+ _displayMan->blitToBitmap(bitmapTitle, bitmapDungeonChaos, boxTitleDungeonChaos, 0, 0, k160_byteWidthScreen, k160_byteWidthScreen, kDMColorNoTransparency, 200, 80);
titleSteps += 320 * 80;
bitmapTitle = bitmapDungeonChaos;
uint16 destinationHeight = 12;
@@ -856,7 +856,7 @@ void DMEngine::drawTittle() {
}
blitPalette[15] = D01_RGB_DARK_BLUE;
_displayMan->startEndFadeToPalette(blitPalette);
- _displayMan->fillScreen(k0_ColorBlack);
+ _displayMan->fillScreen(kDMColorBlack);
blitPalette[3] = D05_RGB_DARK_GOLD;
blitPalette[4] = D02_RGB_LIGHT_BROWN;
blitPalette[5] = D06_RGB_GOLD;
@@ -870,10 +870,10 @@ void DMEngine::drawTittle() {
for (int16 i = 0; i < 18; i++) {
delay(2);
Box box(blitCoordinates[i]);
- _displayMan->blitToBitmap(shrinkedTitle[i], _displayMan->_bitmapScreen, box, 0, 0, blitCoordinates[i][4], k160_byteWidthScreen, kM1_ColorNoTransparency, blitCoordinates[i][3] - blitCoordinates[i][2] + 1, k200_heightScreen);
+ _displayMan->blitToBitmap(shrinkedTitle[i], _displayMan->_bitmapScreen, box, 0, 0, blitCoordinates[i][4], k160_byteWidthScreen, kDMColorNoTransparency, blitCoordinates[i][3] - blitCoordinates[i][2] + 1, k200_heightScreen);
}
delay(25);
- _displayMan->blitToBitmap(masterStrikesBack, _displayMan->_bitmapScreen, boxTitleStrikesBackDestination, 0, 0, k160_byteWidthScreen, k160_byteWidthScreen, k0_ColorBlack, 57, k200_heightScreen);
+ _displayMan->blitToBitmap(masterStrikesBack, _displayMan->_bitmapScreen, boxTitleStrikesBackDestination, 0, 0, k160_byteWidthScreen, k160_byteWidthScreen, kDMColorBlack, 57, k200_heightScreen);
blitPalette[10] = D00_RGB_BLACK;
blitPalette[12] = D07_RGB_RED;
_displayMan->startEndFadeToPalette(blitPalette);
@@ -990,7 +990,7 @@ void DMEngine::fuseSequence() {
if (decodedString[1] == textFirstChar) {
_textMan->clearAllRows();
decodedString[1] = '\n'; /* New line */
- _textMan->printMessage(k15_ColorWhite, &decodedString[1]);
+ _textMan->printMessage(kDMColorWhite, &decodedString[1]);
fuseSequenceUpdate();
delay(780);
textFirstChar++;
diff --git a/engines/dm/eventman.cpp b/engines/dm/eventman.cpp
index 65aae1debf..e5b860d9c8 100644
--- a/engines/dm/eventman.cpp
+++ b/engines/dm/eventman.cpp
@@ -458,9 +458,9 @@ void EventManager::setPointerToObject(byte *bitmap) {
memset(L0051_puc_Bitmap, 0, 32 * 18);
_vm->_displayMan->blitToBitmapShrinkWithPalChange(bitmap, _mousePointerTempBuffer, 16, 16, 16, 16, palChangesMousepointerOjbectIconShadow);
- _vm->_displayMan->blitToBitmap(_mousePointerTempBuffer, L0051_puc_Bitmap, boxMousePointerObjectShadow, 0, 0, 8, 16, kM1_ColorNoTransparency, 16, 18);
+ _vm->_displayMan->blitToBitmap(_mousePointerTempBuffer, L0051_puc_Bitmap, boxMousePointerObjectShadow, 0, 0, 8, 16, kDMColorNoTransparency, 16, 18);
_vm->_displayMan->blitToBitmapShrinkWithPalChange(bitmap, _mousePointerTempBuffer, 16, 16, 16, 16, palChangesMousePointerIcon);
- _vm->_displayMan->blitToBitmap(_mousePointerTempBuffer, L0051_puc_Bitmap, boxMousePointerObject, 0, 0, 8, 16, k0_ColorBlack, 16, 18);
+ _vm->_displayMan->blitToBitmap(_mousePointerTempBuffer, L0051_puc_Bitmap, boxMousePointerObject, 0, 0, 8, 16, kDMColorBlack, 16, 18);
_preventBuildPointerScreenArea = false;
buildpointerScreenArea(_mousePos.x, _mousePos.y);
@@ -472,7 +472,7 @@ void EventManager::mouseDropChampionIcon() {
_useChampionIconOrdinalAsMousePointerBitmap = _vm->indexToOrdinal(kDMChampionNone);
_mousePointerBitmapUpdated = true;
bool useByteBoxCoordinatesBackup = _vm->_displayMan->_useByteBoxCoordinates;
- _vm->_displayMan->blitToScreen(_mousePointerOriginalColorsChampionIcon, &_vm->_championMan->_boxChampionIcons[championIconIndex << 2], 16, k12_ColorDarkestGray, 18);
+ _vm->_displayMan->blitToScreen(_mousePointerOriginalColorsChampionIcon, &_vm->_championMan->_boxChampionIcons[championIconIndex << 2], 16, kDMColorDarkestGray, 18);
_vm->_displayMan->_useByteBoxCoordinates = useByteBoxCoordinatesBackup;
_preventBuildPointerScreenArea = false;
}
@@ -862,20 +862,20 @@ void EventManager::processCommandQueue() {
if (cmdType == kDMCommandFreezeGame) {
_vm->_gameTimeTicking = false;
_vm->_menuMan->drawDisabledMenu();
- _vm->_displayMan->fillBitmap(_vm->_displayMan->_bitmapViewport, k0_ColorBlack, 112, 136);
+ _vm->_displayMan->fillBitmap(_vm->_displayMan->_bitmapViewport, kDMColorBlack, 112, 136);
switch (_vm->getGameLanguage()) { // localized
default:
case Common::EN_ANY:
- _vm->_textMan->printTextToBitmap(_vm->_displayMan->_bitmapViewport, k112_byteWidthViewport, 81, 69, k4_ColorCyan, k0_ColorBlack,
+ _vm->_textMan->printTextToBitmap(_vm->_displayMan->_bitmapViewport, k112_byteWidthViewport, 81, 69, kDMColorCyan, kDMColorBlack,
"GAME FROZEN", k136_heightViewport);
break;
case Common::DE_DEU:
- _vm->_textMan->printTextToBitmap(_vm->_displayMan->_bitmapViewport, k112_byteWidthViewport, 66, 69, k4_ColorCyan, k0_ColorBlack,
+ _vm->_textMan->printTextToBitmap(_vm->_displayMan->_bitmapViewport, k112_byteWidthViewport, 66, 69, kDMColorCyan, kDMColorBlack,
"SPIEL ANGEHALTEN", k136_heightViewport);
break;
case Common::FR_FRA:
- _vm->_textMan->printTextToBitmap(_vm->_displayMan->_bitmapViewport, k112_byteWidthViewport, 84, 69, k4_ColorCyan, k0_ColorBlack,
+ _vm->_textMan->printTextToBitmap(_vm->_displayMan->_bitmapViewport, k112_byteWidthViewport, 84, 69, kDMColorCyan, kDMColorBlack,
"JEU BLOQUE", k136_heightViewport);
break;
}
@@ -1172,7 +1172,7 @@ void EventManager::commandProcessType80ClickInDungeonView(int16 posX, int16 posY
if (_vm->_championMan->_leaderEmptyHanded) {
Junk *junkPtr = (Junk*)_vm->_dungeonMan->getSquareFirstThingData(mapX, mapY);
- if ((((Door*)junkPtr)->hasButton()) && _vm->_dungeonMan->_dungeonViewClickableBoxes[k5_ViewCellDoorButtonOrWallOrn].isPointInside(posX, posY - 33)) {
+ if ((((Door*)junkPtr)->hasButton()) && _vm->_dungeonMan->_dungeonViewClickableBoxes[kDMViewCellDoorButtonOrWallOrn].isPointInside(posX, posY - 33)) {
_vm->_stopWaitingForPlayerInput = true;
_vm->_sound->requestPlay(k01_soundSWITCH, _vm->_dungeonMan->_partyMapX, _vm->_dungeonMan->_partyMapY, kDMSoundModePlayIfPrioritized);
_vm->_moveSens->addEvent(k10_TMEventTypeDoor, mapX, mapY, kDMCellNorthWest, kDMSensorEffectToggle, _vm->_gameTime + 1);
@@ -1183,9 +1183,9 @@ void EventManager::commandProcessType80ClickInDungeonView(int16 posX, int16 posY
}
if (_vm->_championMan->_leaderEmptyHanded) {
- for (uint16 currViewCell = k0_ViewCellFronLeft; currViewCell < k5_ViewCellDoorButtonOrWallOrn + 1; currViewCell++) {
+ for (uint16 currViewCell = kDMViewCellFronLeft; currViewCell < kDMViewCellDoorButtonOrWallOrn + 1; currViewCell++) {
if (_vm->_dungeonMan->_dungeonViewClickableBoxes[currViewCell].isPointInside(posX, posY - 33)) {
- if (currViewCell == k5_ViewCellDoorButtonOrWallOrn) {
+ if (currViewCell == kDMViewCellDoorButtonOrWallOrn) {
if (!_vm->_dungeonMan->_isFacingAlcove)
commandProcessType80ClickInDungeonViewTouchFrontWall();
} else
@@ -1198,15 +1198,15 @@ void EventManager::commandProcessType80ClickInDungeonView(int16 posX, int16 posY
Thing thingHandObject = _vm->_championMan->_leaderHandObject;
Junk *junkPtr = (Junk*)_vm->_dungeonMan->getThingData(thingHandObject);
if (_vm->_dungeonMan->_squareAheadElement == kDMElementTypeWall) {
- for (uint16 currViewCell = k0_ViewCellFronLeft; currViewCell < k1_ViewCellFrontRight + 1; currViewCell++) {
+ for (uint16 currViewCell = kDMViewCellFronLeft; currViewCell < kDMViewCellFrontRight + 1; currViewCell++) {
if (boxObjectPiles[currViewCell].isPointInside(posX, posY)) {
- processType80_clickInDungeonViewDropLeaderHandObject(currViewCell);
+ clickInDungeonViewDropLeaderHandObject(currViewCell);
return;
}
}
- if (_vm->_dungeonMan->_dungeonViewClickableBoxes[k5_ViewCellDoorButtonOrWallOrn].isPointInside(posX, posY - 33)) {
+ if (_vm->_dungeonMan->_dungeonViewClickableBoxes[kDMViewCellDoorButtonOrWallOrn].isPointInside(posX, posY - 33)) {
if (_vm->_dungeonMan->_isFacingAlcove)
- processType80_clickInDungeonViewDropLeaderHandObject(k4_ViewCellAlcove);
+ clickInDungeonViewDropLeaderHandObject(kDMViewCellAlcove);
else {
if (_vm->_dungeonMan->_isFacingFountain) {
uint16 iconIdx = _vm->_objectMan->getIconIndex(thingHandObject);
@@ -1229,9 +1229,9 @@ void EventManager::commandProcessType80ClickInDungeonView(int16 posX, int16 posY
if (isLeaderHandObjThrown(posX, posY))
return;
- for (uint16 currViewCell = k0_ViewCellFronLeft; currViewCell < k3_ViewCellBackLeft + 1; currViewCell++) {
+ for (uint16 currViewCell = kDMViewCellFronLeft; currViewCell < kDMViewCellBackLeft + 1; currViewCell++) {
if (boxObjectPiles[currViewCell].isPointInside(posX, posY)) {
- processType80_clickInDungeonViewDropLeaderHandObject(currViewCell);
+ clickInDungeonViewDropLeaderHandObject(currViewCell);
return;
}
}
@@ -1260,8 +1260,8 @@ void EventManager::commandProcessCommands160To162ClickInResurrectReincarnatePane
box._x1 = championIndex * k69_ChampionStatusBoxSpacing;
box._x2 = box._x1 + 66;
dispMan._useByteBoxCoordinates = false;
- dispMan.fillScreenBox(box, k0_ColorBlack);
- dispMan.fillScreenBox(_vm->_championMan->_boxChampionIcons[champMan.getChampionIconIndex(champ->_cell, dunMan._partyDir) * 2], k0_ColorBlack);
+ dispMan.fillScreenBox(box, kDMColorBlack);
+ dispMan.fillScreenBox(_vm->_championMan->_boxChampionIcons[champMan.getChampionIconIndex(champ->_cell, dunMan._partyDir) * 2], kDMColorBlack);
_vm->_menuMan->drawEnabledMenus();
showMouse();
return;
@@ -1359,7 +1359,7 @@ void EventManager::processType80_clickInDungeonView_grabLeaderHandObject(uint16
int16 mapX = _vm->_dungeonMan->_partyMapX;
int16 mapY = _vm->_dungeonMan->_partyMapY;
- if (viewCell >= k2_ViewCellBackRight) {
+ if (viewCell >= kDMViewCellBackRight) {
mapX += _vm->_dirIntoStepCountEast[_vm->_dungeonMan->_partyDir], mapY += _vm->_dirIntoStepCountNorth[_vm->_dungeonMan->_partyDir];
Thing groupThing = _vm->_groupMan->groupGetThing(mapX, mapY);
if ((groupThing != Thing::_endOfList) &&
@@ -1378,17 +1378,17 @@ void EventManager::processType80_clickInDungeonView_grabLeaderHandObject(uint16
_vm->_stopWaitingForPlayerInput = true;
}
-void EventManager::processType80_clickInDungeonViewDropLeaderHandObject(uint16 viewCell) {
+void EventManager::clickInDungeonViewDropLeaderHandObject(uint16 viewCell) {
if (_vm->_championMan->_leaderIndex == kDMChampionNone)
return;
int16 mapX = _vm->_dungeonMan->_partyMapX;
int16 mapY = _vm->_dungeonMan->_partyMapY;
- bool droppingIntoAnAlcove = (viewCell == k4_ViewCellAlcove);
+ bool droppingIntoAnAlcove = (viewCell == kDMViewCellAlcove);
if (droppingIntoAnAlcove)
- viewCell = k2_ViewCellBackRight;
+ viewCell = kDMViewCellBackRight;
- if (viewCell > k1_ViewCellFrontRight)
+ if (viewCell > kDMViewCellFrontRight)
mapX += _vm->_dirIntoStepCountEast[_vm->_dungeonMan->_partyDir], mapY += _vm->_dirIntoStepCountNorth[_vm->_dungeonMan->_partyDir];
uint16 currCell = _vm->normalizeModulo4(_vm->_dungeonMan->_partyDir + viewCell);
@@ -1417,17 +1417,17 @@ bool EventManager::hasPendingClick(Common::Point& point, MouseButton button) {
}
void EventManager::drawSleepScreen() {
- _vm->_displayMan->fillBitmap(_vm->_displayMan->_bitmapViewport, k0_ColorBlack, 112, 136);
+ _vm->_displayMan->fillBitmap(_vm->_displayMan->_bitmapViewport, kDMColorBlack, 112, 136);
switch (_vm->getGameLanguage()) { // localized
default:
case Common::EN_ANY:
- _vm->_textMan->printTextToBitmap(_vm->_displayMan->_bitmapViewport, k112_byteWidthViewport, 93, 69, k4_ColorCyan, k0_ColorBlack, "WAKE UP", k136_heightViewport);
+ _vm->_textMan->printTextToBitmap(_vm->_displayMan->_bitmapViewport, k112_byteWidthViewport, 93, 69, kDMColorCyan, kDMColorBlack, "WAKE UP", k136_heightViewport);
break;
case Common::DE_DEU:
- _vm->_textMan->printTextToBitmap(_vm->_displayMan->_bitmapViewport, k112_byteWidthViewport, 96, 69, k4_ColorCyan, k0_ColorBlack, "WECKEN", k136_heightViewport);
+ _vm->_textMan->printTextToBitmap(_vm->_displayMan->_bitmapViewport, k112_byteWidthViewport, 96, 69, kDMColorCyan, kDMColorBlack, "WECKEN", k136_heightViewport);
break;
case Common::FR_FRA:
- _vm->_textMan->printTextToBitmap(_vm->_displayMan->_bitmapViewport, k112_byteWidthViewport, 72, 69, k4_ColorCyan, k0_ColorBlack, "REVEILLEZ-VOUS", k136_heightViewport);
+ _vm->_textMan->printTextToBitmap(_vm->_displayMan->_bitmapViewport, k112_byteWidthViewport, 72, 69, kDMColorCyan, kDMColorBlack, "REVEILLEZ-VOUS", k136_heightViewport);
break;
}
}
@@ -1479,10 +1479,10 @@ void EventManager::mouseProcessCommands125To128_clickOnChampionIcon(uint16 champ
memset(tmpBitmap, 0, 32 * 18);
Box *curChampionIconBox = &_vm->_championMan->_boxChampionIcons[champIconIndex];
- _vm->_displayMan->blitToBitmap(_vm->_displayMan->_bitmapScreen, tmpBitmap, championIconShadowBox, curChampionIconBox->_x1, curChampionIconBox->_y1, k160_byteWidthScreen, k16_byteWidth, k0_ColorBlack, 200, 18);
+ _vm->_displayMan->blitToBitmap(_vm->_displayMan->_bitmapScreen, tmpBitmap, championIconShadowBox, curChampionIconBox->_x1, curChampionIconBox->_y1, k160_byteWidthScreen, k16_byteWidth, kDMColorBlack, 200, 18);
_vm->_displayMan->blitToBitmapShrinkWithPalChange(tmpBitmap, _mousePointerOriginalColorsChampionIcon, 32, 18, 32, 18, mousePointerIconShadowBox);
- _vm->_displayMan->blitToBitmap(_vm->_displayMan->_bitmapScreen, _mousePointerOriginalColorsChampionIcon, championIconBox, curChampionIconBox->_x1, curChampionIconBox->_y1, k160_byteWidthScreen, k16_byteWidth, k0_ColorBlack, 200, 18);
- _vm->_displayMan->fillScreenBox(*curChampionIconBox, k0_ColorBlack);
+ _vm->_displayMan->blitToBitmap(_vm->_displayMan->_bitmapScreen, _mousePointerOriginalColorsChampionIcon, championIconBox, curChampionIconBox->_x1, curChampionIconBox->_y1, k160_byteWidthScreen, k16_byteWidth, kDMColorBlack, 200, 18);
+ _vm->_displayMan->fillScreenBox(*curChampionIconBox, kDMColorBlack);
_useChampionIconOrdinalAsMousePointerBitmap = _vm->indexToOrdinal(champIconIndex);
} else {
_mousePointerBitmapUpdated = true;
@@ -1499,7 +1499,7 @@ void EventManager::mouseProcessCommands125To128_clickOnChampionIcon(uint16 champ
setFlag(_vm->_championMan->_champions[championIndex]._attributes, kDMAttributeIcon);
_vm->_championMan->drawChampionState((ChampionIndex)championIndex);
} else
- _vm->_displayMan->fillScreenBox(_vm->_championMan->_boxChampionIcons[championIconIndex], k0_ColorBlack);
+ _vm->_displayMan->fillScreenBox(_vm->_championMan->_boxChampionIcons[championIconIndex], kDMColorBlack);
_vm->_championMan->_champions[championCellIndex]._cell = (ViewCell)_vm->normalizeModulo4(champIconIndex + _vm->_dungeonMan->_partyDir);
setFlag(_vm->_championMan->_champions[championCellIndex]._attributes, kDMAttributeIcon);
diff --git a/engines/dm/eventman.h b/engines/dm/eventman.h
index ac0ed7459e..7558ece938 100644
--- a/engines/dm/eventman.h
+++ b/engines/dm/eventman.h
@@ -272,7 +272,7 @@ public:
void commandProcessCommands160To162ClickInResurrectReincarnatePanel(CommandType commandType); // @ F0282_CHAMPION_ProcessCommands160To162_ClickInResurrectReincarnatePanel
void commandProcess81ClickInPanel(int16 x, int16 y); // @ F0378_COMMAND_ProcessType81_ClickInPanel
void processType80_clickInDungeonView_grabLeaderHandObject(uint16 viewCell); // @ F0373_COMMAND_ProcessType80_ClickInDungeonView_GrabLeaderHandObject
- void processType80_clickInDungeonViewDropLeaderHandObject(uint16 viewCell); // @ F0374_COMMAND_ProcessType80_ClickInDungeonView_DropLeaderHandObject
+ void clickInDungeonViewDropLeaderHandObject(uint16 viewCell); // @ F0374_COMMAND_ProcessType80_ClickInDungeonView_DropLeaderHandObject
bool hasPendingClick(Common::Point &point, MouseButton button); // @ F0360_COMMAND_ProcessPendingClick
void drawSleepScreen(); // @ F0379_COMMAND_DrawSleepScreen
diff --git a/engines/dm/gfx.cpp b/engines/dm/gfx.cpp
index 4e1c08af97..7481f6c726 100644
--- a/engines/dm/gfx.cpp
+++ b/engines/dm/gfx.cpp
@@ -41,6 +41,22 @@
#include "dm/text.h"
namespace DM {
+
+DoorFrames::DoorFrames(Frame f1, Frame f2_1, Frame f2_2, Frame f2_3,
+ Frame f3_1, Frame f3_2, Frame f3_3,
+ Frame f4_1, Frame f4_2, Frame f4_3) {
+ _closedOrDestroyed = f1;
+ _vertical[0] = f2_1;
+ _vertical[1] = f2_2;
+ _vertical[2] = f2_3;
+ _leftHorizontal[0] = f3_1;
+ _leftHorizontal[1] = f3_2;
+ _leftHorizontal[2] = f3_3;
+ _rightHorizontal[0] = f4_1;
+ _rightHorizontal[1] = f4_2;
+ _rightHorizontal[2] = f4_3;
+}
+
DisplayMan::DisplayMan(DMEngine *dmEngine) : _vm(dmEngine) {
_bitmapScreen = nullptr;
_bitmaps = nullptr;
@@ -475,7 +491,7 @@ void DisplayMan::setUpScreens(uint16 width, uint16 height) {
delete[] _tmpBitmap;
delete[] _bitmapScreen;
_bitmapScreen = new byte[_screenWidth * _screenHeight];
- fillScreen(k0_ColorBlack);
+ fillScreen(kDMColorBlack);
_tmpBitmap = new byte[_screenWidth * _screenHeight];
}
@@ -509,17 +525,17 @@ void DisplayMan::initializeGraphicData() {
_derivedBitmaps[i] = nullptr;
}
- _derivedBitmapByteCount[k0_DerivedBitmapViewport] = 112 * 136;
- _derivedBitmapByteCount[k1_DerivedBitmapThievesEyeVisibleArea] = 48 * 95;
- _derivedBitmapByteCount[k2_DerivedBitmapDamageToCreatureMedium] = 32 * 37;
- _derivedBitmapByteCount[k3_DerivedBitmapDamageToCreatureSmall] = 24 * 37;
+ _derivedBitmapByteCount[kDMDerivedBitmapViewport] = 112 * 136;
+ _derivedBitmapByteCount[kDMDerivedBitmapThievesEyeVisibleArea] = 48 * 95;
+ _derivedBitmapByteCount[kDMDerivedBitmapDamageToCreatureMedium] = 32 * 37;
+ _derivedBitmapByteCount[kDMDerivedBitmapDamageToCreatureSmall] = 24 * 37;
for (int16 doorOrnamentIndex = k15_DoorOrnDestroyedMask; doorOrnamentIndex <= k16_DoorOrnThivesEyeMask; doorOrnamentIndex++) {
_currMapDoorOrnInfo[doorOrnamentIndex].nativeIndice = doorOrnamentIndex + (k301_DoorMaskDestroyedIndice - k15_DoorOrnDestroyedMask);
_currMapDoorOrnInfo[doorOrnamentIndex].coordinateSet = 1;
- _derivedBitmapByteCount[doorOrnamentIndex * 2 + k68_DerivedBitmapFirstDoorOrnament_D3] = 24 * 41;
- _derivedBitmapByteCount[doorOrnamentIndex * 2 + k69_DerivedBitmapFirstDoorOrnament_D2] = 32 * 61;
+ _derivedBitmapByteCount[doorOrnamentIndex * 2 + kDMDerivedBitmapFirstDoorOrnamentD3] = 24 * 41;
+ _derivedBitmapByteCount[doorOrnamentIndex * 2 + kDMDerivedBitmapFirstDoorOrnamentD2] = 32 * 61;
}
_currMapFloorOrnInfo[k15_FloorOrnFootprints].nativeIndice = k241_FloorOrn_15_D3L_footprints;
@@ -528,7 +544,7 @@ void DisplayMan::initializeGraphicData() {
ObjectAspect *objectAspect = _objectAspects209;
int16 derivedBitmapIndex;
for (int16 objectAspectIndex = 0; objectAspectIndex < k85_ObjAspectCount; ++objectAspectIndex, ++objectAspect) {
- derivedBitmapIndex = k104_DerivedBitmapFirstObject + objectAspect->_firstDerivedBitmapRelativeIndex;
+ derivedBitmapIndex = kDMDerivedBitmapFirstObject + objectAspect->_firstDerivedBitmapRelativeIndex;
_derivedBitmapByteCount[derivedBitmapIndex++] = getScaledBitmapByteCount(objectAspect->_byteWidth, objectAspect->_height, k16_Scale_D3);
_derivedBitmapByteCount[derivedBitmapIndex++] = getScaledBitmapByteCount(objectAspect->_byteWidth, objectAspect->_height, k20_Scale_D2);
@@ -550,7 +566,7 @@ void DisplayMan::initializeGraphicData() {
ProjectileAspect *projectileAspect = _projectileAspect;
for (int16 projectileAspectIndex = 0; projectileAspectIndex < k14_ProjectileAspectCount; projectileAspectIndex++, projectileAspect++) {
if (!getFlag(projectileAspect->_graphicInfo, k0x0100_ProjectileScaleWithKineticEnergyMask)) {
- derivedBitmapIndex = k282_DerivedBitmapFirstProjectile + projectileAspect->_firstDerivedBitmapRelativeIndex;
+ derivedBitmapIndex = kDMDerivedBitmapFirstProjectile + projectileAspect->_firstDerivedBitmapRelativeIndex;
for (int16 projectileScaleIndex = 0; projectileScaleIndex < 6; projectileScaleIndex++) {
int16 bitmapByteCount = getScaledBitmapByteCount(projectileAspect->_byteWidth, projectileAspect->_height, _projectileScales[projectileScaleIndex]);
@@ -570,7 +586,7 @@ void DisplayMan::initializeGraphicData() {
_palChangesProjectile[1] = _palChangesFloorOrnD2;
_palChangesProjectile[2] = _palChangesProjectile[3] = _palChangesNoChanges;
- derivedBitmapIndex = k438_DerivedBitmapFirstExplosion;
+ derivedBitmapIndex = kDMDerivedBitmapFirstExplosion;
ExplosionAspect *expAsp = _explosionAspects;
for (uint16 expAspIndex = 0; expAspIndex < k4_ExplosionAspectCount; ++expAspIndex, expAsp++) {
for (int16 scale = 4; scale < 32; scale += 2)
@@ -580,7 +596,7 @@ void DisplayMan::initializeGraphicData() {
_derivedBitmapByteCount[derivedBitmapIndex++] = expAsp->_byteWidth * expAsp->_height;
}
- derivedBitmapIndex = k495_DerivedBitmapFirstCreature;
+ derivedBitmapIndex = kDMDerivedBitmapFirstCreature;
CreatureAspect *creatureAsp;
for (int16 creatureIndex = 0; creatureIndex < k27_CreatureTypeCount; creatureIndex++) {
creatureAsp = &_creatureAspects219[creatureIndex];
@@ -696,7 +712,7 @@ void DisplayMan::loadFNT1intoBitmap(uint16 index, byte * destBitmap) {
for (uint16 i = 0; i < 6; i++) {
for (uint16 w = 0; w < 128; ++w) {
- *destBitmap++ = k0_ColorBlack;
+ *destBitmap++ = kDMColorBlack;
uint16 nextByte = *data++;
for (int16 pixel = 4; pixel >= 0; --pixel) {
@@ -717,7 +733,7 @@ void DisplayMan::allocateFlippedWallBitmaps() {
void DisplayMan::drawDoorBitmap(Frame* frame) {
if (frame->_srcByteWidth) {
blitToBitmap(_tmpBitmap, _bitmapViewport, frame->_box, frame->_srcX, frame->_srcY,
- frame->_srcByteWidth, k112_byteWidthViewport, k10_ColorFlesh, frame->_srcHeight, k136_heightViewport);
+ frame->_srcByteWidth, k112_byteWidthViewport, kDMColorFlesh, frame->_srcHeight, k136_heightViewport);
}
}
@@ -725,7 +741,7 @@ void DisplayMan::drawDoorFrameBitmapFlippedHorizontally(byte *bitmap, Frame *fra
if (frame->_srcByteWidth) {
flipBitmapHorizontal(bitmap, frame->_srcByteWidth, frame->_srcHeight);
blitToBitmap(bitmap, _bitmapViewport, frame->_box, frame->_srcX, frame->_srcY,
- frame->_srcByteWidth, k112_byteWidthViewport, k10_ColorFlesh, frame->_srcHeight, k136_heightViewport);
+ frame->_srcByteWidth, k112_byteWidthViewport, kDMColorFlesh, frame->_srcHeight, k136_heightViewport);
}
}
@@ -753,12 +769,12 @@ void DisplayMan::drawDoorButton(int16 doorButtonOrdinal, DoorButton doorButton)
if (doorButton == kDMDoorButtonD1C) {
bitmap = getNativeBitmapOrGraphic(nativeBitmapIndex);
- _vm->_dungeonMan->_dungeonViewClickableBoxes[k5_ViewCellDoorButtonOrWallOrn]._x1 = coordSetRedEagle[0];
- _vm->_dungeonMan->_dungeonViewClickableBoxes[k5_ViewCellDoorButtonOrWallOrn]._x2 = coordSetRedEagle[1];
- _vm->_dungeonMan->_dungeonViewClickableBoxes[k5_ViewCellDoorButtonOrWallOrn]._y1 = coordSetRedEagle[2];
- _vm->_dungeonMan->_dungeonViewClickableBoxes[k5_ViewCellDoorButtonOrWallOrn]._y2 = coordSetRedEagle[3];
+ _vm->_dungeonMan->_dungeonViewClickableBoxes[kDMViewCellDoorButtonOrWallOrn]._x1 = coordSetRedEagle[0];
+ _vm->_dungeonMan->_dungeonViewClickableBoxes[kDMViewCellDoorButtonOrWallOrn]._x2 = coordSetRedEagle[1];
+ _vm->_dungeonMan->_dungeonViewClickableBoxes[kDMViewCellDoorButtonOrWallOrn]._y1 = coordSetRedEagle[2];
+ _vm->_dungeonMan->_dungeonViewClickableBoxes[kDMViewCellDoorButtonOrWallOrn]._y2 = coordSetRedEagle[3];
} else {
- doorButtonOrdinal = k102_DerivedBitmapFirstDoorButton + (doorButtonOrdinal * 2) + ((doorButton != kDMDoorButtonD3R) ? 0 : (int16)doorButton - 1);
+ doorButtonOrdinal = kDMDerivedBitmapFirstDoorButton + (doorButtonOrdinal * 2) + ((doorButton != kDMDoorButtonD3R) ? 0 : (int16)doorButton - 1);
if (!isDerivedBitmapInCache(doorButtonOrdinal)) {
uint16 *coordSetBlueGoat = doorButtonCoordSets[coordSet][kDMDoorButtonD1C];
byte *bitmapNative = getNativeBitmapOrGraphic(nativeBitmapIndex);
@@ -774,7 +790,7 @@ void DisplayMan::drawDoorButton(int16 doorButtonOrdinal, DoorButton doorButton)
bitmap = getDerivedBitmap(doorButtonOrdinal);
}
blitToBitmap(bitmap, _bitmapViewport, *(Box *)coordSetRedEagle, 0, 0,
- coordSetRedEagle[4], k112_byteWidthViewport, k10_ColorFlesh, coordSetRedEagle[5], k136_heightViewport);
+ coordSetRedEagle[4], k112_byteWidthViewport, kDMColorFlesh, coordSetRedEagle[5], k136_heightViewport);
}
}
@@ -788,7 +804,7 @@ void DisplayMan::viewportSetPalette(uint16* middleScreenPalette, uint16* topAndB
void DisplayMan::viewportBlitToScreen() {
Box box(0, 223, 33, 168);
- blitToBitmap(_bitmapViewport, _bitmapScreen, box, 0, 0, k112_byteWidthViewport, k160_byteWidthScreen, kM1_ColorNoTransparency,
+ blitToBitmap(_bitmapViewport, _bitmapScreen, box, 0, 0, k112_byteWidthViewport, k160_byteWidthScreen, kDMColorNoTransparency,
k136_heightViewport, k200_heightScreen);
}
@@ -924,7 +940,7 @@ byte *DisplayMan::getExplosionBitmap(uint16 explosionAspIndex, uint16 scale, int
int16 pixelWidth = getScaledDimension(explAsp->_byteWidth, scale);
int16 height = getScaledDimension(explAsp->_height, scale);
byte *bitmap;
- int16 derBitmapIndex = (explosionAspIndex * 14) + scale / 2 + k438_DerivedBitmapFirstExplosion - 2;
+ int16 derBitmapIndex = (explosionAspIndex * 14) + scale / 2 + kDMDerivedBitmapFirstExplosion - 2;
if ((scale == 32) && (explosionAspIndex != kDMExplosionAspectSmoke))
bitmap = getNativeBitmapOrGraphic(explosionAspIndex + k348_FirstExplosionGraphicIndice);
else if (isDerivedBitmapInCache(derBitmapIndex))
@@ -1073,7 +1089,7 @@ void DisplayMan::drawFloorOrnament(uint16 floorOrnOrdinal, ViewFloor viewFloorIn
bitmap = getNativeBitmapOrGraphic(nativeBitmapIndex);
blitToBitmap(bitmap, _bitmapViewport,
- *(Box *)coordSets, 0, 0, coordSets[4], k112_byteWidthViewport, k10_ColorFlesh, coordSets[5], k136_heightViewport);
+ *(Box *)coordSets, 0, 0, coordSets[4], k112_byteWidthViewport, kDMColorFlesh, coordSets[5], k136_heightViewport);
}
if (drawFootprints)
@@ -1160,7 +1176,7 @@ void DisplayMan::drawDoorOrnament(int16 doorOrnOrdinal, DoorOrnament doorOrnamen
byteWidth = k48_byteWidth;
height = 88;
} else {
- height = k68_DerivedBitmapFirstDoorOrnament_D3 + (height * 2) + doorOrnament;
+ height = kDMDerivedBitmapFirstDoorOrnamentD3 + (height * 2) + doorOrnament;
if (!isDerivedBitmapInCache(height)) {
uint16 *coordSetRedEagle = &doorOrnCoordSets[coordSetGreenToad][kDMDoorOrnamentD1LCR][0];
byte *nativeBitmap = getNativeBitmapOrGraphic(nativeBitmapIndex);
@@ -1178,7 +1194,7 @@ void DisplayMan::drawDoorOrnament(int16 doorOrnOrdinal, DoorOrnament doorOrnamen
}
Box box(coordSetOrangeElk[0], coordSetOrangeElk[1], coordSetOrangeElk[2], coordSetOrangeElk[3]);
- blitToBitmap(blitBitmap, _tmpBitmap, box, 0, 0, coordSetOrangeElk[4], byteWidth, k9_ColorGold, coordSetOrangeElk[5], height);
+ blitToBitmap(blitBitmap, _tmpBitmap, box, 0, 0, coordSetOrangeElk[4], byteWidth, kDMColorGold, coordSetOrangeElk[5], height);
}
void DisplayMan::drawCeilingPit(int16 nativeBitmapIndex, Frame *frame, int16 mapX, int16 mapY, bool flipHorizontal) {
@@ -1214,14 +1230,14 @@ void DisplayMan::drawWallSetBitmapWithoutTransparency(byte *bitmap, Frame &f) {
if (!f._srcByteWidth)
return;
- blitToBitmap(bitmap, _bitmapViewport, f._box, f._srcX, f._srcY, f._srcByteWidth, k112_byteWidthViewport, kM1_ColorNoTransparency, f._srcHeight, k136_heightViewport);
+ blitToBitmap(bitmap, _bitmapViewport, f._box, f._srcX, f._srcY, f._srcByteWidth, k112_byteWidthViewport, kDMColorNoTransparency, f._srcHeight, k136_heightViewport);
}
void DisplayMan::drawWallSetBitmap(byte *bitmap, Frame &f) {
if (!f._srcByteWidth)
return;
- blitToBitmap(bitmap, _bitmapViewport, f._box, f._srcX, f._srcY, f._srcByteWidth, k112_byteWidthViewport, k10_ColorFlesh, f._srcHeight, k136_heightViewport);
+ blitToBitmap(bitmap, _bitmapViewport, f._box, f._srcX, f._srcY, f._srcByteWidth, k112_byteWidthViewport, kDMColorFlesh, f._srcHeight, k136_heightViewport);
}
@@ -1912,24 +1928,24 @@ void DisplayMan::drawSquareD1C(Direction dir, int16 posX, int16 posY) {
_vm->_dungeonMan->_isFacingViAltar = false;
_vm->_dungeonMan->_isFacingFountain = false;
if (_vm->_championMan->_party._event73Count_ThievesEye) {
- isDerivedBitmapInCache(k1_DerivedBitmapThievesEyeVisibleArea);
- blitToBitmap(_bitmapViewport, getDerivedBitmap(k1_DerivedBitmapThievesEyeVisibleArea),
+ isDerivedBitmapInCache(kDMDerivedBitmapThievesEyeVisibleArea);
+ blitToBitmap(_bitmapViewport, getDerivedBitmap(kDMDerivedBitmapThievesEyeVisibleArea),
boxThievesEyeVisibleArea, _boxThievesEyeViewPortVisibleArea._x1, _boxThievesEyeViewPortVisibleArea._y1,
- k112_byteWidthViewport, 48, kM1_ColorNoTransparency, 136, 95);
+ k112_byteWidthViewport, 48, kDMColorNoTransparency, 136, 95);
byte *bitmap = getNativeBitmapOrGraphic(k41_holeInWall_GraphicIndice);
- blitToBitmap(bitmap, getDerivedBitmap(k1_DerivedBitmapThievesEyeVisibleArea),
- boxThievesEyeVisibleArea, 0, 0, 48, 48, k10_ColorFlesh, 95, 95);
+ blitToBitmap(bitmap, getDerivedBitmap(kDMDerivedBitmapThievesEyeVisibleArea),
+ boxThievesEyeVisibleArea, 0, 0, 48, 48, kDMColorFlesh, 95, 95);
}
drawWallSetBitmapWithoutTransparency(_bitmapWallSetD1LCR, _frameWalls163[kDMViewSquareD1C]);
if (isDrawnWallOrnAnAlcove(squareAspect[kDMSquareFrontWallOrnOrd], kDMViewWallD1CFront))
drawObjectsCreaturesProjectilesExplosions(Thing(squareAspect[kDMSquareAspectFirstGroupOrObject]), dir, posX, posY, kDMViewSquareD1C, kDMCellOrderAlcove);
if (_vm->_championMan->_party._event73Count_ThievesEye) {
- blitToBitmap(getDerivedBitmap(k1_DerivedBitmapThievesEyeVisibleArea),
+ blitToBitmap(getDerivedBitmap(kDMDerivedBitmapThievesEyeVisibleArea),
_bitmapViewport, _boxThievesEyeViewPortVisibleArea, 0, 0,
- 48, k112_byteWidthViewport, k9_ColorGold, 95, k136_heightViewport); /* BUG0_74 */
- addDerivedBitmap(k1_DerivedBitmapThievesEyeVisibleArea);
- releaseBlock(k1_DerivedBitmapThievesEyeVisibleArea | 0x8000);
+ 48, k112_byteWidthViewport, kDMColorGold, 95, k136_heightViewport); /* BUG0_74 */
+ addDerivedBitmap(kDMDerivedBitmapThievesEyeVisibleArea);
+ releaseBlock(kDMDerivedBitmapThievesEyeVisibleArea | 0x8000);
}
return;
case kDMElementTypeDoorFront:
@@ -2046,7 +2062,7 @@ void DisplayMan::drawSquareD0C(Direction dir, int16 posX, int16 posY) {
memmove(_tmpBitmap, _bitmapWallSetDoorFrameFront, 32 * 123);
blitToBitmap(getNativeBitmapOrGraphic(k41_holeInWall_GraphicIndice),
_tmpBitmap, boxThievesEyeHoleInDoorFrame, doorFrameD0C._box._x1 - _boxThievesEyeViewPortVisibleArea._x1,
- 0, 48, 16, k9_ColorGold, 95, 123);
+ 0, 48, 16, kDMColorGold, 95, 123);
drawWallSetBitmap(_tmpBitmap, doorFrameD0C);
} else
drawWallSetBitmap(_bitmapWallSetDoorFrameFront, doorFrameD0C);
@@ -2181,7 +2197,7 @@ void DisplayMan::drawDungeon(Direction dir, int16 posX, int16 posY) {
void DisplayMan::drawFloorAndCeiling() {
Box box(0, 223, 0, 36);
- fillBoxBitmap(_bitmapViewport, box, k0_ColorBlack, k112_byteWidthViewport, k136_heightViewport);
+ fillBoxBitmap(_bitmapViewport, box, kDMColorBlack, k112_byteWidthViewport, k136_heightViewport);
_drawFloorAndCeilingRequested = false;
}
@@ -2334,13 +2350,13 @@ void DisplayMan::loadCurrentMapGraphics() {
copyBitmapAndFlipHorizontal(_bitmapWallD3LCRNative = _bitmapWallSetD3LCR, _tmpBitmap,
_frameWalls163[kDMViewSquareD3C]._srcByteWidth, _frameWalls163[kDMViewSquareD3C]._srcHeight);
- fillBitmap(_bitmapWallD3LCRFlipped, k10_ColorFlesh, 64, 51);
- blitToBitmap(_tmpBitmap, _bitmapWallD3LCRFlipped, boxWallD3LCR, 11, 0, 64, 64, kM1_ColorNoTransparency, 51, 51);
+ fillBitmap(_bitmapWallD3LCRFlipped, kDMColorFlesh, 64, 51);
+ blitToBitmap(_tmpBitmap, _bitmapWallD3LCRFlipped, boxWallD3LCR, 11, 0, 64, 64, kDMColorNoTransparency, 51, 51);
copyBitmapAndFlipHorizontal(_bitmapWallD2LCRNative = _bitmapWallSetD2LCR, _tmpBitmap,
_frameWalls163[kDMViewSquareD2C]._srcByteWidth, _frameWalls163[kDMViewSquareD2C]._srcHeight);
- fillBitmap(_bitmapWallD2LCRFlipped, k10_ColorFlesh, 72, 71);
- blitToBitmap(_tmpBitmap, _bitmapWallD2LCRFlipped, boxWallD2LCR, 8, 0, 72, 72, kM1_ColorNoTransparency, 71, 71);
+ fillBitmap(_bitmapWallD2LCRFlipped, kDMColorFlesh, 72, 71);
+ blitToBitmap(_tmpBitmap, _bitmapWallD2LCRFlipped, boxWallD2LCR, 8, 0, 72, 72, kDMColorNoTransparency, 71, 71);
copyBitmapAndFlipHorizontal(_bitmapWallD1LCRNative = _bitmapWallSetD1LCR, _bitmapWallD1LCRFlipped,
_frameWalls163[kDMViewSquareD1C]._srcByteWidth, _frameWalls163[kDMViewSquareD1C]._srcHeight);
@@ -2471,14 +2487,14 @@ void DisplayMan::applyCreatureReplColors(int replacedColor, int replacementColor
void DisplayMan::drawFloorPitOrStairsBitmap(uint16 nativeIndex, Frame &f) {
if (f._srcByteWidth)
blitToBitmap(getNativeBitmapOrGraphic(nativeIndex), _bitmapViewport, f._box, f._srcX, f._srcY,
- f._srcByteWidth, k112_byteWidthViewport, k10_ColorFlesh, f._srcHeight, k136_heightViewport);
+ f._srcByteWidth, k112_byteWidthViewport, kDMColorFlesh, f._srcHeight, k136_heightViewport);
}
void DisplayMan::drawFloorPitOrStairsBitmapFlippedHorizontally(uint16 nativeIndex, Frame &f) {
if (f._srcByteWidth) {
copyBitmapAndFlipHorizontal(getNativeBitmapOrGraphic(nativeIndex), _tmpBitmap, f._srcByteWidth, f._srcHeight);
blitToBitmap(_tmpBitmap, _bitmapViewport, f._box, f._srcX, f._srcY, f._srcByteWidth,
- k112_byteWidthViewport, k10_ColorFlesh, f._srcHeight, k136_heightViewport);
+ k112_byteWidthViewport, kDMColorFlesh, f._srcHeight, k136_heightViewport);
}
}
@@ -2659,7 +2675,7 @@ bool DisplayMan::isDrawnWallOrnAnAlcove(int16 wallOrnOrd, ViewWall viewWallIndex
if (viewWallIndex >= kDMViewWallD1LRight) {
if (viewWallIndex == kDMViewWallD1CFront) {
if (isInscription) {
- blitToBitmap(_bitmapWallSetD1LCR, _bitmapViewport, boxWallPatchBehindInscription, 94, 28, _frameWalls163[kDMViewSquareD1C]._srcByteWidth, k112_byteWidthViewport, kM1_ColorNoTransparency, _frameWalls163[kDMViewSquareD1C]._srcHeight, k136_heightViewport);
+ blitToBitmap(_bitmapWallSetD1LCR, _bitmapViewport, boxWallPatchBehindInscription, 94, 28, _frameWalls163[kDMViewSquareD1C]._srcByteWidth, k112_byteWidthViewport, kDMColorNoTransparency, _frameWalls163[kDMViewSquareD1C]._srcHeight, k136_heightViewport);
byte *inscrString = inscriptionString;
byte *L0092_puc_Bitmap = getNativeBitmapOrGraphic(k120_InscriptionFont);
int16 textLineIndex = 0;
@@ -2673,7 +2689,7 @@ bool DisplayMan::isDrawnWallOrnAnAlcove(int16 wallOrnOrd, ViewWall viewWallIndex
blitFrame._box._x2 = (blitFrame._box._x1 = 112 - (characterCount << 2)) + 7;
blitFrame._box._y1 = (blitFrame._box._y2 = inscriptionLineY[textLineIndex++]) - 7;
while (characterCount--) {
- blitToBitmap(L0092_puc_Bitmap, _bitmapViewport, blitFrame._box, *inscrString++ << 3, 0, k144_byteWidth, k112_byteWidthViewport, k10_ColorFlesh, 8, k136_heightViewport);
+ blitToBitmap(L0092_puc_Bitmap, _bitmapViewport, blitFrame._box, *inscrString++ << 3, 0, k144_byteWidth, k112_byteWidthViewport, kDMColorFlesh, 8, k136_heightViewport);
blitFrame._box._x1 += 8;
blitFrame._box._x2 += 8;
}
@@ -2682,7 +2698,7 @@ bool DisplayMan::isDrawnWallOrnAnAlcove(int16 wallOrnOrd, ViewWall viewWallIndex
}
ornNativeBitmapIndex++;
Box tmpBox(ornCoordSet);
- _vm->_dungeonMan->_dungeonViewClickableBoxes[k5_ViewCellDoorButtonOrWallOrn] = tmpBox;
+ _vm->_dungeonMan->_dungeonViewClickableBoxes[kDMViewCellDoorButtonOrWallOrn] = tmpBox;
_vm->_dungeonMan->_isFacingAlcove = isAlcove;
_vm->_dungeonMan->_isFacingViAltar =
(wallOrnamentIndex == _currMapViAltarIndex);
@@ -2716,7 +2732,7 @@ bool DisplayMan::isDrawnWallOrnAnAlcove(int16 wallOrnOrd, ViewWall viewWallIndex
coordinateSetOffset = -6;
}
blitPosX = (ornCoordSet + coordinateSetOffset)[1] - (ornCoordSet + coordinateSetOffset)[0];
- if (!isDerivedBitmapInCache(wallOrnamentIndex = k4_DerivedBitmapFirstWallOrnament + (wallOrnamentIndex << 2) + wallOrnDerivedBitmapIndexIncrement[viewWallIndex])) {
+ if (!isDerivedBitmapInCache(wallOrnamentIndex = kDMDerivedBitmapFirstWallOrnament + (wallOrnamentIndex << 2) + wallOrnDerivedBitmapIndexIncrement[viewWallIndex])) {
byte *blitBitmap = getNativeBitmapOrGraphic(ornNativeBitmapIndex);
blitToBitmapShrinkWithPalChange(blitBitmap, getDerivedBitmap(wallOrnamentIndex), ornBlitBitmap[4] << 1, ornBlitBitmap[5], ornCoordSet[4] << 1, ornCoordSet[5], (viewWallIndex <= kDMViewWallD3RFront) ? _palChangesDoorButtonAndWallOrnD3 : _palChangesDoorButtonAndWallOrnD2);
addDerivedBitmap(wallOrnamentIndex);
@@ -2754,12 +2770,12 @@ bool DisplayMan::isDrawnWallOrnAnAlcove(int16 wallOrnOrd, ViewWall viewWallIndex
Box tmpBox(ornCoordSet);
blitToBitmap(ornBlitBitmap, _bitmapViewport, tmpBox,
blitPosX, 0,
- ornCoordSet[4], k112_byteWidthViewport, k10_ColorFlesh, ornCoordSet[5], k136_heightViewport);
+ ornCoordSet[4], k112_byteWidthViewport, kDMColorFlesh, ornCoordSet[5], k136_heightViewport);
if ((viewWallIndex == kDMViewWallD1CFront) && _championPortraitOrdinal--) {
blitToBitmap(getNativeBitmapOrGraphic(k26_ChampionPortraitsIndice), _bitmapViewport, boxChampionPortraitOnWall,
(_championPortraitOrdinal & 0x0007) << 5, (_championPortraitOrdinal >> 3) * 29,
- k128_byteWidth, k112_byteWidthViewport, k1_ColorDarkGary, 87, k136_heightViewport); /* A portrait is 32x29 pixels */
+ k128_byteWidth, k112_byteWidthViewport, kDMColorDarkGary, 87, k136_heightViewport); /* A portrait is 32x29 pixels */
}
return isAlcove;
@@ -2812,13 +2828,13 @@ void DisplayMan::drawField(FieldAspect* fieldAspect, Box& box) {
}
}
- isDerivedBitmapInCache(k0_DerivedBitmapViewport);
+ isDerivedBitmapInCache(kDMDerivedBitmapViewport);
byte *bitmap = getNativeBitmapOrGraphic(k73_FieldTeleporterGraphicIndice + fieldAspect->_nativeBitmapRelativeIndex);
- blitBoxFilledWithMaskedBitmap(bitmap, _bitmapViewport, bitmapMask, getDerivedBitmap(k0_DerivedBitmapViewport), box,
+ blitBoxFilledWithMaskedBitmap(bitmap, _bitmapViewport, bitmapMask, getDerivedBitmap(kDMDerivedBitmapViewport), box,
_vm->getRandomNumber(2) + fieldAspect->_baseStartUnitIndex, _vm->getRandomNumber(32), k112_byteWidthViewport,
(Color)fieldAspect->_transparentColor, fieldAspect->_xPos, 0, 136, fieldAspect->_bitplaneWordCount);
- addDerivedBitmap(k0_DerivedBitmapViewport);
- releaseBlock(k0_DerivedBitmapViewport | 0x8000);
+ addDerivedBitmap(kDMDerivedBitmapViewport);
+ releaseBlock(kDMDerivedBitmapViewport | 0x8000);
}
int16 DisplayMan::getScaledBitmapByteCount(int16 byteWidth, int16 height, int16 scale) {
@@ -3101,7 +3117,7 @@ void DisplayMan::drawObjectsCreaturesProjectilesExplosions(Thing thingParam, Dir
do {
/* Draw objects */
if (L0135_B_DrawAlcoveObjects) {
- AL_2_viewCell = k4_ViewCellAlcove; /* Index of coordinates to draw objects in alcoves */
+ AL_2_viewCell = kDMViewCellAlcove; /* Index of coordinates to draw objects in alcoves */
cellYellowBear = _vm->returnOppositeDir(directionParam); /* Alcove is on the opposite direction of the viewing direction */
objectShiftIndex = 2;
} else {
@@ -3145,11 +3161,11 @@ void DisplayMan::drawObjectsCreaturesProjectilesExplosions(Thing thingParam, Dir
T0115015_DrawProjectileAsObject:
flipHorizontal = getFlag(objectAspect->_graphicInfo, k0x0001_ObjectFlipOnRightMask) &&
!useAlcoveObjectImage &&
- ((viewLane == kDMViewLaneRight) || ((viewLane == kDMViewLaneCenter) && ((AL_2_viewCell == k1_ViewCellFrontRight) || (AL_2_viewCell == k2_ViewCellBackRight))));
+ ((viewLane == kDMViewLaneRight) || ((viewLane == kDMViewLaneCenter) && ((AL_2_viewCell == kDMViewCellFrontRight) || (AL_2_viewCell == kDMViewCellBackRight))));
/* Flip horizontally if object graphic requires it and is not being drawn in an alcove and the object is either on the right lane or on the right column of the center lane */
paddingPixelCount = 0;
- if ((viewSquareIndex == kDMViewSquareD0C) || ((viewSquareIndex >= kDMViewSquareD1C) && (AL_2_viewCell >= k2_ViewCellBackRight))) {
+ if ((viewSquareIndex == kDMViewSquareD0C) || ((viewSquareIndex >= kDMViewSquareD1C) && (AL_2_viewCell >= kDMViewCellBackRight))) {
drawingGrabbableObject = ((viewLane == kDMViewLaneCenter) && !drawProjectileAsObject); /* If object is in the center lane (only D0C or D1C with condition above) and is not a projectile */
AL_8_shiftSetIndex = k0_ShiftSet_D0BackD1Front;
bitmapRedBanana = getNativeBitmapOrGraphic(AL_4_nativeBitmapIndex); /* Use base graphic, no resizing */
@@ -3161,9 +3177,9 @@ T0115015_DrawProjectileAsObject:
}
} else {
drawingGrabbableObject = false;
- derivedBitmapIndex = k104_DerivedBitmapFirstObject + objectAspect->_firstDerivedBitmapRelativeIndex;
+ derivedBitmapIndex = kDMDerivedBitmapFirstObject + objectAspect->_firstDerivedBitmapRelativeIndex;
byte* paletteChanges;
- if ((viewSquareIndex >= kDMViewSquareD1C) || ((viewSquareIndex >= kDMViewSquareD2C) && (AL_2_viewCell >= k2_ViewCellBackRight))) {
+ if ((viewSquareIndex >= kDMViewSquareD1C) || ((viewSquareIndex >= kDMViewSquareD2C) && (AL_2_viewCell >= kDMViewCellBackRight))) {
derivedBitmapIndex++;
AL_8_shiftSetIndex = k1_ShiftSet_D1BackD2Front;
byteWidth = getScaledDimension(objectAspect->_byteWidth, k20_Scale_D2);
@@ -3240,17 +3256,17 @@ T0115015_DrawProjectileAsObject:
bitmapRedBanana = bitmapGreenAnt;
_vm->_dungeonMan->_pileTopObject[AL_2_viewCell] = thingParam; /* The object is at the top of the pile */
}
- blitToBitmap(bitmapRedBanana, _bitmapViewport, boxByteGreen, AL_4_xPos, 0, getNormalizedByteWidth(byteWidth), k112_byteWidthViewport, k10_ColorFlesh, heightRedEagle, k136_heightViewport);
+ blitToBitmap(bitmapRedBanana, _bitmapViewport, boxByteGreen, AL_4_xPos, 0, getNormalizedByteWidth(byteWidth), k112_byteWidthViewport, kDMColorFlesh, heightRedEagle, k136_heightViewport);
if (drawProjectileAsObject)
goto T0115171_BackFromT0115015_DrawProjectileAsObject;
}
} while ((thingParam = _vm->_dungeonMan->getNextThing(thingParam)) != Thing::_endOfList);
- if (AL_2_viewCell == k4_ViewCellAlcove)
+ if (AL_2_viewCell == kDMViewCellAlcove)
break; /* End of processing when drawing objects in an alcove */
if (viewSquareIndex < kDMViewSquareD3C)
break; /* End of processing if square is too far away at D4 */
/* Draw creatures */
- drawingLastBackRowCell = ((AL_2_viewCell <= k1_ViewCellFrontRight) || (cellCounter == 1)) && (!remainingViewCellOrdinalsToProcess || ((remainingViewCellOrdinalsToProcess & 0x0000000F) >= 3)); /* If (draw cell on the back row or second cell being processed) and (no more cells to draw or next cell to draw is a cell on the front row) */
+ drawingLastBackRowCell = ((AL_2_viewCell <= kDMViewCellFrontRight) || (cellCounter == 1)) && (!remainingViewCellOrdinalsToProcess || ((remainingViewCellOrdinalsToProcess & 0x0000000F) >= 3)); /* If (draw cell on the back row or second cell being processed) and (no more cells to draw or next cell to draw is a cell on the front row) */
if ((groupThing == Thing::_none) || drawCreaturesCompleted)
goto T0115129_DrawProjectiles; /* Skip code to draw creatures */
@@ -3541,7 +3557,7 @@ T0115129_DrawProjectiles:
projectileBitmapIndexDelta = 2;
if (projectileAspectTypeHasBackGraphicAndRotation) {
- flipHorizontal = (AL_2_viewCell == k0_ViewCellFronLeft) || (AL_2_viewCell == k3_ViewCellBackLeft);
+ flipHorizontal = (AL_2_viewCell == kDMViewCellFronLeft) || (AL_2_viewCell == kDMViewCellBackLeft);
if (!(flipVertical = projectileFlipVertical))
flipHorizontal = !flipHorizontal;
} else {
@@ -3554,8 +3570,8 @@ T0115129_DrawProjectiles:
else
projectileBitmapIndexDelta = 1;
- flipVertical = projectileAspectTypeHasBackGraphicAndRotation && (AL_2_viewCell < k2_ViewCellBackRight);
- flipHorizontal = getFlag(((ProjectileAspect *)objectAspect)->_graphicInfo, k0x0010_ProjectileSideMask) && !((viewLane == kDMViewLaneRight) || ((viewLane == kDMViewLaneCenter) && ((AL_2_viewCell == k1_ViewCellFrontRight) || (AL_2_viewCell == k2_ViewCellBackRight))));
+ flipVertical = projectileAspectTypeHasBackGraphicAndRotation && (AL_2_viewCell < kDMViewCellBackRight);
+ flipHorizontal = getFlag(((ProjectileAspect *)objectAspect)->_graphicInfo, k0x0010_ProjectileSideMask) && !((viewLane == kDMViewLaneRight) || ((viewLane == kDMViewLaneCenter) && ((AL_2_viewCell == kDMViewCellFrontRight) || (AL_2_viewCell == kDMViewCellBackRight))));
}
AL_4_nativeBitmapIndex += projectileBitmapIndexDelta;
@@ -3566,7 +3582,7 @@ T0115129_DrawProjectiles:
if (flipHorizontal)
paddingPixelCount = (7 - ((byteWidth - 1) & 0x0007)) << 1;
- if (doNotScaleWithKineticEnergy && isDerivedBitmapInCache(derivedBitmapIndex = k282_DerivedBitmapFirstProjectile + ((ProjectileAspect *)objectAspect)->_firstDerivedBitmapRelativeIndex + (projectileBitmapIndexDelta * 6) + AL_8_projectileScaleIndex)) {
+ if (doNotScaleWithKineticEnergy && isDerivedBitmapInCache(derivedBitmapIndex = kDMDerivedBitmapFirstProjectile + ((ProjectileAspect *)objectAspect)->_firstDerivedBitmapRelativeIndex + (projectileBitmapIndexDelta * 6) + AL_8_projectileScaleIndex)) {
bitmapRedBanana = getDerivedBitmap(derivedBitmapIndex);
} else {
bitmapGreenAnt = getNativeBitmapOrGraphic(AL_4_nativeBitmapIndex);
@@ -3605,7 +3621,7 @@ T0115129_DrawProjectiles:
} else
AL_4_xPos = MAX(paddingPixelCount, int16(byteWidth - projectilePosX - 1)); /* BUG0_06 Graphical glitch when drawing projectiles or explosions. If a projectile or explosion bitmap is cropped because it is only partly visible on the left side of the viewport (boxByteGreen.X1 = 0) and the bitmap is flipped horizontally (flipHorizontal = true) then a wrong part of the bitmap is drawn on screen. To fix this bug, "+ paddingPixelCount" must be added to the second parameter of this function call */
- blitToBitmap(bitmapRedBanana, _bitmapViewport, boxByteGreen, AL_4_xPos, 0, getNormalizedByteWidth(byteWidth), k112_byteWidthViewport, k10_ColorFlesh, heightRedEagle, k136_heightViewport);
+ blitToBitmap(bitmapRedBanana, _bitmapViewport, boxByteGreen, AL_4_xPos, 0, getNormalizedByteWidth(byteWidth), k112_byteWidthViewport, kDMColorFlesh, heightRedEagle, k136_heightViewport);
} else { /* Positive value: projectile aspect is the index of a OBJECT_ASPECT */
useAlcoveObjectImage = false;
byte projectileCoordinates[2];
@@ -3680,14 +3696,14 @@ T0115171_BackFromT0115015_DrawProjectileAsObject:;
if (AL_2_explosionSize > 3)
AL_4_explosionAspectIndex++; /* Use third graphic in the pattern for large explosion attack */
}
- isDerivedBitmapInCache(k0_DerivedBitmapViewport);
+ isDerivedBitmapInCache(kDMDerivedBitmapViewport);
bitmapRedBanana = getNativeBitmapOrGraphic(AL_4_explosionAspectIndex + k351_FirstExplosionPatternGraphicIndice);
if (smoke) {
blitToBitmapShrinkWithPalChange(bitmapRedBanana, _tmpBitmap, 48, 32, 48, 32, _palChangeSmoke);
bitmapRedBanana = _tmpBitmap;
}
- blitBoxFilledWithMaskedBitmap(bitmapRedBanana, _bitmapViewport, 0, getDerivedBitmap(k0_DerivedBitmapViewport), boxExplosionPatternD0C, _vm->getRandomNumber(4) + 87, _vm->getRandomNumber(64), k112_byteWidthViewport, Color(k0x0080_BlitDoNotUseMask | k10_ColorFlesh), 0, 0, 136, 93);
- addDerivedBitmap(k0_DerivedBitmapViewport);
+ blitBoxFilledWithMaskedBitmap(bitmapRedBanana, _bitmapViewport, 0, getDerivedBitmap(kDMDerivedBitmapViewport), boxExplosionPatternD0C, _vm->getRandomNumber(4) + 87, _vm->getRandomNumber(64), k112_byteWidthViewport, Color(k0x0080_BlitDoNotUseMask | kDMColorFlesh), 0, 0, 136, 93);
+ addDerivedBitmap(kDMDerivedBitmapViewport);
warning("DISABLED CODE: f480_releaseBlock in drawObjectsCreaturesProjectilesExplosions");
//f480_releaseBlock(k0_DerivedBitmapViewport | 0x8000);
} else {
@@ -3700,9 +3716,9 @@ T0115171_BackFromT0115015_DrawProjectileAsObject:;
explosionCoordinates = centeredExplosionCoordinates[AL_1_viewSquareExplosionIndex];
} else {
if ((AL_2_cellPurpleMan == directionParam) || (AL_2_cellPurpleMan == _vm->turnDirLeft(directionParam)))
- AL_2_viewCell = k0_ViewCellFronLeft;
+ AL_2_viewCell = kDMViewCellFronLeft;
else
- AL_2_viewCell = k1_ViewCellFrontRight;
+ AL_2_viewCell = kDMViewCellFrontRight;
explosionCoordinates = explosionCoordinatesArray[AL_1_viewSquareExplosionIndex][AL_2_viewCell];
}
@@ -3751,7 +3767,7 @@ T0115200_DrawExplosion:
if (flipVertical)
flipBitmapVertical(bitmapRedBanana, byteWidth, heightRedEagle);
- blitToBitmap(bitmapRedBanana, _bitmapViewport, boxByteGreen, AL_4_xPos, 0, byteWidth, k112_byteWidthViewport, k10_ColorFlesh, heightRedEagle, k136_heightViewport);
+ blitToBitmap(bitmapRedBanana, _bitmapViewport, boxByteGreen, AL_4_xPos, 0, byteWidth, k112_byteWidthViewport, kDMColorFlesh, heightRedEagle, k136_heightViewport);
}
}
} while ((thingParam = _vm->_dungeonMan->getNextThing(thingParam))!= Thing::_endOfList);
diff --git a/engines/dm/gfx.h b/engines/dm/gfx.h
index 4058d62101..e8cdb2927a 100644
--- a/engines/dm/gfx.h
+++ b/engines/dm/gfx.h
@@ -133,11 +133,82 @@ enum CellOrder {
kDMCellOrderBackRightBackLeftFrontRightFrontLeft = 0x4312 // @ C4312_CELL_ORDER_BACKRIGHT_BACKLEFT_FRONTRIGHT_FRONTLEFT
};
+enum DerivedBitmap {
+ kDMDerivedBitmapViewport = 0, // @ C000_DERIVED_BITMAP_VIEWPORT
+ kDMDerivedBitmapThievesEyeVisibleArea = 1, // @ C001_DERIVED_BITMAP_THIEVES_EYE_VISIBLE_AREA
+ kDMDerivedBitmapDamageToCreatureMedium = 2, // @ C002_DERIVED_BITMAP_DAMAGE_TO_CREATURE_MEDIUM
+ kDMDerivedBitmapDamageToCreatureSmall = 3, // @ C003_DERIVED_BITMAP_DAMAGE_TO_CREATURE_SMALL
+ kDMDerivedBitmapFirstWallOrnament = 4, // @ C004_DERIVED_BITMAP_FIRST_WALL_ORNAMENT
+ kDMDerivedBitmapFirstDoorOrnamentD3 = 68, // @ C068_DERIVED_BITMAP_FIRST_DOOR_ORNAMENT_D3
+ kDMDerivedBitmapFirstDoorOrnamentD2 = 69, // @ C069_DERIVED_BITMAP_FIRST_DOOR_ORNAMENT_D2
+ kDMDerivedBitmapFirstDoorButton = 102, // @ C102_DERIVED_BITMAP_FIRST_DOOR_BUTTON
+ kDMDerivedBitmapFirstObject = 104, // @ C104_DERIVED_BITMAP_FIRST_OBJECT
+ kDMDerivedBitmapFirstProjectile = 282, // @ C282_DERIVED_BITMAP_FIRST_PROJECTILE
+ kDMDerivedBitmapFirstExplosion = 438, // @ C438_DERIVED_BITMAP_FIRST_EXPLOSION
+ kDMDerivedBitmapFirstCreature = 495 // @ C495_DERIVED_BITMAP_FIRST_CREATURE
+};
+
+enum ViewSquare {
+ kDMViewSquareD4C = -3, // @ CM3_VIEW_SQUARE_D4C
+ kViewSquareD4L = -2, // @ CM2_VIEW_SQUARE_D4L
+ kDMViewSquareD4R = -1, // @ CM1_VIEW_SQUARE_D4R
+ kDMViewSquareD3C = 0, // @ C00_VIEW_SQUARE_D3C
+ kDMViewSquareD3L = 1, // @ C01_VIEW_SQUARE_D3L
+ kDMViewSquareD3R = 2, // @ C02_VIEW_SQUARE_D3R
+ kDMViewSquareD2C = 3, // @ C03_VIEW_SQUARE_D2C
+ kDMViewSquareD2L = 4, // @ C04_VIEW_SQUARE_D2L
+ kDMViewSquareD2R = 5, // @ C05_VIEW_SQUARE_D2R
+ kDMViewSquareD1C = 6, // @ C06_VIEW_SQUARE_D1C
+ kDMViewSquareD1L = 7, // @ C07_VIEW_SQUARE_D1L
+ kDMViewSquareD1R = 8, // @ C08_VIEW_SQUARE_D1R
+ kDMViewSquareD0C = 9, // @ C09_VIEW_SQUARE_D0C
+ kDMViewSquareD0L = 10, // @ C10_VIEW_SQUARE_D0L
+ kDMViewSquareD0R = 11, // @ C11_VIEW_SQUARE_D0R
+ kDMViewSquareD3CExplosion = 3, // @ C03_VIEW_SQUARE_D3C_EXPLOSION
+ kDMViewSquareD3LExplosion = 4, // @ C04_VIEW_SQUARE_D3L_EXPLOSION
+ kDMViewSquareD1CExplosion = 9, // @ C09_VIEW_SQUARE_D1C_EXPLOSION
+ kDMViewSquareD0CExplosion = 12 // @ C12_VIEW_SQUARE_D0C_EXPLOSION
+};
+
+enum ViewCell {
+ kDMViewCellFronLeft = 0, // @ C00_VIEW_CELL_FRONT_LEFT
+ kDMViewCellFrontRight = 1, // @ C01_VIEW_CELL_FRONT_RIGHT
+ kDMViewCellBackRight = 2, // @ C02_VIEW_CELL_BACK_RIGHT
+ kDMViewCellBackLeft = 3, // @ C03_VIEW_CELL_BACK_LEFT
+ kDMViewCellAlcove = 4, // @ C04_VIEW_CELL_ALCOVE
+ kDMViewCellDoorButtonOrWallOrn = 5 // @ C05_VIEW_CELL_DOOR_BUTTON_OR_WALL_ORNAMENT
+};
+
+enum Color {
+ kDMColorNoTransparency = -1,
+ kDMColorBlack = 0,
+ kDMColorDarkGary = 1,
+ kDMColorLightGray = 2,
+ kDMColorDarkBrown = 3,
+ kDMColorCyan = 4,
+ kDMColorLightBrown = 5,
+ kDMColorDarkGreen = 6,
+ kDMColorLightGreen = 7,
+ kDMColorRed = 8,
+ kDMColorGold = 9,
+ kDMColorFlesh = 10,
+ kDMColorYellow = 11,
+ kDMColorDarkestGray = 12,
+ kDMColorLightestGray = 13,
+ kDMColorBlue = 14,
+ kDMColorWhite = 15
+};
+
#define kDMMaskDoorInfoCreaturesCanSeeThrough 0x0001 // @ MASK0x0001_CREATURES_CAN_SEE_THROUGH
#define kDMMaskDoorInfoProjectilesCanPassThrough 0x0002 // @ MASK0x0002_PROJECTILES_CAN_PASS_THROUGH
#define kDMMaskDoorInfoAnimated 0x0004 // @ MASK0x0004_ANIMATED
#define kDMMaskDoorFront 0x0008 // @ MASK0x0008_DOOR_FRONT
+/* Field Aspect Mask */
+#define kMaskFieldAspectFlipMask 0x0080 // @ MASK0x0080_FLIP_MASK
+#define kMaskFieldAspectIndex 0x007F // @ MASK0x007F_MASK_INDEX
+#define kMaskFieldAspectNoMask 255 // @ C255_NO_MASK
+
#define kDMCreatureMaskAdditional 0x0003 // @ MASK0x0003_ADDITIONAL
#define kDMCreatureMaskFlipNonAttack 0x0004 // @ MASK0x0004_FLIP_NON_ATTACK
#define kDMCreatureMaskSide 0x0008 // @ MASK0x0008_SIDE
@@ -181,61 +252,6 @@ enum CellOrder {
#define k303_FirstDoorOrn 303 // @ C303_GRAPHIC_FIRST_DOOR_ORNAMENT
#define k730_DerivedBitmapMaximumCount 730 // @ C730_DERIVED_BITMAP_MAXIMUM_COUNT
-/* Field Aspect Mask */
-#define kMaskFieldAspectFlipMask 0x0080 // @ MASK0x0080_FLIP_MASK
-#define kMaskFieldAspectIndex 0x007F // @ MASK0x007F_MASK_INDEX
-#define kMaskFieldAspectNoMask 255 // @ C255_NO_MASK
-
-enum ViewSquare {
- kDMViewSquareD4C = -3, // @ CM3_VIEW_SQUARE_D4C
- kViewSquareD4L = -2, // @ CM2_VIEW_SQUARE_D4L
- kDMViewSquareD4R = -1, // @ CM1_VIEW_SQUARE_D4R
- kDMViewSquareD3C = 0, // @ C00_VIEW_SQUARE_D3C
- kDMViewSquareD3L = 1, // @ C01_VIEW_SQUARE_D3L
- kDMViewSquareD3R = 2, // @ C02_VIEW_SQUARE_D3R
- kDMViewSquareD2C = 3, // @ C03_VIEW_SQUARE_D2C
- kDMViewSquareD2L = 4, // @ C04_VIEW_SQUARE_D2L
- kDMViewSquareD2R = 5, // @ C05_VIEW_SQUARE_D2R
- kDMViewSquareD1C = 6, // @ C06_VIEW_SQUARE_D1C
- kDMViewSquareD1L = 7, // @ C07_VIEW_SQUARE_D1L
- kDMViewSquareD1R = 8, // @ C08_VIEW_SQUARE_D1R
- kDMViewSquareD0C = 9, // @ C09_VIEW_SQUARE_D0C
- kDMViewSquareD0L = 10, // @ C10_VIEW_SQUARE_D0L
- kDMViewSquareD0R = 11, // @ C11_VIEW_SQUARE_D0R
- kDMViewSquareD3CExplosion = 3, // @ C03_VIEW_SQUARE_D3C_EXPLOSION
- kDMViewSquareD3LExplosion = 4, // @ C04_VIEW_SQUARE_D3L_EXPLOSION
- kDMViewSquareD1CExplosion = 9, // @ C09_VIEW_SQUARE_D1C_EXPLOSION
- kDMViewSquareD0CExplosion = 12 // @ C12_VIEW_SQUARE_D0C_EXPLOSION
-};
-
-class ExplosionAspect {
-public:
- uint16 _byteWidth;
- uint16 _height;
-
- ExplosionAspect(uint16 byteWidth, uint16 height) :_byteWidth(byteWidth), _height(height) {}
- ExplosionAspect() : _byteWidth(0), _height(0) {}
-}; // @ EXPLOSION_ASPECT
-
-extern ExplosionAspect g211_ExplosionAspects[k4_ExplosionAspectCount]; // @ G0211_as_Graphic558_ExplosionAspects
-
-extern byte g215_ProjectileScales[7]; // @ G0215_auc_Graphic558_ProjectileScales
-
-
-#define k0_DerivedBitmapViewport 0 // @ C000_DERIVED_BITMAP_VIEWPORT
-#define k1_DerivedBitmapThievesEyeVisibleArea 1 // @ C001_DERIVED_BITMAP_THIEVES_EYE_VISIBLE_AREA
-#define k2_DerivedBitmapDamageToCreatureMedium 2 // @ C002_DERIVED_BITMAP_DAMAGE_TO_CREATURE_MEDIUM
-#define k3_DerivedBitmapDamageToCreatureSmall 3 // @ C003_DERIVED_BITMAP_DAMAGE_TO_CREATURE_SMALL
-#define k4_DerivedBitmapFirstWallOrnament 4 // @ C004_DERIVED_BITMAP_FIRST_WALL_ORNAMENT
-#define k68_DerivedBitmapFirstDoorOrnament_D3 68 // @ C068_DERIVED_BITMAP_FIRST_DOOR_ORNAMENT_D3
-#define k69_DerivedBitmapFirstDoorOrnament_D2 69 // @ C069_DERIVED_BITMAP_FIRST_DOOR_ORNAMENT_D2
-#define k102_DerivedBitmapFirstDoorButton 102 // @ C102_DERIVED_BITMAP_FIRST_DOOR_BUTTON
-#define k104_DerivedBitmapFirstObject 104 // @ C104_DERIVED_BITMAP_FIRST_OBJECT
-#define k282_DerivedBitmapFirstProjectile 282 // @ C282_DERIVED_BITMAP_FIRST_PROJECTILE
-#define k438_DerivedBitmapFirstExplosion 438 // @ C438_DERIVED_BITMAP_FIRST_EXPLOSION
-#define k495_DerivedBitmapFirstCreature 495 // @ C495_DERIVED_BITMAP_FIRST_CREATURE
-
-
#define k16_Scale_D3 16 // @ C16_SCALE_D3
#define k20_Scale_D2 20 // @ C20_SCALE_D2
@@ -264,15 +280,6 @@ extern byte g215_ProjectileScales[7]; // @ G0215_auc_Graphic558_ProjectileScales
#define k0x0080_BlitDoNotUseMask 0x0080 // @ MASK0x0080_DO_NOT_USE_MASK
#define kScaleThreshold 32768
-enum ViewCell {
- k0_ViewCellFronLeft = 0, // @ C00_VIEW_CELL_FRONT_LEFT
- k1_ViewCellFrontRight = 1, // @ C01_VIEW_CELL_FRONT_RIGHT
- k2_ViewCellBackRight = 2, // @ C02_VIEW_CELL_BACK_RIGHT
- k3_ViewCellBackLeft = 3, // @ C03_VIEW_CELL_BACK_LEFT
- k4_ViewCellAlcove = 4, // @ C04_VIEW_CELL_ALCOVE
- k5_ViewCellDoorButtonOrWallOrn = 5 // @ C05_VIEW_CELL_DOOR_BUTTON_OR_WALL_ORNAMENT
-};
-
enum GraphicIndice {
k0_dialogBoxGraphicIndice = 0, // @ C000_GRAPHIC_DIALOG_BOX
k1_titleGraphicsIndice = 1, // @ C001_GRAPHIC_TITLE
@@ -352,6 +359,14 @@ enum GraphicIndice {
k557_FontGraphicIndice = 557 // @ C557_GRAPHIC_FONT
};
+class ExplosionAspect {
+public:
+ uint16 _byteWidth;
+ uint16 _height;
+
+ ExplosionAspect(uint16 byteWidth, uint16 height) :_byteWidth(byteWidth), _height(height) {}
+ ExplosionAspect() : _byteWidth(0), _height(0) {}
+}; // @ EXPLOSION_ASPECT
// in all cases, where a function takes a Box, it expects it to contain inclusive boundaries
class Box {
@@ -392,26 +407,6 @@ public:
_srcByteWidth(srcWidth), _srcHeight(srcHeight), _srcX(srcX), _srcY(srcY) {}
};
-enum Color {
- kM1_ColorNoTransparency = -1,
- k0_ColorBlack = 0,
- k1_ColorDarkGary = 1,
- k2_ColorLightGray = 2,
- k3_ColorDarkBrown = 3,
- k4_ColorCyan = 4,
- k5_ColorLightBrown = 5,
- k6_ColorDarkGreen = 6,
- k7_ColorLightGreen = 7,
- k8_ColorRed = 8,
- k9_ColorGold = 9,
- k10_ColorFlesh = 10,
- k11_ColorYellow = 11,
- k12_ColorDarkestGray = 12,
- k13_ColorLightestGray = 13,
- k14_ColorBlue = 14,
- k15_ColorWhite = 15
-};
-
class FieldAspect {
public:
uint16 _nativeBitmapRelativeIndex;
@@ -550,18 +545,7 @@ public:
Frame _rightHorizontal[3];
DoorFrames(Frame f1, Frame f2_1, Frame f2_2, Frame f2_3,
Frame f3_1, Frame f3_2, Frame f3_3,
- Frame f4_1, Frame f4_2, Frame f4_3) {
- _closedOrDestroyed = f1;
- _vertical[0] = f2_1;
- _vertical[1] = f2_2;
- _vertical[2] = f2_3;
- _leftHorizontal[0] = f3_1;
- _leftHorizontal[1] = f3_2;
- _leftHorizontal[2] = f3_3;
- _rightHorizontal[0] = f4_1;
- _rightHorizontal[1] = f4_2;
- _rightHorizontal[2] = f4_3;
- }
+ Frame f4_1, Frame f4_2, Frame f4_3);
}; // @ DOOR_FRAMES
#define D00_RGB_BLACK 0x0000
diff --git a/engines/dm/inventory.cpp b/engines/dm/inventory.cpp
index 3fe3493172..0b07cf0d22 100644
--- a/engines/dm/inventory.cpp
+++ b/engines/dm/inventory.cpp
@@ -125,30 +125,30 @@ void InventoryMan::toggleInventory(ChampionIndex championIndex) {
_vm->_displayMan->_useByteBoxCoordinates = false;
_inventoryChampionOrdinal = _vm->indexToOrdinal(championIndex);
if (!inventoryChampionOrdinal)
- _vm->_displayMan->shadeScreenBox(&_vm->_displayMan->_boxMovementArrows, k0_ColorBlack);
+ _vm->_displayMan->shadeScreenBox(&_vm->_displayMan->_boxMovementArrows, kDMColorBlack);
Champion *champion = &_vm->_championMan->_champions[championIndex];
_vm->_displayMan->loadIntoBitmap(k17_InventoryGraphicIndice, _vm->_displayMan->_bitmapViewport);
if (_vm->_championMan->_candidateChampionOrdinal)
- _vm->_displayMan->fillBoxBitmap(_vm->_displayMan->_bitmapViewport, boxFloppyZzzCross, k12_ColorDarkestGray, k112_byteWidthViewport, k136_heightViewport);
+ _vm->_displayMan->fillBoxBitmap(_vm->_displayMan->_bitmapViewport, boxFloppyZzzCross, kDMColorDarkestGray, k112_byteWidthViewport, k136_heightViewport);
switch (_vm->getGameLanguage()) { // localized
default:
case Common::EN_ANY:
- _vm->_textMan->printToViewport(5, 116, k13_ColorLightestGray, "HEALTH");
- _vm->_textMan->printToViewport(5, 124, k13_ColorLightestGray, "STAMINA");
+ _vm->_textMan->printToViewport(5, 116, kDMColorLightestGray, "HEALTH");
+ _vm->_textMan->printToViewport(5, 124, kDMColorLightestGray, "STAMINA");
break;
case Common::DE_DEU:
- _vm->_textMan->printToViewport(5, 116, k13_ColorLightestGray, "GESUND");
- _vm->_textMan->printToViewport(5, 124, k13_ColorLightestGray, "KRAFT");
+ _vm->_textMan->printToViewport(5, 116, kDMColorLightestGray, "GESUND");
+ _vm->_textMan->printToViewport(5, 124, kDMColorLightestGray, "KRAFT");
break;
case Common::FR_FRA:
- _vm->_textMan->printToViewport(5, 116, k13_ColorLightestGray, "SANTE");
- _vm->_textMan->printToViewport(5, 124, k13_ColorLightestGray, "VIGUEUR");
+ _vm->_textMan->printToViewport(5, 116, kDMColorLightestGray, "SANTE");
+ _vm->_textMan->printToViewport(5, 124, kDMColorLightestGray, "VIGUEUR");
break;
}
- _vm->_textMan->printToViewport(5, 132, k13_ColorLightestGray, "MANA");
+ _vm->_textMan->printToViewport(5, 132, kDMColorLightestGray, "MANA");
for (uint16 i = kDMSlotReadyHand; i < kDMSlotChest1; i++)
_vm->_championMan->drawSlot(championIndex, i);
@@ -170,7 +170,7 @@ void InventoryMan::drawStatusBoxPortrait(ChampionIndex championIndex) {
box._y2 = 28;
box._x1 = championIndex * k69_ChampionStatusBoxSpacing + 7;
box._x2 = box._x1 + 31;
- dispMan.blitToScreen(_vm->_championMan->_champions[championIndex]._portrait, &box, k16_byteWidth, kM1_ColorNoTransparency, 29);
+ dispMan.blitToScreen(_vm->_championMan->_champions[championIndex]._portrait, &box, k16_byteWidth, kDMColorNoTransparency, 29);
}
void InventoryMan::drawPanelHorizontalBar(int16 x, int16 y, int16 pixelWidth, Color color) {
@@ -185,16 +185,16 @@ void InventoryMan::drawPanelHorizontalBar(int16 x, int16 y, int16 pixelWidth, Co
void InventoryMan::drawPanelFoodOrWaterBar(int16 amount, int16 y, Color color) {
if (amount < -512)
- color = k8_ColorRed;
+ color = kDMColorRed;
else if (amount < 0)
- color = k11_ColorYellow;
+ color = kDMColorYellow;
int16 pixelWidth = amount + 1024;
if (pixelWidth == 3072)
pixelWidth = 3071;
pixelWidth /= 32;
- drawPanelHorizontalBar(115, y + 2, pixelWidth, k0_ColorBlack);
+ drawPanelHorizontalBar(115, y + 2, pixelWidth, kDMColorBlack);
drawPanelHorizontalBar(113, y, pixelWidth, color);
}
@@ -206,36 +206,36 @@ void InventoryMan::drawPanelFoodWaterPoisoned() {
Champion &champ = _vm->_championMan->_champions[_inventoryChampionOrdinal];
closeChest();
DisplayMan &dispMan = *_vm->_displayMan;
- dispMan.blitToViewport(_vm->_displayMan->getNativeBitmapOrGraphic(k20_PanelEmptyIndice), _boxPanel, k72_byteWidth, k8_ColorRed, 73);
+ dispMan.blitToViewport(_vm->_displayMan->getNativeBitmapOrGraphic(k20_PanelEmptyIndice), _boxPanel, k72_byteWidth, kDMColorRed, 73);
switch (_vm->getGameLanguage()) { // localized
default:
case Common::EN_ANY:
- dispMan.blitToViewport(_vm->_displayMan->getNativeBitmapOrGraphic(k30_FoodLabelIndice), boxFood, k24_byteWidth, k12_ColorDarkestGray, 9);
- dispMan.blitToViewport(_vm->_displayMan->getNativeBitmapOrGraphic(k31_WaterLabelIndice), boxWater, k24_byteWidth, k12_ColorDarkestGray, 9);
+ dispMan.blitToViewport(_vm->_displayMan->getNativeBitmapOrGraphic(k30_FoodLabelIndice), boxFood, k24_byteWidth, kDMColorDarkestGray, 9);
+ dispMan.blitToViewport(_vm->_displayMan->getNativeBitmapOrGraphic(k31_WaterLabelIndice), boxWater, k24_byteWidth, kDMColorDarkestGray, 9);
break;
case Common::DE_DEU:
- dispMan.blitToViewport(_vm->_displayMan->getNativeBitmapOrGraphic(k30_FoodLabelIndice), boxFood, k32_byteWidth, k12_ColorDarkestGray, 9);
- dispMan.blitToViewport(_vm->_displayMan->getNativeBitmapOrGraphic(k31_WaterLabelIndice), boxWater, k32_byteWidth, k12_ColorDarkestGray, 9);
+ dispMan.blitToViewport(_vm->_displayMan->getNativeBitmapOrGraphic(k30_FoodLabelIndice), boxFood, k32_byteWidth, kDMColorDarkestGray, 9);
+ dispMan.blitToViewport(_vm->_displayMan->getNativeBitmapOrGraphic(k31_WaterLabelIndice), boxWater, k32_byteWidth, kDMColorDarkestGray, 9);
break;
case Common::FR_FRA:
- dispMan.blitToViewport(_vm->_displayMan->getNativeBitmapOrGraphic(k30_FoodLabelIndice), boxFood, k48_byteWidth, k12_ColorDarkestGray, 9);
- dispMan.blitToViewport(_vm->_displayMan->getNativeBitmapOrGraphic(k31_WaterLabelIndice), boxWater, k24_byteWidth, k12_ColorDarkestGray, 9);
+ dispMan.blitToViewport(_vm->_displayMan->getNativeBitmapOrGraphic(k30_FoodLabelIndice), boxFood, k48_byteWidth, kDMColorDarkestGray, 9);
+ dispMan.blitToViewport(_vm->_displayMan->getNativeBitmapOrGraphic(k31_WaterLabelIndice), boxWater, k24_byteWidth, kDMColorDarkestGray, 9);
break;
}
if (champ._poisonEventCount)
dispMan.blitToViewport(_vm->_displayMan->getNativeBitmapOrGraphic(k32_PoisionedLabelIndice),
- boxPoisoned, k48_byteWidth, k12_ColorDarkestGray, 15);
+ boxPoisoned, k48_byteWidth, kDMColorDarkestGray, 15);
- drawPanelFoodOrWaterBar(champ._food, 69, k5_ColorLightBrown);
- drawPanelFoodOrWaterBar(champ._water, 92, k14_ColorBlue);
+ drawPanelFoodOrWaterBar(champ._food, 69, kDMColorLightBrown);
+ drawPanelFoodOrWaterBar(champ._water, 92, kDMColorBlue);
}
void InventoryMan::drawPanelResurrectReincarnate() {
_panelContent = k5_PanelContentResurrectReincarnate;
_vm->_displayMan->blitToViewport(_vm->_displayMan->getNativeBitmapOrGraphic(k40_PanelResurectReincaranteIndice),
- _boxPanel, k72_byteWidth, k6_ColorDarkGreen, 73);
+ _boxPanel, k72_byteWidth, kDMColorDarkGreen, 73);
}
void InventoryMan::drawPanel() {
@@ -302,7 +302,7 @@ void InventoryMan::drawPanelScrollTextLine(int16 yPos, char *text) {
else if (*iter >= '{') // this branch is CHANGE5_03_IMPROVEMENT
*iter -= 96;
}
- _vm->_textMan->printToViewport(162 - (6 * strlen(text) / 2), yPos, k0_ColorBlack, text, k15_ColorWhite);
+ _vm->_textMan->printToViewport(162 - (6 * strlen(text) / 2), yPos, kDMColorBlack, text, kDMColorWhite);
}
void InventoryMan::drawPanelScroll(Scroll *scroll) {
@@ -316,7 +316,7 @@ void InventoryMan::drawPanelScroll(Scroll *scroll) {
*charRed = '\0';
dispMan.blitToViewport(_vm->_displayMan->getNativeBitmapOrGraphic(k23_PanelOpenScrollIndice),
- _boxPanel, k72_byteWidth, k8_ColorRed, 73);
+ _boxPanel, k72_byteWidth, kDMColorRed, 73);
int16 lineCount = 1;
charRed++;
char *charGreen = charRed; // first char of the second line
@@ -368,7 +368,7 @@ void InventoryMan::openAndDrawChest(Thing thingToOpen, Container *chest, bool is
objMan.drawIconInSlotBox(k9_SlotBoxInventoryActionHand, kDMIconIndiceContainerChestOpen);
}
dispMan.blitToViewport(_vm->_displayMan->getNativeBitmapOrGraphic(k25_PanelOpenChestIndice),
- _boxPanel, k72_byteWidth, k8_ColorRed, 73);
+ _boxPanel, k72_byteWidth, kDMColorRed, 73);
int16 chestSlotIndex = 0;
Thing thing = chest->getSlot();
int16 thingCount = 0;
@@ -391,7 +391,7 @@ void InventoryMan::drawIconToViewport(IconIndice iconIndex, int16 xPos, int16 yP
Box boxIcon(xPos, xPos + 15, yPos, yPos + 15);
_vm->_objectMan->extractIconFromBitmap(iconIndex, iconBitmap);
- _vm->_displayMan->blitToViewport(iconBitmap, boxIcon, k8_byteWidth, kM1_ColorNoTransparency, 16);
+ _vm->_displayMan->blitToViewport(iconBitmap, boxIcon, k8_byteWidth, kDMColorNoTransparency, 16);
}
void InventoryMan::buildObjectAttributeString(int16 potentialAttribMask, int16 actualAttribMask, const char **attribStrings, char *destString, const char *prefixString, const char *suffixString) {
@@ -454,7 +454,7 @@ void InventoryMan::drawPanelObjectDescriptionString(const char *descString) {
severalLines = true;
}
- _vm->_textMan->printToViewport(_objDescTextXpos, _objDescTextYpos, k13_ColorLightestGray, stringLine);
+ _vm->_textMan->printToViewport(_objDescTextXpos, _objDescTextYpos, kDMColorLightestGray, stringLine);
_objDescTextYpos += 7;
if (severalLines) {
severalLines = false;
@@ -471,7 +471,7 @@ void InventoryMan::drawPanelArrowOrEye(bool pressingEye) {
DisplayMan &dispMan = *_vm->_displayMan;
dispMan.blitToViewport(_vm->_displayMan->getNativeBitmapOrGraphic(pressingEye ? k19_EyeForObjectDescriptionIndice : k18_ArrowForChestContentIndice),
- boxArrowOrEye, k8_byteWidth, k8_ColorRed, 9);
+ boxArrowOrEye, k8_byteWidth, kDMColorRed, 9);
}
void InventoryMan::drawPanelObject(Thing thingToDraw, bool pressingEye) {
@@ -496,9 +496,9 @@ void InventoryMan::drawPanelObject(Thing thingToDraw, bool pressingEye) {
else {
IconIndice iconIndex = objMan.getIconIndex(thingToDraw);
dispMan.blitToViewport(_vm->_displayMan->getNativeBitmapOrGraphic(k20_PanelEmptyIndice),
- _boxPanel, k72_byteWidth, k8_ColorRed, 73);
+ _boxPanel, k72_byteWidth, kDMColorRed, 73);
dispMan.blitToViewport(_vm->_displayMan->getNativeBitmapOrGraphic(k29_ObjectDescCircleIndice),
- boxObjectDescCircle, k16_byteWidth, k12_ColorDarkestGray, 27);
+ boxObjectDescCircle, k16_byteWidth, kDMColorDarkestGray, 27);
Common::String descString;
Common::String str;
@@ -525,7 +525,7 @@ void InventoryMan::drawPanelObject(Thing thingToDraw, bool pressingEye) {
descString = objMan._objectNames[iconIndex];
}
- textMan.printToViewport(134, 68, k13_ColorLightestGray, descString.c_str());
+ textMan.printToViewport(134, 68, kDMColorLightestGray, descString.c_str());
drawIconToViewport(iconIndex, 111, 59);
@@ -801,7 +801,7 @@ void InventoryMan::drawChampionSkillsAndStatistics() {
closeChest();
uint16 championIndex = _vm->ordinalToIndex(_inventoryChampionOrdinal);
Champion *curChampion = &_vm->_championMan->_champions[championIndex];
- _vm->_displayMan->blitToViewport(_vm->_displayMan->getNativeBitmapOrGraphic(k20_PanelEmptyIndice), _boxPanel, k72_byteWidth, k8_ColorRed, 73);
+ _vm->_displayMan->blitToViewport(_vm->_displayMan->getNativeBitmapOrGraphic(k20_PanelEmptyIndice), _boxPanel, k72_byteWidth, kDMColorRed, 73);
int16 textPosY = 58;
for (uint16 idx = kDMSkillFighter; idx <= kDMSkillWizard; idx++) {
int16 skillLevel = MIN((uint16)16, _vm->_championMan->getSkillLevel(championIndex, idx | kDMIgnoreTemporaryExperience));
@@ -819,25 +819,25 @@ void InventoryMan::drawChampionSkillsAndStatistics() {
displayString = Common::String::format("%s %s", _skillLevelNames[skillLevel - 2], _vm->_championMan->_baseSkillName[idx]);
break;
}
- _vm->_textMan->printToViewport(108, textPosY, k13_ColorLightestGray, displayString.c_str());
+ _vm->_textMan->printToViewport(108, textPosY, kDMColorLightestGray, displayString.c_str());
textPosY += 7;
}
textPosY = 86;
for (uint16 idx = kDMStatStrength; idx <= kDMStatAntifire; idx++) {
- _vm->_textMan->printToViewport(108, textPosY, k13_ColorLightestGray, statisticNames[idx]);
+ _vm->_textMan->printToViewport(108, textPosY, kDMColorLightestGray, statisticNames[idx]);
int16 statisticCurrentValue = curChampion->_statistics[idx][kDMStatCurrent];
uint16 statisticMaximumValue = curChampion->_statistics[idx][kDMStatMaximum];
int16 statisticColor;
if (statisticCurrentValue < statisticMaximumValue)
- statisticColor = k8_ColorRed;
+ statisticColor = kDMColorRed;
else if (statisticCurrentValue > statisticMaximumValue)
- statisticColor = k7_ColorLightGreen;
+ statisticColor = kDMColorLightGreen;
else
- statisticColor = k13_ColorLightestGray;
+ statisticColor = kDMColorLightestGray;
_vm->_textMan->printToViewport(174, textPosY, (Color)statisticColor, _vm->_championMan->getStringFromInteger(statisticCurrentValue, true, 3).c_str());
Common::String displayString = "/" + _vm->_championMan->getStringFromInteger(statisticMaximumValue, true, 3);
- _vm->_textMan->printToViewport(192, textPosY, k13_ColorLightestGray, displayString.c_str());
+ _vm->_textMan->printToViewport(192, textPosY, kDMColorLightestGray, displayString.c_str());
textPosY += 7;
}
}
diff --git a/engines/dm/loadsave.cpp b/engines/dm/loadsave.cpp
index a0b1190ae2..fe7c6f11cb 100644
--- a/engines/dm/loadsave.cpp
+++ b/engines/dm/loadsave.cpp
@@ -133,7 +133,7 @@ LoadgameResult DMEngine::loadgame(int16 slot) {
if (fadePalette) {
_displayMan->startEndFadeToPalette(_displayMan->_blankBuffer);
delay(1);
- _displayMan->fillScreen(k0_ColorBlack);
+ _displayMan->fillScreen(kDMColorBlack);
_displayMan->startEndFadeToPalette(_displayMan->_paletteTopAndBottomScreen);
}
} else {
diff --git a/engines/dm/menus.cpp b/engines/dm/menus.cpp
index faf61393ce..4481c0451c 100644
--- a/engines/dm/menus.cpp
+++ b/engines/dm/menus.cpp
@@ -168,7 +168,7 @@ MenuMan::~MenuMan() {
void MenuMan::drawMovementArrows() {
_vm->_eventMan->showMouse();
_vm->_displayMan->blitToScreen(_vm->_displayMan->getNativeBitmapOrGraphic(k13_MovementArrowsIndice),
- &_vm->_displayMan->_boxMovementArrows, k48_byteWidth, kM1_ColorNoTransparency, 45);
+ &_vm->_displayMan->_boxMovementArrows, k48_byteWidth, kDMColorNoTransparency, 45);
_vm->_eventMan->hideMouse();
}
void MenuMan::clearActingChampion() {
@@ -197,7 +197,7 @@ void MenuMan::drawActionIcon(ChampionIndex championIndex) {
box._y2 = 120;
dm._useByteBoxCoordinates = false;
if (!champion._currHealth) {
- dm.fillScreenBox(box, k0_ColorBlack);
+ dm.fillScreenBox(box, kDMColorBlack);
return;
}
byte *bitmapIcon = dm._tmpBitmap;
@@ -208,21 +208,21 @@ void MenuMan::drawActionIcon(ChampionIndex championIndex) {
} else if (_vm->_dungeonMan->_objectInfos[_vm->_dungeonMan->getObjectInfoIndex(thing)]._actionSetIndex) {
iconIndex = _vm->_objectMan->getIconIndex(thing);
} else {
- dm.fillBitmap(bitmapIcon, k4_ColorCyan, 16, 16);
+ dm.fillBitmap(bitmapIcon, kDMColorCyan, 16, 16);
goto T0386006;
}
_vm->_objectMan->extractIconFromBitmap(iconIndex, bitmapIcon);
dm.blitToBitmapShrinkWithPalChange(bitmapIcon, bitmapIcon, 16, 16, 16, 16, palChangesActionAreaObjectIcon);
T0386006:
- dm.fillScreenBox(box, k4_ColorCyan);
+ dm.fillScreenBox(box, kDMColorCyan);
Box box2;
box2._x1 = box._x1 + 2;
box2._x2 = box._x2 - 2;
box2._y1 = 95;
box2._y2 = 110;
- dm.blitToScreen(bitmapIcon, &box2, k8_byteWidth, kM1_ColorNoTransparency, 16);
+ dm.blitToScreen(bitmapIcon, &box2, k8_byteWidth, kDMColorNoTransparency, 16);
if (champion.getAttributes(kDMAttributeDisableAction) || _vm->_championMan->_candidateChampionOrdinal || _vm->_championMan->_partyIsSleeping) {
- _vm->_displayMan->shadeScreenBox(&box, k0_ColorBlack);
+ _vm->_displayMan->shadeScreenBox(&box, kDMColorBlack);
}
}
@@ -235,10 +235,10 @@ void MenuMan::drawDisabledMenu() {
_vm->_inventoryMan->closeChest();
}
} else {
- _vm->_displayMan->shadeScreenBox(&_vm->_displayMan->_boxMovementArrows, k0_ColorBlack);
+ _vm->_displayMan->shadeScreenBox(&_vm->_displayMan->_boxMovementArrows, kDMColorBlack);
}
- _vm->_displayMan->shadeScreenBox(&_boxSpellArea, k0_ColorBlack);
- _vm->_displayMan->shadeScreenBox(&_boxActionArea, k0_ColorBlack);
+ _vm->_displayMan->shadeScreenBox(&_boxSpellArea, kDMColorBlack);
+ _vm->_displayMan->shadeScreenBox(&_boxActionArea, kDMColorBlack);
_vm->_eventMan->setMousePointerToNormal(k0_pointerArrow);
}
}
@@ -305,7 +305,7 @@ void MenuMan::drawActionArea() {
_vm->_eventMan->hideMouse();
dispMan._useByteBoxCoordinates = false;
- dispMan.fillScreenBox(_boxActionArea, k0_ColorBlack);
+ dispMan.fillScreenBox(_boxActionArea, kDMColorBlack);
if (_actionAreaContainsIcons) {
for (uint16 champIndex = kDMChampionFirst; champIndex < champMan._partyChampionCount; ++champIndex)
drawActionIcon((ChampionIndex)champIndex);
@@ -316,12 +316,12 @@ void MenuMan::drawActionArea() {
if (_actionList._actionIndices[1] == kDMActionNone)
box = _boxActionArea1ActionMenu;
dispMan.blitToScreen(_vm->_displayMan->getNativeBitmapOrGraphic(k10_MenuActionAreaIndice),
- &box, k48_byteWidth, kM1_ColorNoTransparency, 45);
+ &box, k48_byteWidth, kDMColorNoTransparency, 45);
textMan.printWithTrailingSpaces(dispMan._bitmapScreen, k160_byteWidthScreen,
- 235, 83, k0_ColorBlack, k4_ColorCyan, champMan._champions[_vm->ordinalToIndex(champMan._actingChampionOrdinal)]._name,
+ 235, 83, kDMColorBlack, kDMColorCyan, champMan._champions[_vm->ordinalToIndex(champMan._actingChampionOrdinal)]._name,
k7_ChampionNameMaximumLength, k200_heightScreen);
for (uint16 actionListIndex = 0; actionListIndex < 3; actionListIndex++) {
- textMan.printWithTrailingSpaces(dispMan._bitmapScreen, k160_byteWidthScreen, 241, 93 + actionListIndex * 12, k4_ColorCyan, k0_ColorBlack,
+ textMan.printWithTrailingSpaces(dispMan._bitmapScreen, k160_byteWidthScreen, 241, 93 + actionListIndex * 12, kDMColorCyan, kDMColorBlack,
getActionName(_actionList._actionIndices[actionListIndex]),
k12_ActionNameMaximumLength, k200_heightScreen);
}
@@ -355,12 +355,12 @@ void MenuMan::drawSpellAreaControls(ChampionIndex champIndex) {
int16 champHP2 = _vm->_championMan->_champions[2]._currHealth;
int16 champHP3 = _vm->_championMan->_champions[3]._currHealth;
_vm->_eventMan->showMouse();
- _vm->_displayMan->fillScreenBox(boxSpellAreaControls, k0_ColorBlack);
+ _vm->_displayMan->fillScreenBox(boxSpellAreaControls, kDMColorBlack);
switch (champIndex) {
case 0:
_vm->_eventMan->highlightScreenBox(233, 277, 42, 49);
- _vm->_textMan->printToLogicalScreen(235, 48, k0_ColorBlack, k4_ColorCyan, champ->_name);
+ _vm->_textMan->printToLogicalScreen(235, 48, kDMColorBlack, kDMColorCyan, champ->_name);
if (_vm->_championMan->_partyChampionCount > 1) {
if (champHP1)
_vm->_eventMan->highlightScreenBox(280, 291, 42, 48);
@@ -379,7 +379,7 @@ void MenuMan::drawSpellAreaControls(ChampionIndex champIndex) {
_vm->_eventMan->highlightScreenBox(233, 244, 42, 48);
_vm->_eventMan->highlightScreenBox(247, 291, 42, 49);
- _vm->_textMan->printToLogicalScreen(249, 48, k0_ColorBlack, k4_ColorCyan, champ->_name);
+ _vm->_textMan->printToLogicalScreen(249, 48, kDMColorBlack, kDMColorCyan, champ->_name);
if (_vm->_championMan->_partyChampionCount > 2) {
if (champHP2)
_vm->_eventMan->highlightScreenBox(294, 305, 42, 48);
@@ -396,7 +396,7 @@ void MenuMan::drawSpellAreaControls(ChampionIndex champIndex) {
_vm->_eventMan->highlightScreenBox(247, 258, 42, 48);
_vm->_eventMan->highlightScreenBox(261, 305, 42, 49);
- _vm->_textMan->printToLogicalScreen(263, 48, k0_ColorBlack, k4_ColorCyan, champ->_name);
+ _vm->_textMan->printToLogicalScreen(263, 48, kDMColorBlack, kDMColorCyan, champ->_name);
if ((_vm->_championMan->_partyChampionCount > 3) && champHP3)
_vm->_eventMan->highlightScreenBox(308, 319, 42, 48);
break;
@@ -412,7 +412,7 @@ void MenuMan::drawSpellAreaControls(ChampionIndex champIndex) {
_vm->_eventMan->highlightScreenBox(261, 272, 42, 48);
_vm->_eventMan->highlightScreenBox(275, 319, 42, 49);
- _vm->_textMan->printToLogicalScreen(277, 48, k0_ColorBlack, k4_ColorCyan, champ->_name);
+ _vm->_textMan->printToLogicalScreen(277, 48, kDMColorBlack, kDMColorCyan, champ->_name);
break;
default:
break;
@@ -427,23 +427,23 @@ void MenuMan::buildSpellAreaLine(int16 spellAreaBitmapLine) {
Champion *magicChampion = &_vm->_championMan->_champions[_vm->_championMan->_magicCasterChampionIndex];
if (spellAreaBitmapLine == k2_SpellAreaAvailableSymbols) {
_vm->_displayMan->_useByteBoxCoordinates = false;
- _vm->_displayMan->blitToBitmap(_bitmapSpellAreaLines, _bitmapSpellAreaLine, boxSpellAreaLine, 0, 12, k48_byteWidth, k48_byteWidth, kM1_ColorNoTransparency, 36, 12);
+ _vm->_displayMan->blitToBitmap(_bitmapSpellAreaLines, _bitmapSpellAreaLine, boxSpellAreaLine, 0, 12, k48_byteWidth, k48_byteWidth, kDMColorNoTransparency, 36, 12);
int16 x = 1;
char character = 96 + (6 * magicChampion->_symbolStep);
for (uint16 symbolIndex = 0; symbolIndex < 6; symbolIndex++) {
spellSymbolString[0] = character++;
x += 14;
- _vm->_textMan->printTextToBitmap(_bitmapSpellAreaLine, 48, x, 8, k4_ColorCyan, k0_ColorBlack, spellSymbolString, 12);
+ _vm->_textMan->printTextToBitmap(_bitmapSpellAreaLine, 48, x, 8, kDMColorCyan, kDMColorBlack, spellSymbolString, 12);
}
} else if (spellAreaBitmapLine == k3_SpellAreaChampionSymbols) {
_vm->_displayMan->_useByteBoxCoordinates = false;
- _vm->_displayMan->blitToBitmap(_bitmapSpellAreaLines, _bitmapSpellAreaLine, boxSpellAreaLine, 0, 24, k48_byteWidth, k48_byteWidth, kM1_ColorNoTransparency, 36, 12);
+ _vm->_displayMan->blitToBitmap(_bitmapSpellAreaLines, _bitmapSpellAreaLine, boxSpellAreaLine, 0, 24, k48_byteWidth, k48_byteWidth, kDMColorNoTransparency, 36, 12);
int16 x = 8;
for (uint16 symbolIndex = 0; symbolIndex < 4; symbolIndex++) {
if ((spellSymbolString[0] = magicChampion->_symbols[symbolIndex]) == '\0')
break;
x += 9;
- _vm->_textMan->printTextToBitmap(_bitmapSpellAreaLine, 48, x, 8, k4_ColorCyan, k0_ColorBlack, spellSymbolString, 12);
+ _vm->_textMan->printTextToBitmap(_bitmapSpellAreaLine, 48, x, 8, kDMColorCyan, kDMColorBlack, spellSymbolString, 12);
}
}
}
@@ -458,14 +458,14 @@ void MenuMan::setMagicCasterAndDrawSpellArea(ChampionIndex champIndex) {
if (_vm->_championMan->_magicCasterChampionIndex == kDMChampionNone) {
_vm->_eventMan->showMouse();
- _vm->_displayMan->blitToScreen(_vm->_displayMan->getNativeBitmapOrGraphic(k9_MenuSpellAreaBackground), &_boxSpellArea, k48_byteWidth, kM1_ColorNoTransparency, 33);
+ _vm->_displayMan->blitToScreen(_vm->_displayMan->getNativeBitmapOrGraphic(k9_MenuSpellAreaBackground), &_boxSpellArea, k48_byteWidth, kDMColorNoTransparency, 33);
_vm->_eventMan->hideMouse();
}
if (champIndex == kDMChampionNone) {
_vm->_championMan->_magicCasterChampionIndex = kDMChampionNone;
_vm->_eventMan->showMouse();
_vm->_displayMan->_useByteBoxCoordinates = false;
- _vm->_displayMan->fillScreenBox(_boxSpellArea, k0_ColorBlack);
+ _vm->_displayMan->fillScreenBox(_boxSpellArea, kDMColorBlack);
_vm->_eventMan->hideMouse();
return;
}
@@ -473,9 +473,9 @@ void MenuMan::setMagicCasterAndDrawSpellArea(ChampionIndex champIndex) {
buildSpellAreaLine(k2_SpellAreaAvailableSymbols);
_vm->_eventMan->showMouse();
drawSpellAreaControls(champIndex);
- _vm->_displayMan->blitToScreen(_bitmapSpellAreaLine, &boxSpellAreaLine2, k48_byteWidth, kM1_ColorNoTransparency, 12);
+ _vm->_displayMan->blitToScreen(_bitmapSpellAreaLine, &boxSpellAreaLine2, k48_byteWidth, kDMColorNoTransparency, 12);
buildSpellAreaLine(k3_SpellAreaChampionSymbols);
- _vm->_displayMan->blitToScreen(_bitmapSpellAreaLine, &boxSpellAreaLine3, k48_byteWidth, kM1_ColorNoTransparency, 12);
+ _vm->_displayMan->blitToScreen(_bitmapSpellAreaLine, &boxSpellAreaLine3, k48_byteWidth, kDMColorNoTransparency, 12);
_vm->_eventMan->hideMouse();
}
@@ -762,7 +762,7 @@ void MenuMan::menusPrintSpellFailureMessage(Champion *champ, uint16 failureType,
skillIndex = (skillIndex - 4) / 4;
_vm->_textMan->printLineFeed();
- _vm->_textMan->printMessage(k4_ColorCyan, champ->_name);
+ _vm->_textMan->printMessage(kDMColorCyan, champ->_name);
Common::String *messages;
switch (_vm->getGameLanguage()) { // localized
@@ -780,8 +780,8 @@ void MenuMan::menusPrintSpellFailureMessage(Champion *champ, uint16 failureType,
Common::String message;
switch (failureType) {
case kDMFailureNeedsMorePractice:
- _vm->_textMan->printMessage(k4_ColorCyan, messages[0].c_str());
- _vm->_textMan->printMessage(k4_ColorCyan, _vm->_championMan->_baseSkillName[skillIndex]);
+ _vm->_textMan->printMessage(kDMColorCyan, messages[0].c_str());
+ _vm->_textMan->printMessage(kDMColorCyan, _vm->_championMan->_baseSkillName[skillIndex]);
if (_vm->getGameLanguage() != Common::FR_FRA || skillIndex == kDMSkillWizard)
message = messages[1];
else
@@ -797,7 +797,7 @@ void MenuMan::menusPrintSpellFailureMessage(Champion *champ, uint16 failureType,
default:
break;
}
- _vm->_textMan->printMessage(k4_ColorCyan, message.c_str());
+ _vm->_textMan->printMessage(kDMColorCyan, message.c_str());
}
Potion *MenuMan::getEmptyFlaskInHand(Champion *champ, Thing *potionThing) {
@@ -865,7 +865,7 @@ void MenuMan::drawAvailableSymbols(uint16 symbolStep) {
for (uint16 L1214_ui_Counter = 0; L1214_ui_Counter < 6; L1214_ui_Counter++) {
displayBuffer[0] = curCharacter++;
textPosX += 14;
- _vm->_textMan->printToLogicalScreen(textPosX, 58, k4_ColorCyan, k0_ColorBlack, displayBuffer);
+ _vm->_textMan->printToLogicalScreen(textPosX, 58, kDMColorCyan, kDMColorBlack, displayBuffer);
}
}
@@ -882,7 +882,7 @@ void MenuMan::drawChampionSymbols(Champion *champ) {
displayBuffer[0] = champ->_symbols[symbolIndex];
textPosX += 9;
- _vm->_textMan->printToLogicalScreen(textPosX, 70, k4_ColorCyan, k0_ColorBlack, displayBuffer);
+ _vm->_textMan->printToLogicalScreen(textPosX, 70, kDMColorCyan, kDMColorBlack, displayBuffer);
}
}
@@ -1491,9 +1491,9 @@ bool MenuMan::isMeleeActionPerformed(int16 champIndex, Champion *champ, int16 ac
if (targetCreatureOrdinal) {
uint16 viewCell = _vm->normalizeModulo4(championCell + 4 - champ->_dir);
switch (viewCell) {
- case k2_ViewCellBackRight: /* Champion is on the back right of the square and tries to attack a creature in the front right of its square */
- case k3_ViewCellBackLeft: /* Champion is on the back left of the square and tries to attack a creature in the front left of its square */
- uint16 cellDelta = (viewCell == k2_ViewCellBackRight) ? 3 : 1;
+ case kDMViewCellBackRight: /* Champion is on the back right of the square and tries to attack a creature in the front right of its square */
+ case kDMViewCellBackLeft: /* Champion is on the back left of the square and tries to attack a creature in the front left of its square */
+ uint16 cellDelta = (viewCell == kDMViewCellBackRight) ? 3 : 1;
/* Check if there is another champion in front */
if (_vm->_championMan->getIndexInCell(_vm->normalizeModulo4(championCell + cellDelta)) != kDMChampionNone) {
_actionDamage = kM1_damageCantReach;
@@ -1593,7 +1593,7 @@ void MenuMan::printMessageAfterReplacements(const char *str) {
*curCharacter = '\0';
if (outputString[1]) /* If the string is not empty (the first character is a new line \n) */
- _vm->_textMan->printMessage(k4_ColorCyan, outputString);
+ _vm->_textMan->printMessage(kDMColorCyan, outputString);
}
void MenuMan::processCommands116To119_setActingChampion(uint16 champIndex) {
@@ -1718,7 +1718,7 @@ void MenuMan::drawActionDamage(int16 damage) {
_vm->_eventMan->showMouse();
_vm->_displayMan->_useByteBoxCoordinates = false;
- _vm->_displayMan->fillScreenBox(_boxActionArea, k0_ColorBlack);
+ _vm->_displayMan->fillScreenBox(_boxActionArea, kDMColorBlack);
if (damage < 0) {
static const char *messagesEN[2] = {"CAN'T REACH", "NEED AMMO"};
static const char *messagesDE[2] = {"ZU WEIT WEG", "MEHR MUNITION"};
@@ -1752,7 +1752,7 @@ void MenuMan::drawActionDamage(int16 damage) {
textPosX = pos[1];
displayString = message[1];
}
- _vm->_textMan->printToLogicalScreen(textPosX, 100, k4_ColorCyan, k0_ColorBlack, displayString);
+ _vm->_textMan->printToLogicalScreen(textPosX, 100, kDMColorCyan, kDMColorBlack, displayString);
} else {
int16 byteWidth;
byte *blitBitmap;
@@ -1767,12 +1767,12 @@ void MenuMan::drawActionDamage(int16 damage) {
uint16 derivedBitmapIndex;
int16 destPixelWidth;
if (damage > 15) {
- derivedBitmapIndex = k2_DerivedBitmapDamageToCreatureMedium;
+ derivedBitmapIndex = kDMDerivedBitmapDamageToCreatureMedium;
destPixelWidth = 64;
byteWidth = k32_byteWidth;
blitBox = &actionAreaMediumDamage;
} else {
- derivedBitmapIndex = k3_DerivedBitmapDamageToCreatureSmall;
+ derivedBitmapIndex = kDMDerivedBitmapDamageToCreatureSmall;
destPixelWidth = 42;
byteWidth = k24_byteWidth;
blitBox = &actionAreaSmallDamage;
@@ -1787,7 +1787,7 @@ void MenuMan::drawActionDamage(int16 damage) {
blitBitmap = _vm->_displayMan->getDerivedBitmap(derivedBitmapIndex);
}
}
- _vm->_displayMan->blitToScreen(blitBitmap, blitBox, byteWidth, kM1_ColorNoTransparency, displayHeight);
+ _vm->_displayMan->blitToScreen(blitBitmap, blitBox, byteWidth, kDMColorNoTransparency, displayHeight);
/* Convert damage value to string */
uint16 charIndex = 5;
int16 textPosX = 274;
@@ -1797,7 +1797,7 @@ void MenuMan::drawActionDamage(int16 damage) {
scoreString[--charIndex] = '0' + (damage % 10);
textPosX -= 3;
} while (damage /= 10);
- _vm->_textMan->printToLogicalScreen(textPosX, 100, k4_ColorCyan, k0_ColorBlack, &scoreString[charIndex]);
+ _vm->_textMan->printToLogicalScreen(textPosX, 100, kDMColorCyan, kDMColorBlack, &scoreString[charIndex]);
}
_vm->_eventMan->hideMouse();
}
diff --git a/engines/dm/movesens.cpp b/engines/dm/movesens.cpp
index 37ae1382aa..0e9ded4671 100644
--- a/engines/dm/movesens.cpp
+++ b/engines/dm/movesens.cpp
@@ -724,7 +724,7 @@ void MovesensMan::processThingAdditionOrRemoval(uint16 mapX, uint16 mapY, Thing
squareContainsGroup = true;
else if ((curThingType == kDMstringTypeText) && (thingType == kDMThingTypeParty) && addThing && !partySquare) {
_vm->_dungeonMan->decodeText(_vm->_stringBuildBuffer, curThing, kDMTextTypeMessage);
- _vm->_textMan->printMessage(k15_ColorWhite, _vm->_stringBuildBuffer);
+ _vm->_textMan->printMessage(kDMColorWhite, _vm->_stringBuildBuffer);
} else if ((curThingType > kDMThingTypeGroup) && (curThingType < kDMThingTypeProjectile)) {
squareContainsObject = true;
squareContainsThingOfSameType |= (_vm->_objectMan->getObjectType(curThing) == objectType);
diff --git a/engines/dm/objectman.cpp b/engines/dm/objectman.cpp
index ffab2392c3..76b40d52e8 100644
--- a/engines/dm/objectman.cpp
+++ b/engines/dm/objectman.cpp
@@ -195,7 +195,7 @@ void ObjectMan::extractIconFromBitmap(uint16 iconIndex, byte *destBitmap) {
iconIndex -= _iconGraphicFirstIndex[counter];
_vm->_displayMan->_useByteBoxCoordinates = true;
Box blitBox(0, 15, 0, 15);
- _vm->_displayMan->blitToBitmap(iconBitmap, destBitmap, blitBox, (iconIndex & 0x000F) << 4, iconIndex & 0x0FF0, 128, 8, kM1_ColorNoTransparency, _iconGraphicHeight[counter], 16);
+ _vm->_displayMan->blitToBitmap(iconBitmap, destBitmap, blitBox, (iconIndex & 0x000F) << 4, iconIndex & 0x0FF0, 128, 8, kDMColorNoTransparency, _iconGraphicHeight[counter], 16);
}
void ObjectMan::drawIconInSlotBox(uint16 slotBoxIndex, int16 iconIndex) {
@@ -231,7 +231,7 @@ void ObjectMan::drawIconInSlotBox(uint16 slotBoxIndex, int16 iconIndex) {
destHeight = 200;
}
_vm->_displayMan->_useByteBoxCoordinates = false;
- _vm->_displayMan->blitToBitmap(iconBitmap, blitDestination, blitBox, (iconIndex & 0x000F) << 4, iconIndex & 0x0FF0, k128_byteWidth, byteWidth, kM1_ColorNoTransparency, _iconGraphicHeight[iconGraphicIndex], destHeight);
+ _vm->_displayMan->blitToBitmap(iconBitmap, blitDestination, blitBox, (iconIndex & 0x000F) << 4, iconIndex & 0x0FF0, k128_byteWidth, byteWidth, kDMColorNoTransparency, _iconGraphicHeight[iconGraphicIndex], destHeight);
}
void ObjectMan::drawLeaderObjectName(Thing thing) {
@@ -257,7 +257,7 @@ void ObjectMan::drawLeaderObjectName(Thing thing) {
} else
objectName = Common::String(_objectNames[iconIndex]);
- _vm->_textMan->printWithTrailingSpaces(_vm->_displayMan->_bitmapScreen, k160_byteWidthScreen, 233, 37, k4_ColorCyan, k0_ColorBlack, objectName.c_str(), k14_ObjectNameMaximumLength, k200_heightScreen);
+ _vm->_textMan->printWithTrailingSpaces(_vm->_displayMan->_bitmapScreen, k160_byteWidthScreen, 233, 37, kDMColorCyan, kDMColorBlack, objectName.c_str(), k14_ObjectNameMaximumLength, k200_heightScreen);
}
IconIndice ObjectMan::getIconIndexInSlotBox(uint16 slotBoxIndex) {
@@ -266,13 +266,13 @@ IconIndice ObjectMan::getIconIndexInSlotBox(uint16 slotBoxIndex) {
void ObjectMan::clearLeaderObjectName() {
static Box boxLeaderHandObjectName(233, 319, 33, 38); // @ G0028_s_Graphic562_Box_LeaderHandObjectName
- _vm->_displayMan->fillScreenBox(boxLeaderHandObjectName, k0_ColorBlack);
+ _vm->_displayMan->fillScreenBox(boxLeaderHandObjectName, kDMColorBlack);
}
void ObjectMan::drawIconToScreen(int16 iconIndex, int16 posX, int16 posY) {
static byte iconBitmap[16 * 16];
Box blitBox(posX, posX + 15, posY, posY + 15);
extractIconFromBitmap(iconIndex, iconBitmap);
- _vm->_displayMan->blitToScreen(iconBitmap, &blitBox, k8_byteWidth, kM1_ColorNoTransparency, 16);
+ _vm->_displayMan->blitToScreen(iconBitmap, &blitBox, k8_byteWidth, kDMColorNoTransparency, 16);
}
}
diff --git a/engines/dm/text.cpp b/engines/dm/text.cpp
index dcf7e27a8e..65b83caf15 100644
--- a/engines/dm/text.cpp
+++ b/engines/dm/text.cpp
@@ -79,7 +79,7 @@ void TextMan::printTextToBitmap(byte *destBitmap, uint16 destByteWidth, int16 de
uint16 srcX = (1 + 5) * *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->blitToBitmap(srcBitmap, destBitmap, box, (nextX == destX) ? (srcX + 1) : srcX, 0, 6 * 128 / 2, destByteWidth, kM1_ColorNoTransparency,
+ _vm->_displayMan->blitToBitmap(srcBitmap, destBitmap, box, (nextX == destX) ? (srcX + 1) : srcX, 0, 6 * 128 / 2, destByteWidth, kDMColorNoTransparency,
k6_LetterHeight, destHeight);
nextX += k5_LetterWidth + 1;
@@ -103,7 +103,7 @@ void TextMan::printWithTrailingSpaces(byte *destBitmap, int16 destByteWidth, int
}
void TextMan::printLineFeed() {
- printMessage(k0_ColorBlack, "\n");
+ printMessage(kDMColorBlack, "\n");
}
void TextMan::printMessage(Color color, const char *string, bool printWithScroll) {
@@ -141,7 +141,7 @@ void TextMan::printMessage(Color color, const char *string, bool printWithScroll
void TextMan::createNewRow() {
if (_messageAreaCursorRow == 3) {
isTextScrolling(&_textScroller, true);
- memset(_bitmapMessageAreaNewRow, k0_ColorBlack, 320 * 7);
+ memset(_bitmapMessageAreaNewRow, kDMColorBlack, 320 * 7);
_isScrolling = true;
setScrollerCommand(&_textScroller, 1);
@@ -156,9 +156,9 @@ void TextMan::createNewRow() {
void TextMan::printString(Color color, const char* string) {
int16 stringLength = strlen(string);
if (isTextScrolling(&_textScroller, false))
- printToLogicalScreen(_messageAreaCursorColumn * 6, (_messageAreaCursorRow * 7 - 1) + 177, color, k0_ColorBlack, string);
+ printToLogicalScreen(_messageAreaCursorColumn * 6, (_messageAreaCursorRow * 7 - 1) + 177, color, kDMColorBlack, string);
else {
- printTextToBitmap(_bitmapMessageAreaNewRow, k160_byteWidthScreen, _messageAreaCursorColumn * 6, 0, color, k0_ColorBlack, string, 7);
+ printTextToBitmap(_bitmapMessageAreaNewRow, k160_byteWidthScreen, _messageAreaCursorColumn * 6, 0, color, kDMColorBlack, string, 7);
_isScrolling = true;
if (isTextScrolling(&_textScroller, false))
setScrollerCommand(&_textScroller, 1);
@@ -200,7 +200,7 @@ void TextMan::clearExpiredRows() {
continue;
displayBox._y2 = (displayBox._y1 = 172 + (rowIndex * 7)) + 6;
isTextScrolling(&_textScroller, true);
- _vm->_displayMan->fillBoxBitmap(_vm->_displayMan->_bitmapScreen, displayBox, k0_ColorBlack, k160_byteWidthScreen, k200_heightScreen);
+ _vm->_displayMan->fillBoxBitmap(_vm->_displayMan->_bitmapScreen, displayBox, kDMColorBlack, k160_byteWidthScreen, k200_heightScreen);
_messageAreaRowExpirationTime[rowIndex] = -1;
}
}
@@ -217,14 +217,14 @@ void TextMan::printEndGameString(int16 x, int16 y, Color textColor, const char*
wrkStringPtr++;
*wrkStringPtr = *text++;
}
- printToLogicalScreen(x, y, textColor, k12_ColorDarkestGray, modifiedString);
+ printToLogicalScreen(x, y, textColor, kDMColorDarkestGray, modifiedString);
}
void TextMan::clearAllRows() {
isTextScrolling(&_textScroller, true);
Box tmpBox(0, 319, 169, 199);
- _vm->_displayMan->fillScreenBox(tmpBox, k0_ColorBlack);
+ _vm->_displayMan->fillScreenBox(tmpBox, kDMColorBlack);
_messageAreaCursorRow = 3;
_messageAreaCursorColumn = 0;
diff --git a/engines/dm/text.h b/engines/dm/text.h
index ab40925447..94a1266235 100644
--- a/engines/dm/text.h
+++ b/engines/dm/text.h
@@ -60,7 +60,7 @@ public:
void printTextToBitmap(byte *destBitmap, uint16 destByteWidth, int16 destX, int16 destY,
Color textColor, Color bgColor, const char *text, uint16 destHeight); // @ F0040_TEXT_Print
void printToLogicalScreen(uint16 destX, uint16 destY, Color textColor, Color bgColor, const char *text); // @ F0053_TEXT_PrintToLogicalScreen
- void printToViewport(int16 posX, int16 posY, Color textColor, const char *text, Color bgColor = k12_ColorDarkestGray); // @ F0052_TEXT_PrintToViewport
+ void printToViewport(int16 posX, int16 posY, Color textColor, const char *text, Color bgColor = kDMColorDarkestGray); // @ F0052_TEXT_PrintToViewport
void printWithTrailingSpaces(byte *destBitmap, int16 destByteWidth, int16 destX, int16 destY, Color textColor, Color bgColor,
const char *text, int16 strLenght, int16 destHeight); // @ F0041_TEXT_PrintWithTrailingSpaces
void printLineFeed(); // @ F0051_TEXT_MESSAGEAREA_PrintLineFeed
diff --git a/engines/dm/timeline.cpp b/engines/dm/timeline.cpp
index e0b6484f27..a922a8f331 100644
--- a/engines/dm/timeline.cpp
+++ b/engines/dm/timeline.cpp
@@ -719,7 +719,7 @@ void Timeline::processEventSquareCorridor(TimelineEvent *event) {
if (!textCurrentlyVisible && textString->isVisible() && (_vm->_dungeonMan->_currMapIndex == _vm->_dungeonMan->_partyMapIndex) && (mapX == _vm->_dungeonMan->_partyMapX) && (mapY == _vm->_dungeonMan->_partyMapY)) {
_vm->_dungeonMan->decodeText(_vm->_stringBuildBuffer, curThing, kDMTextTypeMessage);
- _vm->_textMan->printMessage(k15_ColorWhite, _vm->_stringBuildBuffer);
+ _vm->_textMan->printMessage(kDMColorWhite, _vm->_stringBuildBuffer);
}
} else if (curThingType == kDMThingTypeSensor) {
Sensor *curSensor = (Sensor *)_vm->_dungeonMan->getThingData(curThing);