aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--engines/dm/champion.cpp82
-rw-r--r--engines/dm/champion.h2
-rw-r--r--engines/dm/dm.cpp10
-rw-r--r--engines/dm/dungeonman.cpp32
-rw-r--r--engines/dm/dungeonman.h2
-rw-r--r--engines/dm/eventman.cpp18
-rw-r--r--engines/dm/gfx.cpp823
-rw-r--r--engines/dm/gfx.h507
-rw-r--r--engines/dm/inventory.cpp62
-rw-r--r--engines/dm/menus.cpp58
-rw-r--r--engines/dm/objectman.cpp16
-rw-r--r--engines/dm/text.cpp6
-rw-r--r--engines/dm/text.h2
13 files changed, 819 insertions, 801 deletions
diff --git a/engines/dm/champion.cpp b/engines/dm/champion.cpp
index 730eaa2985..fb2515bd63 100644
--- a/engines/dm/champion.cpp
+++ b/engines/dm/champion.cpp
@@ -118,10 +118,10 @@ int16 ChampionMan::getDecodedValue(char *string, uint16 characterCount) {
void ChampionMan::drawHealthOrStaminaOrManaValue(int16 posY, int16 currVal, int16 maxVal) {
Common::String tmp = getStringFromInteger(currVal, true, 3).c_str();
- _vm->_textMan->printToViewport(55, posY, kColorLightestGray, tmp.c_str());
- _vm->_textMan->printToViewport(73, posY, kColorLightestGray, "/");
+ _vm->_textMan->printToViewport(55, posY, k13_ColorLightestGray, tmp.c_str());
+ _vm->_textMan->printToViewport(73, posY, k13_ColorLightestGray, "/");
tmp = getStringFromInteger(maxVal, true, 3);
- _vm->_textMan->printToViewport(79, posY, kColorLightestGray, tmp.c_str());
+ _vm->_textMan->printToViewport(79, posY, k13_ColorLightestGray, tmp.c_str());
}
uint16 ChampionMan::handSlotIndex(uint16 slotBoxIndex) {
@@ -458,18 +458,18 @@ void ChampionMan::addCandidateChampionToParty(uint16 championPortraitIndex) {
uint16 prevChampCount = _partyChampionCount;
Champion *champ = &_champions[prevChampCount];
champ->resetToZero();
- dispMan._useByteBoxCoordinates = true;
+ dispMan._g578_useByteBoxCoordinates = true;
{ // limit destBox scope
Box &destBox = gBoxChampionPortrait;
- dispMan.blitToBitmap(dispMan.getBitmap(kChampionPortraitsIndice), 256, getChampionPortraitX(championPortraitIndex), getChampionPortraitY(championPortraitIndex),
- champ->_portrait, 32, destBox._x1, destBox._x2, destBox._y1, destBox._y2, kColorNoTransparency);
+ dispMan.blitToBitmap(dispMan.getBitmap(k26_ChampionPortraitsIndice), 256, getChampionPortraitX(championPortraitIndex), getChampionPortraitY(championPortraitIndex),
+ champ->_portrait, 32, destBox._x1, destBox._x2, destBox._y1, destBox._y2, k255_ColorNoTransparency);
}
champ->_actionIndex = kChampionActionNone;
champ->_enableActionEventIndex = -1;
champ->_hideDamageReceivedIndex = -1;
champ->_dir = dunMan._currMap._partyDir;
- ViewCell AL_0_viewCell = kViewCellFronLeft;
+ ViewCell AL_0_viewCell = k0_ViewCellFronLeft;
while (getIndexInCell((ViewCell)((AL_0_viewCell + dunMan._currMap._partyDir) & 3)) != kChampionNone)
AL_0_viewCell = (ViewCell)(AL_0_viewCell + 1);
champ->_cell = (ViewCell)((AL_0_viewCell + dunMan._currMap._partyDir) & 3);
@@ -732,26 +732,26 @@ void ChampionMan::drawChampionState(ChampionIndex champIndex) {
return;
}
bool isInventoryChamp = (_vm->indexToOrdinal(champIndex) == invMan._inventoryChampionOrdinal);
- dispMan._useByteBoxCoordinates = false;
+ dispMan._g578_useByteBoxCoordinates = false;
if (champAttributes & kChampionAttributeStatusBox) {
box._y1 = 0;
box._y2 = 28 + 1;
box._x1 = champStatusBoxX;
box._x2 = box._x1 + 66 + 1;
if (champ->_currHealth) {
- dispMan.clearScreenBox(kColorDarkestGray, box);
+ dispMan.clearScreenBox(k12_ColorDarkestGray, box);
int16 nativeBitmapIndices[3];
for (int16 i = 0; i < 3; ++i)
nativeBitmapIndices[i] = 0;
int16 AL_0_borderCount = 0;
if (_party._fireShieldDefense > 0)
- nativeBitmapIndices[AL_0_borderCount++] = kBorderPartyFireshieldIndice;
+ nativeBitmapIndices[AL_0_borderCount++] = k38_BorderPartyFireshieldIndice;
if (_party._spellShieldDefense > 0)
- nativeBitmapIndices[AL_0_borderCount++] = kBorderPartySpellshieldIndice;
+ nativeBitmapIndices[AL_0_borderCount++] = k39_BorderPartySpellshieldIndice;
if (_party._shieldDefense > 0)
- nativeBitmapIndices[AL_0_borderCount++] = kBorderPartyShieldIndice;
+ nativeBitmapIndices[AL_0_borderCount++] = k37_BorderPartyShieldIndice;
while (AL_0_borderCount--) {
- dispMan.blitToScreen(dispMan.getBitmap(nativeBitmapIndices[AL_0_borderCount]), 80, 0, 0, box, kColorFlesh);
+ dispMan.blitToScreen(dispMan.getBitmap(nativeBitmapIndices[AL_0_borderCount]), 80, 0, 0, box, k10_ColorFlesh);
}
if (isInventoryChamp) {
invMan.drawStatusBoxPortrait(champIndex);
@@ -760,8 +760,8 @@ void ChampionMan::drawChampionState(ChampionIndex champIndex) {
champAttributes |= (kChampionAttributeNameTitle | kChampionAttributeStatistics | kChampionAttributeWounds | kChampionAttributeActionHand);
}
} else {
- dispMan.blitToScreen(dispMan.getBitmap(kStatusBoxDeadChampion), 80, 0, 0, box, kColorNoTransparency);
- _vm->_textMan->printTextToScreen(champStatusBoxX + 1, 5, kColorLightestGray, kColorDarkGary, champ->_name);
+ dispMan.blitToScreen(dispMan.getBitmap(k8_StatusBoxDeadChampion), 80, 0, 0, box, k255_ColorNoTransparency);
+ _vm->_textMan->printTextToScreen(champStatusBoxX + 1, 5, k13_ColorLightestGray, k1_ColorDarkGary, champ->_name);
menuMan.drawActionIcon(champIndex);
goto T0292042_green;
}
@@ -771,7 +771,7 @@ void ChampionMan::drawChampionState(ChampionIndex champIndex) {
goto T0292042_green;
if (champAttributes & kChampionAttributeNameTitle) {
- Color AL_0_colorIndex = (champIndex == _leaderIndex) ? kColorGold : kColorLightestGray; // unused because of missing functions
+ Color AL_0_colorIndex = (champIndex == _leaderIndex) ? k9_ColorGold : k13_ColorLightestGray; // unused because of missing functions
if (isInventoryChamp) {
char *champName = champ->_name;
_vm->_textMan->printToViewport(3, 7, AL_0_colorIndex, champName);
@@ -787,8 +787,8 @@ void ChampionMan::drawChampionState(ChampionIndex champIndex) {
box._y2 = 6 + 1;
box._x1 = champStatusBoxX;
box._x2 = box._x1 + 42 + 1;
- dispMan.clearScreenBox(kColorDarkGary, box);
- _vm->_textMan->printTextToScreen(champStatusBoxX + 1, 5, AL_0_colorIndex, kColorDarkGary, champ->_name);
+ dispMan.clearScreenBox(k1_ColorDarkGary, box);
+ _vm->_textMan->printTextToScreen(champStatusBoxX + 1, 5, AL_0_colorIndex, k1_ColorDarkGary, champ->_name);
}
}
@@ -798,20 +798,20 @@ void ChampionMan::drawChampionState(ChampionIndex champIndex) {
drawHealthStaminaManaValues(champ);
int16 AL_2_nativeBitmapIndex;
if ((champ->_food < 0) || (champ->_water < 0) || (champ->_poisonEventCount)) {
- AL_2_nativeBitmapIndex = kSlotBoxWoundedIndice;
+ AL_2_nativeBitmapIndex = k34_SlotBoxWoundedIndice;
} else {
- AL_2_nativeBitmapIndex = kSlotBoxNormalIndice;
+ AL_2_nativeBitmapIndex = k33_SlotBoxNormalIndice;
}
- dispMan.blitToScreen(dispMan.getBitmap(AL_2_nativeBitmapIndex), 32, 0, 0, gBoxMouth, kColorDarkestGray, gDungeonViewport);
- AL_2_nativeBitmapIndex = kSlotBoxNormalIndice;
+ dispMan.blitToScreen(dispMan.getBitmap(AL_2_nativeBitmapIndex), 32, 0, 0, gBoxMouth, k12_ColorDarkestGray, gDungeonViewport);
+ AL_2_nativeBitmapIndex = k33_SlotBoxNormalIndice;
for (int16 AL_0_statisticIndex = kChampionStatStrength; AL_0_statisticIndex <= kChampionStatAntifire; AL_0_statisticIndex++) {
if (champ->getStatistic((ChampionStatisticType)AL_0_statisticIndex, kChampionStatCurrent)
< champ->getStatistic((ChampionStatisticType)AL_0_statisticIndex, kChampionStatMaximum)) {
- AL_2_nativeBitmapIndex = kSlotBoxWoundedIndice;
+ AL_2_nativeBitmapIndex = k34_SlotBoxWoundedIndice;
break;
}
}
- dispMan.blitToScreen(dispMan.getBitmap(AL_2_nativeBitmapIndex), 32, 0, 0, gBoxEye, kColorDarkestGray, gDungeonViewport);
+ dispMan.blitToScreen(dispMan.getBitmap(AL_2_nativeBitmapIndex), 32, 0, 0, gBoxEye, k12_ColorDarkestGray, gDungeonViewport);
champAttributes |= kChampionAttributeViewport;
}
}
@@ -829,11 +829,11 @@ void ChampionMan::drawChampionState(ChampionIndex champIndex) {
Color loadColor;
int16 champMaxLoad = getMaximumLoad(champ);
if (champ->_load > champMaxLoad) {
- loadColor = kColorRed;
+ loadColor = k8_ColorRed;
} else if (((int32)champ->_load) * 8 > ((int32)champMaxLoad) * 5) {
- loadColor = kColorYellow;
+ loadColor = k11_ColorYellow;
} else {
- loadColor = kColorLightestGray;
+ loadColor = k13_ColorLightestGray;
}
_vm->_textMan->printToViewport(104, 132, loadColor, "LOAD ");
@@ -852,10 +852,10 @@ void ChampionMan::drawChampionState(ChampionIndex champIndex) {
{ // block so goto won't skip AL_0_championIconIndex initialization
int16 AL_0_championIconIndex = championIconIndex(champ->_cell, _vm->_dungeonMan->_currMap._partyDir);
- if ((champAttributes & kChampionIcons) && (eventMan._useChampionIconOrdinalAsMousePointerBitmap != _vm->indexToOrdinal(AL_0_championIconIndex))) {
+ if ((champAttributes & k28_ChampionIcons) && (eventMan._useChampionIconOrdinalAsMousePointerBitmap != _vm->indexToOrdinal(AL_0_championIconIndex))) {
dispMan.clearScreenBox(gChampionColor[champIndex], gBoxChampionIcons[AL_0_championIconIndex]);
- dispMan.blitToScreen(dispMan.getBitmap(kChampionIcons), 80, championIconIndex(champ->_dir, _vm->_dungeonMan->_currMap._partyDir) * 19, 0,
- gBoxChampionIcons[AL_0_championIconIndex], kColorDarkestGray);
+ dispMan.blitToScreen(dispMan.getBitmap(k28_ChampionIcons), 80, championIconIndex(champ->_dir, _vm->_dungeonMan->_currMap._partyDir) * 19, 0,
+ gBoxChampionIcons[AL_0_championIconIndex], k12_ColorDarkestGray);
}
}
@@ -942,9 +942,9 @@ void ChampionMan::drawSlot(uint16 champIndex, ChampionSlot slotIndex) {
iconIndex = kIconIndiceReadyHand + (slotIndex << 1);
if (champ->getWoundsFlag((ChampionWound)(1 << slotIndex))) {
iconIndex++;
- nativeBitmapIndex = kSlotBoxWoundedIndice;
+ nativeBitmapIndex = k34_SlotBoxWoundedIndice;
} else {
- nativeBitmapIndex = kSlotBoxNormalIndice;
+ nativeBitmapIndex = k33_SlotBoxNormalIndice;
}
} else {
if ((slotIndex >= kChampionSlotNeck) && (slotIndex <= kChampionSlotBackpackLine_1_1)) {
@@ -962,21 +962,21 @@ void ChampionMan::drawSlot(uint16 champIndex, ChampionSlot slotIndex) {
} // BUG2_00
if (slotIndex <= kChampionSlotFeet) {
if (champ->getWoundsFlag((ChampionWound)(1 << slotIndex))) {
- nativeBitmapIndex = kSlotBoxWoundedIndice;
+ nativeBitmapIndex = k34_SlotBoxWoundedIndice;
} else {
- nativeBitmapIndex = kSlotBoxNormalIndice;
+ nativeBitmapIndex = k33_SlotBoxNormalIndice;
}
}
}
if ((slotIndex == kChampionSlotActionHand) && (_vm->indexToOrdinal(champIndex) == _actingChampionOrdinal)) {
- nativeBitmapIndex = kSlotBoxActingHandIndice;
+ nativeBitmapIndex = k35_SlotBoxActingHandIndice;
}
if (nativeBitmapIndex != -1) {
- _vm->_displayMan->_useByteBoxCoordinates = false;
+ _vm->_displayMan->_g578_useByteBoxCoordinates = false;
_vm->_displayMan->blitToScreen(_vm->_displayMan->getBitmap(nativeBitmapIndex), 32, 0, 0,
- box, kColorDarkestGray, isInventoryChamp ? gDungeonViewport : gDefultViewPort);
+ box, k12_ColorDarkestGray, isInventoryChamp ? gDungeonViewport : gDefultViewPort);
}
_vm->_objectMan->drawIconInSlotBox(slotBoxIndex, iconIndex);
@@ -998,10 +998,10 @@ void ChampionMan::renameChampion(Champion* champ) {
box._x1 = 3;
box._x2 = box._x1 + 167;
- dispMan.clearScreenBox(kColorDarkestGray, box, gDungeonViewport);
- dispMan.blitToScreen(dispMan.getBitmap(kPanelRenameChampionIndice), 144, 0, 0, gBoxPanel, kColorCyan, gDungeonViewport);
- textMan.printToViewport(177, 58, kColorLightestGray, "_______");
- textMan.printToViewport(105, 76, kColorLightestGray, "___________________");
+ dispMan.clearScreenBox(k12_ColorDarkestGray, box, gDungeonViewport);
+ dispMan.blitToScreen(dispMan.getBitmap(k27_PanelRenameChampionIndice), 144, 0, 0, gBoxPanel, k4_ColorCyan, gDungeonViewport);
+ textMan.printToViewport(177, 58, k13_ColorLightestGray, "_______");
+ textMan.printToViewport(105, 76, k13_ColorLightestGray, "___________________");
Common::Point clickPos;
static Box okButtonBox(197, 215, 147, 155); // inclusive boundaries, constructor adds +1
for (;;) {
diff --git a/engines/dm/champion.h b/engines/dm/champion.h
index e0390a4937..c1abca1888 100644
--- a/engines/dm/champion.h
+++ b/engines/dm/champion.h
@@ -408,7 +408,7 @@ public:
memset(_name, '\0', 8);
memset(_title, '\0', 20);
_dir = kDirNorth;
- _cell = kViewCellFronLeft;
+ _cell = k0_ViewCellFronLeft;
_actionIndex = kChampionActionN;
_symbolStep = 0;
memset(_symbols, '\0', 5);
diff --git a/engines/dm/dm.cpp b/engines/dm/dm.cpp
index 66a11250e8..be8da8b4b6 100644
--- a/engines/dm/dm.cpp
+++ b/engines/dm/dm.cpp
@@ -144,7 +144,7 @@ DMEngine::~DMEngine() {
void DMEngine::initializeGame() {
_displayMan->loadGraphics();
// DUMMY CODE: next line
- _displayMan->loadPalette(gPalCredits);
+ _displayMan->loadPalette(g19_PalCredits);
_eventMan->initMouse();
@@ -152,8 +152,8 @@ void DMEngine::initializeGame() {
warning("TODO: F0441_STARTEND_ProcessEntrance");
}
- _displayMan->loadFloorSet(kFloorSetStone);
- _displayMan->loadWallSet(kWallSetStone);
+ _displayMan->loadFloorSet(k0_FloorSetStone);
+ _displayMan->loadWallSet(k0_WallSetStone);
_objectMan->loadObjectNames();
startGame();
@@ -184,7 +184,7 @@ void DMEngine::startGame() {
if (!_dungeonMan->_messages._newGame) {
warning("TODO: loading game");
} else {
- _displayMan->_useByteBoxCoordinates = false;
+ _displayMan->_g578_useByteBoxCoordinates = false;
warning("TODO: clear screen");
}
@@ -253,7 +253,7 @@ void DMEngine::gameloop() {
if (!_inventoryMan->_inventoryChampionOrdinal && !_championMan->_partyIsSleeping) {
Box box(0, 224, 0, 126);
- _displayMan->clearScreenBox(kColorBlack, box, gDungeonViewport); // dummy code
+ _displayMan->clearScreenBox(k0_ColorBlack, box, gDungeonViewport); // dummy code
_displayMan->drawDungeon(_dungeonMan->_currMap._partyDir, _dungeonMan->_currMap._partyPosX, _dungeonMan->_currMap._partyPosY);
}
// DUMMY CODE: next line
diff --git a/engines/dm/dungeonman.cpp b/engines/dm/dungeonman.cpp
index 8d5c99bde5..1d74bec094 100644
--- a/engines/dm/dungeonman.cpp
+++ b/engines/dm/dungeonman.cpp
@@ -328,7 +328,7 @@ WeaponInfo gWeaponInfo[46] = { // @ G0238_as_Graphic559_WeaponInfo
WeaponInfo(30, 26, 1, 220, 0x207D), /* SPEEDBOW */
WeaponInfo(36, 255, 100, 50, 0x20FF)}; /* THE FIRESTAFF */
-CreatureInfo gCreatureInfo[kCreatureTypeCount] = { // @ G0243_as_Graphic559_CreatureInfo
+CreatureInfo gCreatureInfo[k27_CreatureTypeCount] = { // @ G0243_as_Graphic559_CreatureInfo
/* { CreatureAspectIndex, AttackSoundOrdinal, Attributes, GraphicInfo,
MovementTicks, AttackTicks, Defense, BaseHealth, Attack, PoisonAttack,
Dexterity, Ranges, Properties, Resistances, AnimationTicks, WoundProbabilities, AttackType } */
@@ -742,19 +742,19 @@ void DungeonMan::setCurrentMapAndPartyMap(uint16 mapIndex) {
setCurrentMap(mapIndex);
byte *metaMapData = _currMap._data[_currMap._width - 1] + _currMap._height;
- _vm->_displayMan->_currMapAllowedCreatureTypes = metaMapData;
+ _vm->_displayMan->_g264_currMapAllowedCreatureTypes = metaMapData;
metaMapData += _currMap._map->_creatureTypeCount;
- memcpy(_vm->_displayMan->_currMapWallOrnIndices, metaMapData, _currMap._map->_wallOrnCount);
+ memcpy(_vm->_displayMan->_g261_currMapWallOrnIndices, metaMapData, _currMap._map->_wallOrnCount);
metaMapData += _currMap._map->_wallOrnCount;
- memcpy(_vm->_displayMan->_currMapFloorOrnIndices, metaMapData, _currMap._map->_floorOrnCount);
+ memcpy(_vm->_displayMan->_g262_currMapFloorOrnIndices, metaMapData, _currMap._map->_floorOrnCount);
metaMapData += _currMap._map->_wallOrnCount;
- memcpy(_vm->_displayMan->_currMapDoorOrnIndices, metaMapData, _currMap._map->_doorOrnCount);
+ memcpy(_vm->_displayMan->_g263_currMapDoorOrnIndices, metaMapData, _currMap._map->_doorOrnCount);
_currMapInscriptionWallOrnIndex = _currMap._map->_wallOrnCount;
- _vm->_displayMan->_currMapWallOrnIndices[_currMapInscriptionWallOrnIndex] = kWallOrnInscription;
+ _vm->_displayMan->_g261_currMapWallOrnIndices[_currMapInscriptionWallOrnIndex] = k0_WallOrnInscription;
}
@@ -817,7 +817,7 @@ Thing DungeonMan::getSquareFirstThing(int16 mapX, int16 mapY) {
// TODO: get rid of the GOTOs
void DungeonMan::setSquareAspect(uint16 *aspectArray, direction dir, int16 mapX, int16 mapY) { // complete, except where marked
- _vm->_displayMan->_championPortraitOrdinal = 0; // BUG0_75, possible fix
+ _vm->_displayMan->_g289_championPortraitOrdinal = 0; // BUG0_75, possible fix
for (uint16 i = 0; i < 5; ++i)
aspectArray[i] = 0;
@@ -868,13 +868,13 @@ T0172010_ClosedFakeWall:
if (thing.getType() == kTextstringType) {
if (TextString(getThingData(thing)).isVisible()) {
aspectArray[sideIndex + 1] = _currMapInscriptionWallOrnIndex + 1;
- _vm->_displayMan->_inscriptionThing = thing; // BUG0_76
+ _vm->_displayMan->_g290_inscriptionThing = thing; // BUG0_76
}
} else {
Sensor sensor(getThingData(thing));
aspectArray[sideIndex + 1] = sensor.getOrnOrdinal();
if (sensor.getType() == kSensorWallChampionPortrait) {
- _vm->_displayMan->_championPortraitOrdinal = _vm->indexToOrdinal(sensor.getData());
+ _vm->_displayMan->_g289_championPortraitOrdinal = _vm->indexToOrdinal(sensor.getData());
}
}
}
@@ -978,8 +978,8 @@ int16 DungeonMan::getRandomOrnOrdinal(bool allowed, int16 count, int16 mapX, int
bool DungeonMan::isWallOrnAnAlcove(int16 wallOrnIndex) {
if (wallOrnIndex >= 0)
- for (uint16 i = 0; i < kAlcoveOrnCount; ++i)
- if (_vm->_displayMan->_currMapAlcoveOrnIndices[i] == wallOrnIndex)
+ for (uint16 i = 0; i < k3_AlcoveOrnCount; ++i)
+ if (_vm->_displayMan->_g267_currMapAlcoveOrnIndices[i] == wallOrnIndex)
return true;
return false;
}
@@ -1307,15 +1307,15 @@ int16 DungeonMan::getProjectileAspect(Thing thing) {
if ((thingType = thing.getType()) == kExplosionThingType) {
if (thing == Thing::_explFireBall)
- return -_vm->indexToOrdinal(kProjectileAspectExplosionFireBall);
+ return -_vm->indexToOrdinal(k10_ProjectileAspectExplosionFireBall);
if (thing == Thing::_explSlime)
- return -_vm->indexToOrdinal(kProjectileAspectExplosionSlime);
+ return -_vm->indexToOrdinal(k12_ProjectileAspectExplosionSlime);
if (thing == Thing::_explLightningBolt)
- return -_vm->indexToOrdinal(kProjectileAspectExplosionLightningBolt);
+ return -_vm->indexToOrdinal(k3_ProjectileAspectExplosionLightningBolt);
if ((thing == Thing::_explPoisonBolt) || (thing == Thing::_explPoisonCloud))
- return -_vm->indexToOrdinal(kProjectileAspectExplosionPoisonBoltCloud);
+ return -_vm->indexToOrdinal(k13_ProjectileAspectExplosionPoisonBoltCloud);
- return -_vm->indexToOrdinal(kProjectileAspectExplosionDefault);
+ return -_vm->indexToOrdinal(k11_ProjectileAspectExplosionDefault);
} else if (thingType == kWeaponThingType) {
weaponInfo = getWeaponInfo(thing);
if (projAspOrd = weaponInfo->getProjectileAspectOrdinal())
diff --git a/engines/dm/dungeonman.h b/engines/dm/dungeonman.h
index df56ec229b..b3f81d8746 100644
--- a/engines/dm/dungeonman.h
+++ b/engines/dm/dungeonman.h
@@ -202,7 +202,7 @@ struct CreatureInfo {
}; // @ CREATURE_INFO
-extern CreatureInfo gCreatureInfo[kCreatureTypeCount];
+extern CreatureInfo gCreatureInfo[k27_CreatureTypeCount];
class Door {
Thing _nextThing;
diff --git a/engines/dm/eventman.cpp b/engines/dm/eventman.cpp
index e9abf94809..1adb396ab9 100644
--- a/engines/dm/eventman.cpp
+++ b/engines/dm/eventman.cpp
@@ -529,7 +529,7 @@ void EventManager::commandProcessType80ClickInDungeonView(int16 posX, int16 posY
int16 mapY = currMap._partyPosY + _vm->_dirIntoStepCountNorth[currMap._partyDir];
if (Door(dunMan.getSquareFirstThingData(mapX, mapY)).hasButton() &&
- dunMan._dungeonViewClickableBoxes[kViewCellDoorButtonOrWallOrn].isPointInside(Common::Point(posX, posY - 33))) {
+ dunMan._dungeonViewClickableBoxes[k5_ViewCellDoorButtonOrWallOrn].isPointInside(Common::Point(posX, posY - 33))) {
_vm->_stopWaitingForPlayerInput = true;
warning("MISSING CODE: F0064_SOUND_RequestPlay_CPSD");
warning("MISSING CODE: F0268_SENSOR_AddEvent");
@@ -541,9 +541,9 @@ void EventManager::commandProcessType80ClickInDungeonView(int16 posX, int16 posY
}
if (champMan._leaderEmptyHanded) {
- for (int16 viewCell = kViewCellFronLeft; viewCell <= kViewCellDoorButtonOrWallOrn; viewCell++) {
+ for (int16 viewCell = k0_ViewCellFronLeft; viewCell <= k5_ViewCellDoorButtonOrWallOrn; viewCell++) {
if (dunMan._dungeonViewClickableBoxes[viewCell].isPointInside(Common::Point(posX, posY - 33))) {
- if (viewCell == kViewCellDoorButtonOrWallOrn) {
+ if (viewCell == k5_ViewCellDoorButtonOrWallOrn) {
if (!dunMan._isFacingAlcove) {
commandProcessType80ClickInDungeonViewTouchFrontWall();
}
@@ -557,14 +557,14 @@ void EventManager::commandProcessType80ClickInDungeonView(int16 posX, int16 posY
Thing thing = champMan._leaderHandObject;
uint16 *rawThingPointer = dunMan.getThingData(thing);
if (dunMan._squareAheadElement == kElementTypeWall) {
- for (int16 viewCell = kViewCellFronLeft; viewCell <= kViewCellFrontRight; ++viewCell) {
+ for (int16 viewCell = k0_ViewCellFronLeft; viewCell <= k1_ViewCellFrontRight; ++viewCell) {
if (gBoxObjectPiles[viewCell].isPointInside(Common::Point(posX, posY))) {
warning("F0374_COMMAND_ProcessType80_ClickInDungeonView_DropLeaderHandObject");
return;
}
}
- if (dunMan._dungeonViewClickableBoxes[kViewCellDoorButtonOrWallOrn].isPointInside(Common::Point(posX, posY - 33))) {
+ if (dunMan._dungeonViewClickableBoxes[k5_ViewCellDoorButtonOrWallOrn].isPointInside(Common::Point(posX, posY - 33))) {
if (dunMan._isFacingAlcove) {
warning("MISSING CODE: F0374_COMMAND_ProcessType80_ClickInDungeonView_DropLeaderHandObject");
} else {
@@ -587,7 +587,7 @@ T0377019:
}
} else {
warning("MISSING CODE: F0375_COMMAND_ProcessType80_ClickInDungeonView_IsLeaderHandObjectThrown in if branch");
- for (int16 viewCell = kViewCellFronLeft; viewCell <= kViewCellBackLeft; viewCell++) {
+ for (int16 viewCell = k0_ViewCellFronLeft; viewCell <= k3_ViewCellBackLeft; viewCell++) {
if (gBoxObjectPiles[viewCell].isPointInside(Common::Point(posX, posY))) {
warning("MISSING CODE: F0374_COMMAND_ProcessType80_ClickInDungeonView_DropLeaderHandObject");
return;
@@ -618,9 +618,9 @@ void EventManager::commandProcessCommands160To162ClickInResurrectReincarnatePane
box._y2 = 28 + 1;
box._x1 = championIndex * kChampionStatusBoxSpacing;
box._x2 = box._x1 + 66 + 1;
- dispMan._useByteBoxCoordinates = false;
- dispMan.clearScreenBox(kColorBlack, box);
- dispMan.clearScreenBox(kColorBlack, gBoxChampionIcons[champMan.championIconIndex(champ->_cell, currMap._partyDir) * 2]);
+ dispMan._g578_useByteBoxCoordinates = false;
+ dispMan.clearScreenBox(k0_ColorBlack, box);
+ dispMan.clearScreenBox(k0_ColorBlack, gBoxChampionIcons[champMan.championIconIndex(champ->_cell, currMap._partyDir) * 2]);
warning("F0457_START_DrawEnabledMenus_CPSF");
warning("F0078_MOUSE_ShowPointer");
return;
diff --git a/engines/dm/gfx.cpp b/engines/dm/gfx.cpp
index ce31c499f5..f6b1b0271a 100644
--- a/engines/dm/gfx.cpp
+++ b/engines/dm/gfx.cpp
@@ -121,11 +121,11 @@ FieldAspect gFieldAspects[12] = { // @ G0188_as_Graphic558_FieldAspects
FieldAspect(0, 63, 0x0A, 0x83, 16, 136, 0, 64), /* D0L */
FieldAspect(0, 63, 0x0A, 0x03, 16, 136, 0, 64)}; /* D0R */
-Box gBoxMovementArrows = Box(224, 319, 124, 168);
+Box g2_BoxMovementArrows = Box(224, 319, 124, 168);
byte gPalChangeSmoke[16] = {0, 10, 20, 30, 40, 50, 120, 10, 80, 90, 100, 110, 120, 130, 140, 150}; // @ G0212_auc_Graphic558_PaletteChanges_Smoke
-ExplosionAspect gExplosionAspects[kExplosionAspectCount] = { // @ G0211_as_Graphic558_ExplosionAspects
+ExplosionAspect g211_ExplosionAspects[k4_ExplosionAspectCount] = { // @ G0211_as_Graphic558_ExplosionAspects
/* { ByteWidth, Height } */
ExplosionAspect(80, 111), /* Fire */
ExplosionAspect(64, 97), /* Spell */
@@ -134,7 +134,7 @@ ExplosionAspect(80, 91)}; /* Death */
#define kDerivedBitmapMaximumCount 730 // @ C730_DERIVED_BITMAP_MAXIMUM_COUNT
-byte gProjectileScales[7] = {
+byte g215_ProjectileScales[7] = {
13, /* D4 Back */
16, /* D4 Front */
19, /* D3 Back */
@@ -490,39 +490,39 @@ byte gWallOrnCoordSetIndices[60] = { // @ G0194_auc_Graphic558_WallOrnamentCoord
6, /* Wall Ornament 58 Amalgam (Without Gem) */
7}; /* Wall Ornament 59 Lord Order (Outside) */
-CreatureAspect gCreatureAspects[kCreatureTypeCount] = { // @ G0219_as_Graphic558_CreatureAspects
-/* { FirstNativeBitmapRelativeIndex, FirstDerivedBitmapIndex, pixelWidthFront, HeightFront,
-pixelWidthSide, HeightSide, pixelWidthAttack, HeightAttack, CoordinateSet / TransparentColor,
-Replacement Color Set Index for color 10 / Replacement Color Set Index for color 9 } */
- {0, 0, 56 * 2, 84, 56 * 2, 84, 56 * 2, 84, 0x1D, 0x01}, /* Creature #00 Giant Scorpion / Scorpion */
- {4, 0, 32 * 2, 66, 0 * 2, 0, 32 * 2, 69, 0x0B, 0x20}, /* Creature #01 Swamp Slime / Slime Devil */
- {6, 0, 24 * 2, 48, 24 * 2, 48, 0 * 2, 0, 0x0B, 0x00}, /* Creature #02 Giggler */
- {10, 0, 32 * 2, 61, 0 * 2, 0, 32 * 2, 61, 0x24, 0x31}, /* Creature #03 Wizard Eye / Flying Eye */
- {12, 0, 32 * 2, 64, 56 * 2, 64, 32 * 2, 64, 0x14, 0x34}, /* Creature #04 Pain Rat / Hellhound */
- {16, 0, 24 * 2, 49, 40 * 2, 49, 0 * 2, 0, 0x18, 0x34}, /* Creature #05 Ruster */
- {19, 0, 32 * 2, 60, 0 * 2, 0, 32 * 2, 60, 0x0D, 0x00}, /* Creature #06 Screamer */
- {21, 0, 32 * 2, 43, 0 * 2, 0, 32 * 2, 64, 0x04, 0x00}, /* Creature #07 Rockpile / Rock pile */
- {23, 0, 32 * 2, 83, 0 * 2, 0, 32 * 2, 93, 0x04, 0x00}, /* Creature #08 Ghost / Rive */
- {25, 0, 32 * 2, 101, 32 * 2, 101, 32 * 2, 101, 0x14, 0x00}, /* Creature #09 Stone Golem */
- {29, 0, 32 * 2, 82, 32 * 2, 82, 32 * 2, 83, 0x04, 0x00}, /* Creature #10 Mummy */
- {33, 0, 32 * 2, 80, 0 * 2, 0, 32 * 2, 99, 0x14, 0x00}, /* Creature #11 Black Flame */
- {35, 0, 32 * 2, 80, 32 * 2, 80, 32 * 2, 76, 0x04, 0x00}, /* Creature #12 Skeleton */
- {39, 0, 32 * 2, 96, 56 * 2, 93, 32 * 2, 90, 0x1D, 0x20}, /* Creature #13 Couatl */
- {43, 0, 32 * 2, 49, 16 * 2, 49, 32 * 2, 56, 0x04, 0x30}, /* Creature #14 Vexirk */
- {47, 0, 32 * 2, 59, 56 * 2, 43, 32 * 2, 67, 0x14, 0x78}, /* Creature #15 Magenta Worm / Worm */
- {51, 0, 32 * 2, 83, 32 * 2, 74, 32 * 2, 74, 0x04, 0x65}, /* Creature #16 Trolin / Ant Man */
- {55, 0, 24 * 2, 49, 24 * 2, 53, 24 * 2, 53, 0x24, 0x00}, /* Creature #17 Giant Wasp / Muncher */
- {59, 0, 32 * 2, 89, 32 * 2, 89, 32 * 2, 89, 0x04, 0x00}, /* Creature #18 Animated Armour / Deth Knight */
- {63, 0, 32 * 2, 84, 32 * 2, 84, 32 * 2, 84, 0x0D, 0xA9}, /* Creature #19 Materializer / Zytaz */
- {67, 0, 56 * 2, 27, 0 * 2, 0, 56 * 2, 80, 0x04, 0x65}, /* Creature #20 Water Elemental */
- {69, 0, 56 * 2, 77, 56 * 2, 81, 56 * 2, 77, 0x04, 0xA9}, /* Creature #21 Oitu */
- {73, 0, 32 * 2, 87, 32 * 2, 89, 32 * 2, 89, 0x04, 0xCB}, /* Creature #22 Demon */
- {77, 0, 32 * 2, 96, 32 * 2, 94, 32 * 2, 96, 0x04, 0x00}, /* Creature #23 Lord Chaos */
- {81, 0, 64 * 2, 94, 72 * 2, 94, 64 * 2, 94, 0x04, 0xCB}, /* Creature #24 Red Dragon / Dragon */
- {85, 0, 32 * 2, 93, 0 * 2, 0, 0 * 2, 0, 0x04, 0xCB}, /* Creature #25 Lord Order */
- {86, 0, 32 * 2, 93, 0 * 2, 0, 0 * 2, 0, 0x04, 0xCB}}; /* Creature #26 Grey Lord */
-
-ObjectAspect gObjectAspects[kObjAspectCount] = { // @ G0209_as_Graphic558_ObjectAspects
+CreatureAspect gCreatureAspects[k27_CreatureTypeCount] = { // @ G0219_as_Graphic558_CreatureAspects
+ /* { FirstNativeBitmapRelativeIndex, FirstDerivedBitmapIndex, pixelWidthFront, HeightFront,
+ pixelWidthSide, HeightSide, pixelWidthAttack, HeightAttack, CoordinateSet / TransparentColor,
+ Replacement Color Set Index for color 10 / Replacement Color Set Index for color 9 } */
+ CreatureAspect(0, 0, 56 , 84, 56 , 84, 56 , 84, 0x1D, 0x01), /* Creature #00 Giant Scorpion / Scorpion */
+ CreatureAspect(4, 0, 32 , 66, 0 , 0, 32 , 69, 0x0B, 0x20), /* Creature #01 Swamp Slime / Slime Devil */
+ CreatureAspect(6, 0, 24 , 48, 24 , 48, 0 , 0, 0x0B, 0x00), /* Creature #02 Giggler */
+ CreatureAspect(10, 0, 32 , 61, 0 , 0, 32 , 61, 0x24, 0x31), /* Creature #03 Wizard Eye / Flying Eye */
+ CreatureAspect(12, 0, 32 , 64, 56 , 64, 32 , 64, 0x14, 0x34), /* Creature #04 Pain Rat / Hellhound */
+ CreatureAspect(16, 0, 24 , 49, 40 , 49, 0 , 0, 0x18, 0x34), /* Creature #05 Ruster */
+ CreatureAspect(19, 0, 32 , 60, 0 , 0, 32 , 60, 0x0D, 0x00), /* Creature #06 Screamer */
+ CreatureAspect(21, 0, 32 , 43, 0 , 0, 32 , 64, 0x04, 0x00), /* Creature #07 Rockpile / Rock pile */
+ CreatureAspect(23, 0, 32 , 83, 0 , 0, 32 , 93, 0x04, 0x00), /* Creature #08 Ghost / Rive */
+ CreatureAspect(25, 0, 32 , 101, 32 , 101, 32 , 101, 0x14, 0x00), /* Creature #09 Stone Golem */
+ CreatureAspect(29, 0, 32 , 82, 32 , 82, 32 , 83, 0x04, 0x00), /* Creature #10 Mummy */
+ CreatureAspect(33, 0, 32 , 80, 0 , 0, 32 , 99, 0x14, 0x00), /* Creature #11 Black Flame */
+ CreatureAspect(35, 0, 32 , 80, 32 , 80, 32 , 76, 0x04, 0x00), /* Creature #12 Skeleton */
+ CreatureAspect(39, 0, 32 , 96, 56 , 93, 32 , 90, 0x1D, 0x20), /* Creature #13 Couatl */
+ CreatureAspect(43, 0, 32 , 49, 16 , 49, 32 , 56, 0x04, 0x30), /* Creature #14 Vexirk */
+ CreatureAspect(47, 0, 32 , 59, 56 , 43, 32 , 67, 0x14, 0x78), /* Creature #15 Magenta Worm / Worm */
+ CreatureAspect(51, 0, 32 , 83, 32 , 74, 32 , 74, 0x04, 0x65), /* Creature #16 Trolin / Ant Man */
+ CreatureAspect(55, 0, 24 , 49, 24 , 53, 24 , 53, 0x24, 0x00), /* Creature #17 Giant Wasp / Muncher */
+ CreatureAspect(59, 0, 32 , 89, 32 , 89, 32 , 89, 0x04, 0x00), /* Creature #18 Animated Armour / Deth Knight */
+ CreatureAspect(63, 0, 32 , 84, 32 , 84, 32 , 84, 0x0D, 0xA9), /* Creature #19 Materializer / Zytaz */
+ CreatureAspect(67, 0, 56 , 27, 0 , 0, 56 , 80, 0x04, 0x65), /* Creature #20 Water Elemental */
+ CreatureAspect(69, 0, 56 , 77, 56 , 81, 56 , 77, 0x04, 0xA9), /* Creature #21 Oitu */
+ CreatureAspect(73, 0, 32 , 87, 32 , 89, 32 , 89, 0x04, 0xCB), /* Creature #22 Demon */
+ CreatureAspect(77, 0, 32 , 96, 32 , 94, 32 , 96, 0x04, 0x00), /* Creature #23 Lord Chaos */
+ CreatureAspect(81, 0, 64 , 94, 72 , 94, 64 , 94, 0x04, 0xCB), /* Creature #24 Red Dragon / Dragon */
+ CreatureAspect(85, 0, 32 , 93, 0 , 0, 0 , 0, 0x04, 0xCB), /* Creature #25 Lord Order */
+ CreatureAspect(86, 0, 32 , 93, 0 , 0, 0 , 0, 0x04, 0xCB)}; /* Creature #26 Grey Lord */
+
+ObjectAspect gObjectAspects[k85_ObjAspectCount] = { // @ G0209_as_Graphic558_ObjectAspects
/* FirstNativeBitmapRelativeIndex, FirstDerivedBitmapRelativeIndex, ByteWidth, Height, GraphicInfo, CoordinateSet */
ObjectAspect(0, 0, 24, 27, 0x11, 0),
ObjectAspect(2, 6, 24, 8, 0x00, 1),
@@ -611,7 +611,7 @@ ObjectAspect gObjectAspects[kObjAspectCount] = { // @ G0209_as_Graphic558_Object
ObjectAspect(85, 176, 32, 17, 0x00, 0)
};
-ProjectileAspect gProjectileAspect[kProjectileAspectCount] = { // @ G0210_as_Graphic558_ProjectileAspects
+ProjectileAspect gProjectileAspect[k14_ProjectileAspectCount] = { // @ G0210_as_Graphic558_ProjectileAspects
/* ProjectileAspect( FirstNativeBitmapRelativeIndex, FirstDerivedBitmapRelativeIndex, ByteWidth, Height, GraphicInfo ) */
ProjectileAspect(0, 0, 32, 11, 0x0011), /* Arrow */
ProjectileAspect(3, 18, 16, 11, 0x0011), /* Dagger */
@@ -632,13 +632,13 @@ ProjectileAspect gProjectileAspect[kProjectileAspectCount] = { // @ G0210_as_Gra
// TODO: this is ONLY for the Amiga version, name will have to be refactored
/* Identical to the palette at the end of the swoosh palette animation */
-uint16 gPalSwoosh[16] = {0x000, 0xFFF, 0xFFF, 0xFFF, 0xFFF, 0xFFF, 0xFFF, 0xFFF, 0x000, 0xFFF, 0xAAA, 0xFFF, 0xAAA, 0x444, 0xFF0, 0xFF0}; // @ K0057_aui_Palette_Swoosh
-uint16 gPalMousePointer[16] = {0x000, 0x666, 0x888, 0x620, 0x0CC, 0x840, 0x080, 0x0C0, 0xF00, 0xFA0, 0xC86, 0xFF0, 0x000, 0xAAA, 0x00F, 0xFFF}; // @ K0150_aui_Palette_MousePointer
+uint16 gK57_PalSwoosh[16] = {0x000, 0xFFF, 0xFFF, 0xFFF, 0xFFF, 0xFFF, 0xFFF, 0xFFF, 0x000, 0xFFF, 0xAAA, 0xFFF, 0xAAA, 0x444, 0xFF0, 0xFF0}; // @ K0057_aui_Palette_Swoosh
+uint16 gK150_PalMousePointer[16] = {0x000, 0x666, 0x888, 0x620, 0x0CC, 0x840, 0x080, 0x0C0, 0xF00, 0xFA0, 0xC86, 0xFF0, 0x000, 0xAAA, 0x00F, 0xFFF}; // @ K0150_aui_Palette_MousePointer
/* Atari ST: { 0x003, 0x055, 0x773, 0x420, 0x774, 0x000, 0x040, 0x500, 0x642, 0x775, 0x742, 0x760, 0x750, 0x000, 0x310, 0x776 }, RGB colors are different */
-uint16 gPalCredits[16] = {0x006, 0x0AA, 0xFF6, 0x840, 0xFF8, 0x000, 0x080, 0xA00, 0xC84, 0xFFA, 0xF84, 0xFC0, 0xFA0, 0x000, 0x620, 0xFFC}; // @ G0019_aui_Graphic562_Palette_Credits
+uint16 g19_PalCredits[16] = {0x006, 0x0AA, 0xFF6, 0x840, 0xFF8, 0x000, 0x080, 0xA00, 0xC84, 0xFFA, 0xF84, 0xFC0, 0xFA0, 0x000, 0x620, 0xFFC}; // @ G0019_aui_Graphic562_Palette_Credits
/* Atari ST: { 0x000, 0x333, 0x444, 0x420, 0x654, 0x210, 0x040, 0x050, 0x432, 0x700, 0x543, 0x321, 0x222, 0x555, 0x310, 0x777 }, RGB colors are different */
-uint16 gPalEntrance[16] = {0x000, 0x666, 0x888, 0x840, 0xCA8, 0x0C0, 0x080, 0x0A0, 0x864, 0xF00, 0xA86, 0x642, 0x444, 0xAAA, 0x620, 0xFFF}; // @ G0020_aui_Graphic562_Palette_Entrance
-uint16 gPalDungeonView[6][16] = { // @ G0021_aaui_Graphic562_Palette_DungeonView
+uint16 g20_PalEntrance[16] = {0x000, 0x666, 0x888, 0x840, 0xCA8, 0x0C0, 0x080, 0x0A0, 0x864, 0xF00, 0xA86, 0x642, 0x444, 0xAAA, 0x620, 0xFFF}; // @ G0020_aui_Graphic562_Palette_Entrance
+uint16 g21_PalDungeonView[6][16] = { // @ G0021_aaui_Graphic562_Palette_DungeonView
/* Atari ST: { 0x000, 0x333, 0x444, 0x310, 0x066, 0x420, 0x040, 0x060, 0x700, 0x750, 0x643, 0x770, 0x222, 0x555, 0x007, 0x777 }, RGB colors are different */
0x000, 0x666, 0x888, 0x620, 0x0CC, 0x840, 0x080, 0x0C0, 0xF00, 0xFA0, 0xC86, 0xFF0, 0x444, 0xAAA, 0x00F, 0xFFF,
/* Atari ST: { 0x000, 0x222, 0x333, 0x310, 0x066, 0x410, 0x030, 0x050, 0x600, 0x640, 0x532, 0x760, 0x111, 0x444, 0x006, 0x666 }, RGB colors are different */
@@ -684,8 +684,8 @@ byte gPalChangesNoChanges[16] = {0, 10, 20, 30, 40, 50, 60, 70, 80, 90, 100, 110
byte gPalChangesFloorOrn_D3[16] = {0, 120, 10, 30, 40, 30, 0, 60, 30, 90, 100, 110, 0, 20, 140, 130}; // @ G0213_auc_Graphic558_PaletteChanges_FloorOrnament_D3
byte gPalChangesFloorOrn_D2[16] = {0, 10, 20, 30, 40, 30, 60, 70, 50, 90, 100, 110, 120, 130, 140, 150}; // @ G0214_auc_Graphic558_PaletteChanges_FloorOrnament_D2
-int gFountainOrnIndices[kFountainOrnCount] = {35}; // @ G0193_ai_Graphic558_FountainOrnamentIndices
-byte gAlcoveOrnIndices[kAlcoveOrnCount] = { // @ G0192_auc_Graphic558_AlcoveOrnamentIndices
+int gFountainOrnIndices[k1_FountainOrnCount] = {35}; // @ G0193_ai_Graphic558_FountainOrnamentIndices
+byte gAlcoveOrnIndices[k3_AlcoveOrnCount] = { // @ G0192_auc_Graphic558_AlcoveOrnamentIndices
1, /* Square Alcove */
2, /* Vi Altar */
3}; /* Arched Alcove */
@@ -698,52 +698,49 @@ DisplayMan::DisplayMan(DMEngine *dmEngine) : _vm(dmEngine) {
_packedItemPos = nullptr;
_packedBitmaps = nullptr;
_bitmaps = nullptr;
- _tmpBitmap = nullptr;
- _floorBitmap = nullptr;
- _ceilingBitmap = nullptr;
- _currMapAllowedCreatureTypes = nullptr;
- _derivedBitmapByteCount = nullptr;
- _derivedBitmaps = nullptr;
+ _g74_tmpBitmap = nullptr;
+ _g84_floorBitmap = nullptr;
+ _g85_ceilingBitmap = nullptr;
+ _g264_currMapAllowedCreatureTypes = nullptr;
+ _g639_derivedBitmapByteCount = nullptr;
+ _g638_derivedBitmaps = nullptr;
_screenWidth = _screenHeight = 0;
- _championPortraitOrdinal = 0;
- _currMapViAltarIndex = 0;
+ _g289_championPortraitOrdinal = 0;
+ _g266_currMapViAltarIndex = 0;
for (int i = 0; i < 25; i++)
_wallSetBitMaps[i] = nullptr;
- //for (int i = 0; i < kStairsGraphicCount; i++)
- // _stairIndices[i] = 0;
-
for (int i = 0; i < 4; i++)
- _palChangesProjectile[i] = nullptr;
+ _g75_palChangesProjectile[i] = nullptr;
- for (int i = 0; i < kAlcoveOrnCount; i++)
- _currMapAlcoveOrnIndices[i] = 0;
+ for (int i = 0; i < k3_AlcoveOrnCount; i++)
+ _g267_currMapAlcoveOrnIndices[i] = 0;
- for (int i = 0; i < kFountainOrnCount; i++)
- _currMapFountainOrnIndices[i] = 0;
+ for (int i = 0; i < k1_FountainOrnCount; i++)
+ _g268_currMapFountainOrnIndices[i] = 0;
for (int i = 0; i < 2; i++) {
for (int j = 0; j < 16; j++) {
- _currMapWallOrnInfo[j][i] = 0;
- _currMapFloorOrnInfo[j][i] = 0;
+ _g101_currMapWallOrnInfo[j][i] = 0;
+ _g102_currMapFloorOrnInfo[j][i] = 0;
}
for (int j = 0; j < 17; j++) {
- _currMapDoorOrnInfo[j][i] = 0;
+ _g103_currMapDoorOrnInfo[j][i] = 0;
}
}
for (int i = 0; i < 16; i++) {
- _currMapWallOrnIndices[i] = 0;
- _currMapFloorOrnIndices[i] = 0;
+ _g261_currMapWallOrnIndices[i] = 0;
+ _g262_currMapFloorOrnIndices[i] = 0;
}
for (int i = 0; i < 18; i++)
- _currMapDoorOrnIndices[i] = 0;
+ _g263_currMapDoorOrnIndices[i] = 0;
- _inscriptionThing = Thing::_none;
- _useByteBoxCoordinates = false;
+ _g290_inscriptionThing = Thing::_none;
+ _g578_useByteBoxCoordinates = false;
}
DisplayMan::~DisplayMan() {
@@ -759,22 +756,22 @@ DisplayMan::~DisplayMan() {
for (uint16 i = kWall_D0L_Flipped; i <= kWall_D3LCR_Flipped; ++i)
delete[] _wallSetBitMaps[i];
- delete[] _derivedBitmapByteCount;
- if (_derivedBitmaps) {
+ delete[] _g639_derivedBitmapByteCount;
+ if (_g638_derivedBitmaps) {
for (uint16 i = 0; i < kDerivedBitmapMaximumCount; ++i)
- delete[] _derivedBitmaps;
- delete[] _derivedBitmaps;
+ delete[] _g638_derivedBitmaps;
+ delete[] _g638_derivedBitmaps;
}
}
void DisplayMan::setUpScreens(uint16 width, uint16 height) {
_screenWidth = width;
_screenHeight = height;
- delete[] _tmpBitmap;
- _tmpBitmap = new byte[_screenWidth * _screenHeight];
+ delete[] _g74_tmpBitmap;
+ _g74_tmpBitmap = new byte[_screenWidth * _screenHeight];
delete[] _vgaBuffer;
_vgaBuffer = new byte[_screenWidth * _screenHeight];
- clearScreen(kColorBlack);
+ clearScreen(k0_ColorBlack);
}
void DisplayMan::loadGraphics() {
@@ -799,128 +796,128 @@ void DisplayMan::loadGraphics() {
unpackGraphics();
- loadFloorSet(kFloorSetStone);
- loadWallSet(kWallSetStone);
+ loadFloorSet(k0_FloorSetStone);
+ loadWallSet(k0_WallSetStone);
- if (!_derivedBitmapByteCount)
- _derivedBitmapByteCount = new uint16[kDerivedBitmapMaximumCount];
- if (!_derivedBitmaps) {
- _derivedBitmaps = new byte*[kDerivedBitmapMaximumCount];
+ if (!_g639_derivedBitmapByteCount)
+ _g639_derivedBitmapByteCount = new uint16[kDerivedBitmapMaximumCount];
+ if (!_g638_derivedBitmaps) {
+ _g638_derivedBitmaps = new byte*[kDerivedBitmapMaximumCount];
for (uint16 i = 0; i < kDerivedBitmapMaximumCount; ++i)
- _derivedBitmaps[i] = nullptr;
+ _g638_derivedBitmaps[i] = nullptr;
}
- _derivedBitmapByteCount[kDerivedBitmapViewport] = 224 * 136;
- _derivedBitmapByteCount[kDerivedBitmapThievesEyeVisibleArea] = 96 * 95;
- _derivedBitmapByteCount[kDerivedBitmapDamageToCreatureMedium] = 64 * 37;
- _derivedBitmapByteCount[kDerivedBitmapDamageToCreatureSmall] = 48 * 37;
+ _g639_derivedBitmapByteCount[k0_DerivedBitmapViewport] = 224 * 136;
+ _g639_derivedBitmapByteCount[k1_DerivedBitmapThievesEyeVisibleArea] = 96 * 95;
+ _g639_derivedBitmapByteCount[k2_DerivedBitmapDamageToCreatureMedium] = 64 * 37;
+ _g639_derivedBitmapByteCount[k3_DerivedBitmapDamageToCreatureSmall] = 48 * 37;
- for (int16 doorOrnamentIndex = kDoorOrnDestroyedMask; doorOrnamentIndex <= kDoorOrnThivesEyeMask; doorOrnamentIndex++) {
- _currMapDoorOrnInfo[doorOrnamentIndex][kNativeBitmapIndex] = doorOrnamentIndex + (kDoorMaskDestroyedIndice - kDoorOrnDestroyedMask);
- _currMapDoorOrnInfo[doorOrnamentIndex][kCoordinateSet] = 1;
+ for (int16 doorOrnamentIndex = k15_DoorOrnDestroyedMask; doorOrnamentIndex <= k16_DoorOrnThivesEyeMask; doorOrnamentIndex++) {
+ _g103_currMapDoorOrnInfo[doorOrnamentIndex][k0_NativeBitmapIndex] = doorOrnamentIndex + (k301_DoorMaskDestroyedIndice - k15_DoorOrnDestroyedMask);
+ _g103_currMapDoorOrnInfo[doorOrnamentIndex][k1_CoordinateSet] = 1;
- _derivedBitmapByteCount[doorOrnamentIndex * 2 + kDerivedBitmapFirstDoorOrnament_D3] = 48 * 41;
- _derivedBitmapByteCount[doorOrnamentIndex * 2 + kDerivedBitmapFirstDoorOrnament_D2] = 64 * 61;
+ _g639_derivedBitmapByteCount[doorOrnamentIndex * 2 + k68_DerivedBitmapFirstDoorOrnament_D3] = 48 * 41;
+ _g639_derivedBitmapByteCount[doorOrnamentIndex * 2 + k69_DerivedBitmapFirstDoorOrnament_D2] = 64 * 61;
}
- _currMapFloorOrnInfo[kFloorOrnFootprints][kNativeBitmapIndex] = kFloorOrn_15_D3L_footprints;
- _currMapFloorOrnInfo[kFloorOrnFootprints][kCoordinateSet] = 1;
+ _g102_currMapFloorOrnInfo[k15_FloorOrnFootprints][k0_NativeBitmapIndex] = k241_FloorOrn_15_D3L_footprints;
+ _g102_currMapFloorOrnInfo[k15_FloorOrnFootprints][k1_CoordinateSet] = 1;
ObjectAspect *objectAspect = gObjectAspects;
int16 derivedBitmapIndex;
- for (int16 objectAspectIndex = 0; objectAspectIndex < kObjAspectCount; ++objectAspectIndex, ++objectAspect) {
- derivedBitmapIndex = kDerivedBitmapFirstObject + objectAspect->_firstDerivedBitmapRelativeIndex;
+ for (int16 objectAspectIndex = 0; objectAspectIndex < k85_ObjAspectCount; ++objectAspectIndex, ++objectAspect) {
+ derivedBitmapIndex = k104_DerivedBitmapFirstObject + objectAspect->_firstDerivedBitmapRelativeIndex;
- _derivedBitmapByteCount[derivedBitmapIndex++] = getScaledBitmapPixelCount(objectAspect->_width, objectAspect->_height, kScale16_D3);
- _derivedBitmapByteCount[derivedBitmapIndex++] = getScaledBitmapPixelCount(objectAspect->_width, objectAspect->_height, kScale20_D2);
+ _g639_derivedBitmapByteCount[derivedBitmapIndex++] = getScaledBitmapPixelCount(objectAspect->_width, objectAspect->_height, k16_Scale_D3);
+ _g639_derivedBitmapByteCount[derivedBitmapIndex++] = getScaledBitmapPixelCount(objectAspect->_width, objectAspect->_height, k20_Scale_D2);
- if (getFlag(objectAspect->_graphicInfo, kObjectFlipOnRightMask)) {
- _derivedBitmapByteCount[derivedBitmapIndex] = _derivedBitmapByteCount[derivedBitmapIndex - 2];
+ if (getFlag(objectAspect->_graphicInfo, k0x0001_ObjectFlipOnRightMask)) {
+ _g639_derivedBitmapByteCount[derivedBitmapIndex] = _g639_derivedBitmapByteCount[derivedBitmapIndex - 2];
derivedBitmapIndex++;
- _derivedBitmapByteCount[derivedBitmapIndex] = _derivedBitmapByteCount[derivedBitmapIndex - 2];
+ _g639_derivedBitmapByteCount[derivedBitmapIndex] = _g639_derivedBitmapByteCount[derivedBitmapIndex - 2];
derivedBitmapIndex++;
}
- if (getFlag(objectAspect->_graphicInfo, kObjectAlcoveMask)) {
- _derivedBitmapByteCount[derivedBitmapIndex] = _derivedBitmapByteCount[derivedBitmapIndex - 2];
+ if (getFlag(objectAspect->_graphicInfo, k0x0010_ObjectAlcoveMask)) {
+ _g639_derivedBitmapByteCount[derivedBitmapIndex] = _g639_derivedBitmapByteCount[derivedBitmapIndex - 2];
derivedBitmapIndex++;
- _derivedBitmapByteCount[derivedBitmapIndex] = _derivedBitmapByteCount[derivedBitmapIndex - 2];
+ _g639_derivedBitmapByteCount[derivedBitmapIndex] = _g639_derivedBitmapByteCount[derivedBitmapIndex - 2];
}
}
ProjectileAspect *projectileAspect = gProjectileAspect;
- for (int16 projectileAspectIndex = 0; projectileAspectIndex < kProjectileAspectCount; projectileAspectIndex++, projectileAspect++) {
+ for (int16 projectileAspectIndex = 0; projectileAspectIndex < k14_ProjectileAspectCount; projectileAspectIndex++, projectileAspect++) {
- if (!getFlag(projectileAspect->_graphicInfo, kProjectileScaleWithKineticEnergyMask)) {
- derivedBitmapIndex = kDerivedBitmapFirstProjectile + projectileAspect->_firstDerivedBitmapRelativeIndex;
+ if (!getFlag(projectileAspect->_graphicInfo, k0x0100_ProjectileScaleWithKineticEnergyMask)) {
+ derivedBitmapIndex = k282_DerivedBitmapFirstProjectile + projectileAspect->_firstDerivedBitmapRelativeIndex;
for (int16 projectileScaleIndex = 0; projectileScaleIndex < 6; projectileScaleIndex++) {
- int16 bitmapPixelCount = getScaledBitmapPixelCount(projectileAspect->_width, projectileAspect->_height, gProjectileScales[projectileScaleIndex]);
- _derivedBitmapByteCount[derivedBitmapIndex] = bitmapPixelCount;
+ int16 bitmapPixelCount = getScaledBitmapPixelCount(projectileAspect->_width, projectileAspect->_height, g215_ProjectileScales[projectileScaleIndex]);
+ _g639_derivedBitmapByteCount[derivedBitmapIndex] = bitmapPixelCount;
- if (getFlag(projectileAspect->_graphicInfo, kProjectileAspectTypeMask) != kProjectileAspectHasNone) {
- _derivedBitmapByteCount[derivedBitmapIndex + 6] = bitmapPixelCount;
+ if (getFlag(projectileAspect->_graphicInfo, k0x0003_ProjectileAspectTypeMask) != k3_ProjectileAspectHasNone) {
+ _g639_derivedBitmapByteCount[derivedBitmapIndex + 6] = bitmapPixelCount;
- if (getFlag(projectileAspect->_graphicInfo, kProjectileAspectTypeMask) != kProjectileAspectHasRotation) {
- _derivedBitmapByteCount[derivedBitmapIndex + 12] = bitmapPixelCount;
+ if (getFlag(projectileAspect->_graphicInfo, k0x0003_ProjectileAspectTypeMask) != k2_ProjectileAspectHasRotation) {
+ _g639_derivedBitmapByteCount[derivedBitmapIndex + 12] = bitmapPixelCount;
}
}
}
}
}
- _palChangesProjectile[0] = gPalChangesFloorOrn_D3;
- _palChangesProjectile[1] = gPalChangesFloorOrn_D2;
- _palChangesProjectile[2] = _palChangesProjectile[3] = gPalChangesNoChanges;
+ _g75_palChangesProjectile[0] = gPalChangesFloorOrn_D3;
+ _g75_palChangesProjectile[1] = gPalChangesFloorOrn_D2;
+ _g75_palChangesProjectile[2] = _g75_palChangesProjectile[3] = gPalChangesNoChanges;
- derivedBitmapIndex = kDerivedBitmapFirstExplosion;
- ExplosionAspect *expAsp = gExplosionAspects;
- for (uint16 expAspIndex = 0; expAspIndex < kExplosionAspectCount; ++expAspIndex, expAsp++) {
+ derivedBitmapIndex = k438_DerivedBitmapFirstExplosion;
+ ExplosionAspect *expAsp = g211_ExplosionAspects;
+ for (uint16 expAspIndex = 0; expAspIndex < k4_ExplosionAspectCount; ++expAspIndex, expAsp++) {
for (int16 scale = 4; scale < 32; scale += 2)
- _derivedBitmapByteCount[derivedBitmapIndex++] = getScaledBitmapPixelCount(expAsp->_pixelWidth, expAsp->_height, scale);
+ _g639_derivedBitmapByteCount[derivedBitmapIndex++] = getScaledBitmapPixelCount(expAsp->_pixelWidth, expAsp->_height, scale);
- if (expAspIndex == kExplosionAspectSmoke) {
- _derivedBitmapByteCount[derivedBitmapIndex++] = expAsp->_pixelWidth * expAsp->_height;
+ if (expAspIndex == k3_ExplosionAspectSmoke) {
+ _g639_derivedBitmapByteCount[derivedBitmapIndex++] = expAsp->_pixelWidth * expAsp->_height;
}
}
- derivedBitmapIndex = kDerivedBitmapFirstCreature;
+ derivedBitmapIndex = k495_DerivedBitmapFirstCreature;
CreatureAspect *creatureAsp;
- for (int16 creatureIndex = 0; creatureIndex < kCreatureTypeCount; creatureIndex++) {
+ for (int16 creatureIndex = 0; creatureIndex < k27_CreatureTypeCount; creatureIndex++) {
creatureAsp = &gCreatureAspects[creatureIndex];
int16 creatureGraphicInfo = gCreatureInfo[creatureIndex]._graphicInfo;
creatureAsp->_firstDerivedBitmapIndex = derivedBitmapIndex;
int16 creatureFrontBitmapD3PixelCount;
- _derivedBitmapByteCount[derivedBitmapIndex++] = creatureFrontBitmapD3PixelCount = getScaledBitmapPixelCount(creatureAsp->_byteWidthFront, creatureAsp->_heightFront, kScale16_D3);
+ _g639_derivedBitmapByteCount[derivedBitmapIndex++] = creatureFrontBitmapD3PixelCount = getScaledBitmapPixelCount(creatureAsp->_byteWidthFront, creatureAsp->_heightFront, k16_Scale_D3);
int16 creatureFrontBitmapD2PixelCount;
- _derivedBitmapByteCount[derivedBitmapIndex++] = creatureFrontBitmapD2PixelCount = getScaledBitmapPixelCount(creatureAsp->_byteWidthFront, creatureAsp->_heightFront, kScale20_D2);
+ _g639_derivedBitmapByteCount[derivedBitmapIndex++] = creatureFrontBitmapD2PixelCount = getScaledBitmapPixelCount(creatureAsp->_byteWidthFront, creatureAsp->_heightFront, k20_Scale_D2);
- if (getFlag(creatureGraphicInfo, kCreatureInfoGraphicMaskSide)) {
- _derivedBitmapByteCount[derivedBitmapIndex++] = getScaledBitmapPixelCount(creatureAsp->_byteWidthSide, creatureAsp->_heightSide, kScale16_D3);
- _derivedBitmapByteCount[derivedBitmapIndex++] = getScaledBitmapPixelCount(creatureAsp->_byteWidthSide, creatureAsp->_heightSide, kScale20_D2);
+ if (getFlag(creatureGraphicInfo, k0x0008_CreatureInfoGraphicMaskSide)) {
+ _g639_derivedBitmapByteCount[derivedBitmapIndex++] = getScaledBitmapPixelCount(creatureAsp->_byteWidthSide, creatureAsp->_heightSide, k16_Scale_D3);
+ _g639_derivedBitmapByteCount[derivedBitmapIndex++] = getScaledBitmapPixelCount(creatureAsp->_byteWidthSide, creatureAsp->_heightSide, k20_Scale_D2);
}
- if (getFlag(creatureGraphicInfo, kCreatureInfoGraphicMaskBack)) {
- _derivedBitmapByteCount[derivedBitmapIndex++] = creatureFrontBitmapD3PixelCount;
- _derivedBitmapByteCount[derivedBitmapIndex++] = creatureFrontBitmapD2PixelCount;
+ if (getFlag(creatureGraphicInfo, k0x0010_CreatureInfoGraphicMaskBack)) {
+ _g639_derivedBitmapByteCount[derivedBitmapIndex++] = creatureFrontBitmapD3PixelCount;
+ _g639_derivedBitmapByteCount[derivedBitmapIndex++] = creatureFrontBitmapD2PixelCount;
}
- if (getFlag(creatureGraphicInfo, kCreatureInfoGraphicMaskAttack)) {
- _derivedBitmapByteCount[derivedBitmapIndex++] = getScaledBitmapPixelCount(creatureAsp->_byteWidthAttack, creatureAsp->_heightAttack, kScale16_D3);
- _derivedBitmapByteCount[derivedBitmapIndex++] = getScaledBitmapPixelCount(creatureAsp->_byteWidthAttack, creatureAsp->_heightAttack, kScale20_D2);
+ if (getFlag(creatureGraphicInfo, k0x0020_CreatureInfoGraphicMaskAttack)) {
+ _g639_derivedBitmapByteCount[derivedBitmapIndex++] = getScaledBitmapPixelCount(creatureAsp->_byteWidthAttack, creatureAsp->_heightAttack, k16_Scale_D3);
+ _g639_derivedBitmapByteCount[derivedBitmapIndex++] = getScaledBitmapPixelCount(creatureAsp->_byteWidthAttack, creatureAsp->_heightAttack, k20_Scale_D2);
}
int16 additionalFronGraphicCount;
- if (additionalFronGraphicCount = getFlag(creatureGraphicInfo, kCreatureInfoGraphicMaskAdditional)) {
+ if (additionalFronGraphicCount = getFlag(creatureGraphicInfo, k0x0003_CreatureInfoGraphicMaskAdditional)) {
do {
- _derivedBitmapByteCount[derivedBitmapIndex++] = creatureAsp->_byteWidthFront * creatureAsp->_heightFront;
- _derivedBitmapByteCount[derivedBitmapIndex++] = getScaledBitmapPixelCount(creatureAsp->_byteWidthFront, creatureAsp->_heightFront, kScale16_D3);
- _derivedBitmapByteCount[derivedBitmapIndex++] = getScaledBitmapPixelCount(creatureAsp->_byteWidthFront, creatureAsp->_heightFront, kScale20_D2);
+ _g639_derivedBitmapByteCount[derivedBitmapIndex++] = creatureAsp->_byteWidthFront * creatureAsp->_heightFront;
+ _g639_derivedBitmapByteCount[derivedBitmapIndex++] = getScaledBitmapPixelCount(creatureAsp->_byteWidthFront, creatureAsp->_heightFront, k16_Scale_D3);
+ _g639_derivedBitmapByteCount[derivedBitmapIndex++] = getScaledBitmapPixelCount(creatureAsp->_byteWidthFront, creatureAsp->_heightFront, k20_Scale_D2);
} while (--additionalFronGraphicCount);
}
}
@@ -950,15 +947,15 @@ void DisplayMan::unpackGraphics() {
_bitmaps[i] = _bitmaps[i - 1] + getWidth(i - 1) * getHeight(i - 1);
loadIntoBitmap(i, _bitmaps[i]);
}
- _bitmaps[kFontGraphicIndice] = _bitmaps[532] + getWidth(532) * getHeight(532);
- loadFNT1intoBitmap(kFontGraphicIndice, _bitmaps[kFontGraphicIndice]);
+ _bitmaps[k557_FontGraphicIndice] = _bitmaps[532] + getWidth(532) * getHeight(532);
+ loadFNT1intoBitmap(k557_FontGraphicIndice, _bitmaps[k557_FontGraphicIndice]);
}
void DisplayMan::loadFNT1intoBitmap(uint16 index, byte* destBitmap) {
uint8 *data = _packedBitmaps + _packedItemPos[index];
for (uint16 i = 0; i < 6; i++) {
for (uint16 w = 0; w < 128; ++w) {
- *destBitmap++ = kColorBlack;
+ *destBitmap++ = k0_ColorBlack;
uint16 nextByte = *data++;
for (int16 pixel = 4; pixel >= 0; --pixel) {
@@ -1085,22 +1082,22 @@ void DisplayMan::flipBitmapVertical(byte *bitmap, uint16 width, uint16 height) {
}
byte* DisplayMan::getExplosionBitmap(uint16 explosionAspIndex, uint16 scale, int16& returnPixelWidth, int16& returnHeight) {
- ExplosionAspect *explAsp = &gExplosionAspects[explosionAspIndex];
+ ExplosionAspect *explAsp = &g211_ExplosionAspects[explosionAspIndex];
if (scale > 32)
scale = 32;
int16 pixelWidth = getScaledDimension(explAsp->_pixelWidth, scale);
int16 height = getScaledDimension(explAsp->_height, scale);
byte *bitmap;
- int16 derBitmapIndex = (explosionAspIndex * 14) + scale / 2 + kDerivedBitmapFirstExplosion - 2;
- if ((scale == 32) && (explosionAspIndex != kExplosionAspectSmoke)) {
- bitmap = getBitmap(explosionAspIndex + kFirstExplosionGraphicIndice);
+ int16 derBitmapIndex = (explosionAspIndex * 14) + scale / 2 + k438_DerivedBitmapFirstExplosion - 2;
+ if ((scale == 32) && (explosionAspIndex != k3_ExplosionAspectSmoke)) {
+ bitmap = getBitmap(explosionAspIndex + k348_FirstExplosionGraphicIndice);
} else if (isDerivedBitmapInCache(derBitmapIndex)) {
bitmap = getDerivedBitmap(derBitmapIndex);
} else {
- byte *nativeBitmap = getBitmap(MIN(explosionAspIndex, (uint16)kExplosionAspectPoison) + kFirstExplosionGraphicIndice);
+ byte *nativeBitmap = getBitmap(MIN(explosionAspIndex, (uint16)k2_ExplosionAspectPoison) + k348_FirstExplosionGraphicIndice);
bitmap = getDerivedBitmap(derBitmapIndex);
blitToBitmapShrinkWithPalChange(nativeBitmap, explAsp->_pixelWidth, explAsp->_height, bitmap, pixelWidth, height,
- (explosionAspIndex == kExplosionAspectSmoke) ? gPalChangeSmoke : gPalChangesNoChanges);
+ (explosionAspIndex == k3_ExplosionAspectSmoke) ? gPalChangeSmoke : gPalChangesNoChanges);
warning("IGNORED CODE: F0493_CACHE_AddDerivedBitmap");
}
@@ -1132,12 +1129,12 @@ uint16 DisplayMan::getHeight(uint16 index) {
void DisplayMan::drawWallSetBitmapWithoutTransparency(byte *bitmap, Frame &f) {
if (f._srcWidth)
- blitToScreen(bitmap, f._srcWidth, f._srcX, f._srcY, f._box, kColorNoTransparency, gDungeonViewport);
+ blitToScreen(bitmap, f._srcWidth, f._srcX, f._srcY, f._box, k255_ColorNoTransparency, gDungeonViewport);
}
void DisplayMan::drawWallSetBitmap(byte *bitmap, Frame &f) {
if (f._srcWidth)
- blitToScreen(bitmap, f._srcWidth, f._srcX, f._srcY, f._box, kColorFlesh, gDungeonViewport);
+ blitToScreen(bitmap, f._srcWidth, f._srcX, f._srcY, f._box, k10_ColorFlesh, gDungeonViewport);
}
@@ -1150,37 +1147,37 @@ void DisplayMan::drawSquareD3L(direction dir, int16 posX, int16 posY) {
switch (squareAspect[kElemAspect]) {
case kStairsFrontElemType:
if (squareAspect[kStairsUpAspect])
- drawFloorPitOrStairsBitmap(_g0675stairsNativeBitmapIndex_Up_Front_D3L, gStairFrames[kFrameStairsUpFront_D3L]);
+ drawFloorPitOrStairsBitmap(_g675_stairsNativeBitmapIndex_Up_Front_D3L, gStairFrames[kFrameStairsUpFront_D3L]);
else
- drawFloorPitOrStairsBitmap(_g0682stairsNativeBitmapIndex_Down_Front_D3L, gStairFrames[kFrameStairsDownFront_D3L]);
+ drawFloorPitOrStairsBitmap(_g682_stairsNativeBitmapIndex_Down_Front_D3L, gStairFrames[kFrameStairsDownFront_D3L]);
goto T0116015_redEagle;
case kWallElemType:
drawWallSetBitmap(_wallSetBitMaps[kWall_D3LCR], gFrameWalls[kViewSquare_D3L]);
- isDrawnWallOrnAnAlcove(squareAspect[kRightWallOrnOrdAspect], kViewWall_D3L_RIGHT);
- if (isDrawnWallOrnAnAlcove(squareAspect[kFrontWallOrnOrdAspect], kViewWall_D3L_FRONT)) {
- order = kCellOrder_Alcove;
+ isDrawnWallOrnAnAlcove(squareAspect[kRightWallOrnOrdAspect], k0_ViewWall_D3L_RIGHT);
+ if (isDrawnWallOrnAnAlcove(squareAspect[kFrontWallOrnOrdAspect], k2_ViewWall_D3L_FRONT)) {
+ order = k0x0000_CellOrder_Alcove;
goto T0116017_orangeElk;
}
return;
case kElementTypeDoorSide:
case kElementTypeStairsSide:
- order = kCellOrder_BackLeft_BackRight_FrontRight;
+ order = k0x0321_CellOrder_BackLeft_BackRight_FrontRight;
goto T0116016_blueToad;
case kElementTypeDoorFront:
warning("MISSING CODE: F0108_DUNGEONVIEW_DrawFloorOrnament");
- cthulhu(Thing(squareAspect[kFirstGroupOrObjectAspect]), dir, posX, posY, kViewSquare_D3L, kCellOrder_DoorPass1_BackLeft_BackRight);
+ cthulhu(Thing(squareAspect[kFirstGroupOrObjectAspect]), dir, posX, posY, kViewSquare_D3L, k0x0218_CellOrder_DoorPass1_BackLeft_BackRight);
drawWallSetBitmap(_wallSetBitMaps[kDoorFrameLeft_D3L], g0164Frame_DoorFrameLeft_D3L);
warning("MISSING CODE: F0111_DUNGEONVIEW_DrawDoor");
- order = kCellOrder_DoorPass2_FrontLeft_FrontRight;
+ order = k0x0349_CellOrder_DoorPass2_FrontLeft_FrontRight;
goto T0116017_orangeElk;
case kElementTypePit:
if (!squareAspect[kPitInvisibleAspect]) {
- drawFloorPitOrStairsBitmap(k049FloorPit_D3L_GraphicIndice, g0140FrameFloorPit_D3L);
+ drawFloorPitOrStairsBitmap(k49_FloorPit_D3L_GraphicIndice, g0140FrameFloorPit_D3L);
}
case kElementTypeTeleporter:
case kElementTypeCorridor:
T0116015_redEagle:
- order = kCellOrder_BackLeft_BackRight_FrontLeft_FrontRight;
+ order = k0x3421_CellOrder_BackLeft_BackRight_FrontLeft_FrontRight;
T0116016_blueToad:
warning("MISSING CODE: F0108_DUNGEONVIEW_DrawFloorOrnament");
T0116017_orangeElk:
@@ -1201,44 +1198,44 @@ void DisplayMan::drawSquareD3R(direction dir, int16 posX, int16 posY) {
switch (squareAspect[kElemAspect]) {
case kElementTypeStaisFront:
if (squareAspect[kStairsUpAspect]) {
- drawFloorPitOrStairsBitmapFlippedHorizontally(_g0675stairsNativeBitmapIndex_Up_Front_D3L, g0112FrameStairsUpFront_D3R);
+ drawFloorPitOrStairsBitmapFlippedHorizontally(_g675_stairsNativeBitmapIndex_Up_Front_D3L, g0112FrameStairsUpFront_D3R);
} else {
- drawFloorPitOrStairsBitmapFlippedHorizontally(_g0682stairsNativeBitmapIndex_Down_Front_D3L, g0123FrameStairsDownFront_D3R);
+ drawFloorPitOrStairsBitmapFlippedHorizontally(_g682_stairsNativeBitmapIndex_Down_Front_D3L, g0123FrameStairsDownFront_D3R);
}
goto T0117016;
case kElementTypeWall:
drawWallSetBitmap(_wallSetBitMaps[kWall_D3LCR], gFrameWalls[kViewSquare_D3R]);
- isDrawnWallOrnAnAlcove(squareAspect[kLeftWallOrnOrdAspect], kViewWall_D3R_LEFT);
- if (isDrawnWallOrnAnAlcove(squareAspect[kFrontWallOrnOrdAspect], kViewWall_D3R_FRONT)) {
- order = kCellOrder_Alcove;
+ isDrawnWallOrnAnAlcove(squareAspect[kLeftWallOrnOrdAspect], k1_ViewWall_D3R_LEFT);
+ if (isDrawnWallOrnAnAlcove(squareAspect[kFrontWallOrnOrdAspect], k4_ViewWall_D3R_FRONT)) {
+ order = k0x0000_CellOrder_Alcove;
goto T0117018;
}
return;
case kElementTypeDoorSide:
case kElementTypeStairsSide:
- order = kCellOrder_BackRight_BackLeft_FrontLeft;
+ order = k0x0412_CellOrder_BackRight_BackLeft_FrontLeft;
goto T0117017;
case kElementTypeDoorFront:
warning("MISSING CODE: F0108_DUNGEONVIEW_DrawFloorOrnament");
- cthulhu(Thing(squareAspect[kFirstGroupOrObjectAspect]), dir, posX, posY, kViewSquare_D3R, kCellOrder_DoorPass1_BackRight_BackLeft);
- memcpy(_tmpBitmap, _wallSetBitMaps[kDoorFrameLeft_D3L], 32 * 44);
+ cthulhu(Thing(squareAspect[kFirstGroupOrObjectAspect]), dir, posX, posY, kViewSquare_D3R, k0x0128_CellOrder_DoorPass1_BackRight_BackLeft);
+ memcpy(_g74_tmpBitmap, _wallSetBitMaps[kDoorFrameLeft_D3L], 32 * 44);
warning("MISSING CODE: F0103_DUNGEONVIEW_DrawDoorFrameBitmapFlippedHorizontally");
if (((Door*)_vm->_dungeonMan->_dunData._thingsData[kDoorThingType])[squareAspect[kDoorThingIndexAspect]].hasButton()) {
warning("MISSING CODE: F0110_DUNGEONVIEW_DrawDoorButton");
}
warning("MISSING CODE: F0111_DUNGEONVIEW_DrawDoor");
- order = kCellOrder_DoorPass2_FrontRight_FrontLeft;
+ order = k0x0439_CellOrder_DoorPass2_FrontRight_FrontLeft;
goto T0117018;
case kElementTypePit:
if (!squareAspect[kPitInvisibleAspect]) {
- drawFloorPitOrStairsBitmapFlippedHorizontally(k049FloorPit_D3L_GraphicIndice, g0142FrameFloorPit_D3R);
+ drawFloorPitOrStairsBitmapFlippedHorizontally(k49_FloorPit_D3L_GraphicIndice, g0142FrameFloorPit_D3R);
}
case kElementTypeTeleporter:
case kElementTypeCorridor:
T0117016:
- order = kCellOrder_BackRight_BackLeft_FrontRight_FrontLeft;
+ order = k0x4312_CellOrder_BackRight_BackLeft_FrontRight_FrontLeft;
T0117017:
- warning("MISSING CODE: F0108_DUNGEONVIEW_DrawFloorOrnament");
+ warning("MISSING CODE: F0108_DUNGEONVIEW_DrawFloorOrnament");
T0117018:
cthulhu(Thing(squareAspect[kFirstGroupOrObjectAspect]), dir, posX, posY, kViewSquare_D3R, order);
}
@@ -1253,13 +1250,13 @@ void DisplayMan::drawSquareD3C(direction dir, int16 posX, int16 posY) {
switch (squareAspect[0]) {
case kStairsFrontElemType:
if (squareAspect[kStairsUpAspect])
- drawFloorPitOrStairsBitmap(_g0676stairsNativeBitmapIndex_Up_Front_D3C, gStairFrames[kFrameStairsUpFront_D3C]);
+ drawFloorPitOrStairsBitmap(_g676_stairsNativeBitmapIndex_Up_Front_D3C, gStairFrames[kFrameStairsUpFront_D3C]);
else
- drawFloorPitOrStairsBitmap(_g0683stairsNativeBitmapIndex_Down_Front_D3C, gStairFrames[kFrameStairsDownFront_D3C]);
+ drawFloorPitOrStairsBitmap(_g683_stairsNativeBitmapIndex_Down_Front_D3C, gStairFrames[kFrameStairsDownFront_D3C]);
break;
case kWallElemType:
drawWallSetBitmapWithoutTransparency(_wallSetBitMaps[kWall_D3LCR], gFrameWalls[kViewSquare_D3C]);
- if (isDrawnWallOrnAnAlcove(squareAspect[kFrontWallOrnOrdAspect], kViewWall_D3C_FRONT)) {
+ if (isDrawnWallOrnAnAlcove(squareAspect[kFrontWallOrnOrdAspect], k3_ViewWall_D3C_FRONT)) {
//... missing code
}
break;
@@ -1273,19 +1270,19 @@ void DisplayMan::drawSquareD2L(direction dir, int16 posX, int16 posY) {
switch (squareAspect[0]) {
case kStairsFrontElemType:
if (squareAspect[kStairsUpAspect])
- drawFloorPitOrStairsBitmap(_g0677stairsNativeBitmapIndex_Up_Front_D2L, gStairFrames[kFrameStairsUpFront_D2L]);
+ drawFloorPitOrStairsBitmap(_g677_stairsNativeBitmapIndex_Up_Front_D2L, gStairFrames[kFrameStairsUpFront_D2L]);
else
- drawFloorPitOrStairsBitmap(_g0684stairsNativeBitmapIndex_Down_Front_D2L, gStairFrames[kFrameStairsDownFront_D2L]);
+ drawFloorPitOrStairsBitmap(_g684_stairsNativeBitmapIndex_Down_Front_D2L, gStairFrames[kFrameStairsDownFront_D2L]);
break;
case kWallElemType:
drawWallSetBitmap(_wallSetBitMaps[kWall_D2LCR], gFrameWalls[kViewSquare_D2L]);
- isDrawnWallOrnAnAlcove(squareAspect[kRightWallOrnOrdAspect], kViewWall_D2L_RIGHT);
- if (isDrawnWallOrnAnAlcove(squareAspect[kFrontWallOrnOrdAspect], kViewWall_D2L_FRONT)) {
+ isDrawnWallOrnAnAlcove(squareAspect[kRightWallOrnOrdAspect], k5_ViewWall_D2L_RIGHT);
+ if (isDrawnWallOrnAnAlcove(squareAspect[kFrontWallOrnOrdAspect], k7_ViewWall_D2L_FRONT)) {
// ... missing code
}
break;
case kStairsSideElemType:
- drawFloorPitOrStairsBitmap(_g0689stairsNativeBitmapIndex_Side_D2L, gStairFrames[kFrameStairsSide_D2L]);
+ drawFloorPitOrStairsBitmap(_g689_stairsNativeBitmapIndex_Side_D2L, gStairFrames[kFrameStairsSide_D2L]);
break;
default:
break;
@@ -1297,19 +1294,19 @@ void DisplayMan::drawSquareD2R(direction dir, int16 posX, int16 posY) {
switch (squareAspect[0]) {
case kStairsFrontElemType:
if (squareAspect[kStairsUpAspect])
- drawFloorPitOrStairsBitmapFlippedHorizontally(_g0677stairsNativeBitmapIndex_Up_Front_D2L, gStairFrames[kFrameStairsUpFront_D2R]);
+ drawFloorPitOrStairsBitmapFlippedHorizontally(_g677_stairsNativeBitmapIndex_Up_Front_D2L, gStairFrames[kFrameStairsUpFront_D2R]);
else
- drawFloorPitOrStairsBitmapFlippedHorizontally(_g0684stairsNativeBitmapIndex_Down_Front_D2L, gStairFrames[kFrameStairsDownFront_D2R]);
+ drawFloorPitOrStairsBitmapFlippedHorizontally(_g684_stairsNativeBitmapIndex_Down_Front_D2L, gStairFrames[kFrameStairsDownFront_D2R]);
break;
case kWallElemType:
drawWallSetBitmap(_wallSetBitMaps[kWall_D2LCR], gFrameWalls[kViewSquare_D2R]);
- isDrawnWallOrnAnAlcove(squareAspect[kLeftWallOrnOrdAspect], kViewWall_D2R_LEFT);
- if (isDrawnWallOrnAnAlcove(squareAspect[kFrontWallOrnOrdAspect], kViewWall_D2R_FRONT)) {
+ isDrawnWallOrnAnAlcove(squareAspect[kLeftWallOrnOrdAspect], k6_ViewWall_D2R_LEFT);
+ if (isDrawnWallOrnAnAlcove(squareAspect[kFrontWallOrnOrdAspect], k9_ViewWall_D2R_FRONT)) {
// ... missing code
}
break;
case kStairsSideElemType:
- drawFloorPitOrStairsBitmapFlippedHorizontally(_g0689stairsNativeBitmapIndex_Side_D2L, gStairFrames[kFrameStairsSide_D2R]);
+ drawFloorPitOrStairsBitmapFlippedHorizontally(_g689_stairsNativeBitmapIndex_Side_D2L, gStairFrames[kFrameStairsSide_D2R]);
break;
default:
break;
@@ -1321,13 +1318,13 @@ void DisplayMan::drawSquareD2C(direction dir, int16 posX, int16 posY) {
switch (squareAspect[0]) {
case kStairsFrontElemType:
if (squareAspect[kStairsUpAspect])
- drawFloorPitOrStairsBitmap(_g0678stairsNativeBitmapIndex_Up_Front_D2C, gStairFrames[kFrameStairsUpFront_D2C]);
+ drawFloorPitOrStairsBitmap(_g678_stairsNativeBitmapIndex_Up_Front_D2C, gStairFrames[kFrameStairsUpFront_D2C]);
else
- drawFloorPitOrStairsBitmap(_g0685stairsNativeBitmapIndex_Down_Front_D2C, gStairFrames[kFrameStairsDownFront_D2C]);
+ drawFloorPitOrStairsBitmap(_g685_stairsNativeBitmapIndex_Down_Front_D2C, gStairFrames[kFrameStairsDownFront_D2C]);
break;
case kWallElemType:
drawWallSetBitmapWithoutTransparency(_wallSetBitMaps[kWall_D2LCR], gFrameWalls[kViewSquare_D2C]);
- if (isDrawnWallOrnAnAlcove(squareAspect[kFrontWallOrnOrdAspect], kViewWall_D2C_FRONT)) {
+ if (isDrawnWallOrnAnAlcove(squareAspect[kFrontWallOrnOrdAspect], k8_ViewWall_D2C_FRONT)) {
// ... missing code
}
break;
@@ -1341,19 +1338,19 @@ void DisplayMan::drawSquareD1L(direction dir, int16 posX, int16 posY) {
switch (squareAspect[0]) {
case kStairsFrontElemType:
if (squareAspect[kStairsUpAspect])
- drawFloorPitOrStairsBitmap(_g0679stairsNativeBitmapIndex_Up_Front_D1L, gStairFrames[kFrameStairsUpFront_D1L]);
+ drawFloorPitOrStairsBitmap(_g679_stairsNativeBitmapIndex_Up_Front_D1L, gStairFrames[kFrameStairsUpFront_D1L]);
else
- drawFloorPitOrStairsBitmap(_g0686stairsNativeBitmapIndex_Down_Front_D1L, gStairFrames[kFrameStairsDownFront_D1L]);
+ drawFloorPitOrStairsBitmap(_g686_stairsNativeBitmapIndex_Down_Front_D1L, gStairFrames[kFrameStairsDownFront_D1L]);
break;
case kWallElemType:
drawWallSetBitmap(_wallSetBitMaps[kWall_D1LCR], gFrameWalls[kViewSquare_D1L]);
- isDrawnWallOrnAnAlcove(squareAspect[kRightWallOrnOrdAspect], kViewWall_D1L_RIGHT);
+ isDrawnWallOrnAnAlcove(squareAspect[kRightWallOrnOrdAspect], k10_ViewWall_D1L_RIGHT);
break;
case kStairsSideElemType:
if (squareAspect[kStairsUpAspect])
- drawFloorPitOrStairsBitmap(_g0690stairsNativeBitmapIndex_Up_Side_D1L, gStairFrames[kFrameStairsUpSide_D1L]);
+ drawFloorPitOrStairsBitmap(_g690_stairsNativeBitmapIndex_Up_Side_D1L, gStairFrames[kFrameStairsUpSide_D1L]);
else
- drawFloorPitOrStairsBitmap(_g0691stairsNativeBitmapIndex_Down_Side_D1L, gStairFrames[kFrameStairsDownSide_D1L]);
+ drawFloorPitOrStairsBitmap(_g691_stairsNativeBitmapIndex_Down_Side_D1L, gStairFrames[kFrameStairsDownSide_D1L]);
break;
default:
break;
@@ -1365,19 +1362,19 @@ void DisplayMan::drawSquareD1R(direction dir, int16 posX, int16 posY) {
switch (squareAspect[0]) {
case kStairsFrontElemType:
if (squareAspect[kStairsUpAspect])
- drawFloorPitOrStairsBitmapFlippedHorizontally(_g0679stairsNativeBitmapIndex_Up_Front_D1L, gStairFrames[kFrameStairsUpFront_D1R]);
+ drawFloorPitOrStairsBitmapFlippedHorizontally(_g679_stairsNativeBitmapIndex_Up_Front_D1L, gStairFrames[kFrameStairsUpFront_D1R]);
else
- drawFloorPitOrStairsBitmapFlippedHorizontally(_g0686stairsNativeBitmapIndex_Down_Front_D1L, gStairFrames[kFrameStairsDownFront_D1R]);
+ drawFloorPitOrStairsBitmapFlippedHorizontally(_g686_stairsNativeBitmapIndex_Down_Front_D1L, gStairFrames[kFrameStairsDownFront_D1R]);
break;
case kWallElemType:
drawWallSetBitmap(_wallSetBitMaps[kWall_D1LCR], gFrameWalls[kViewSquare_D1R]);
- isDrawnWallOrnAnAlcove(squareAspect[kLeftWallOrnOrdAspect], kViewWall_D1R_LEFT);
+ isDrawnWallOrnAnAlcove(squareAspect[kLeftWallOrnOrdAspect], k11_ViewWall_D1R_LEFT);
break;
case kStairsSideElemType:
if (squareAspect[kStairsUpAspect])
- drawFloorPitOrStairsBitmapFlippedHorizontally(_g0690stairsNativeBitmapIndex_Up_Side_D1L, gStairFrames[kFrameStairsUpSide_D1R]);
+ drawFloorPitOrStairsBitmapFlippedHorizontally(_g690_stairsNativeBitmapIndex_Up_Side_D1L, gStairFrames[kFrameStairsUpSide_D1R]);
else
- drawFloorPitOrStairsBitmapFlippedHorizontally(_g0691stairsNativeBitmapIndex_Down_Side_D1L, gStairFrames[kFrameStairsDownSide_D1R]);
+ drawFloorPitOrStairsBitmapFlippedHorizontally(_g691_stairsNativeBitmapIndex_Down_Side_D1L, gStairFrames[kFrameStairsDownSide_D1R]);
break;
default:
break;
@@ -1389,16 +1386,16 @@ void DisplayMan::drawSquareD1C(direction dir, int16 posX, int16 posY) {
switch (squareAspect[0]) {
case kStairsFrontElemType:
if (squareAspect[kStairsUpAspect])
- drawFloorPitOrStairsBitmap(_g0680stairsNativeBitmapIndex_Up_Front_D1C, gStairFrames[kFrameStairsUpFront_D1C]);
+ drawFloorPitOrStairsBitmap(_g680_stairsNativeBitmapIndex_Up_Front_D1C, gStairFrames[kFrameStairsUpFront_D1C]);
else
- drawFloorPitOrStairsBitmap(_g0687stairsNativeBitmapIndex_Down_Front_D1C, gStairFrames[kFrameStairsDownFront_D1C]);
+ drawFloorPitOrStairsBitmap(_g687_stairsNativeBitmapIndex_Down_Front_D1C, gStairFrames[kFrameStairsDownFront_D1C]);
break;
case kWallElemType:
_vm->_dungeonMan->_isFacingAlcove = false;
_vm->_dungeonMan->_isFacingViAltar = false;
_vm->_dungeonMan->_isFacingFountain = false;
drawWallSetBitmapWithoutTransparency(_wallSetBitMaps[kWall_D1LCR], gFrameWalls[kViewSquare_D1C]);
- if (isDrawnWallOrnAnAlcove(squareAspect[kFrontWallOrnOrdAspect], kViewWall_D1C_FRONT)) {
+ if (isDrawnWallOrnAnAlcove(squareAspect[kFrontWallOrnOrdAspect], k12_ViewWall_D1C_FRONT)) {
// .... code not yet implemneted
}
break;
@@ -1413,7 +1410,7 @@ void DisplayMan::drawSquareD0L(direction dir, int16 posX, int16 posY) {
switch (squareAspect[0]) {
case kStairsSideElemType:
if (squareAspect[kStairsUpAspect])
- drawFloorPitOrStairsBitmap(_g0692stairsNativeBitmapIndex_Side_D0L, gStairFrames[kFrameStairsSide_D0L]);
+ drawFloorPitOrStairsBitmap(_g692_stairsNativeBitmapIndex_Side_D0L, gStairFrames[kFrameStairsSide_D0L]);
break;
case kWallElemType:
drawWallSetBitmap(_wallSetBitMaps[kWall_D0L], gFrameWalls[kViewSquare_D0L]);
@@ -1429,7 +1426,7 @@ void DisplayMan::drawSquareD0R(direction dir, int16 posX, int16 posY) {
switch (squareAspect[0]) {
case kStairsSideElemType:
if (squareAspect[kStairsUpAspect])
- drawFloorPitOrStairsBitmapFlippedHorizontally(_g0692stairsNativeBitmapIndex_Side_D0L, gStairFrames[kFrameStairsSide_D0R]);
+ drawFloorPitOrStairsBitmapFlippedHorizontally(_g692_stairsNativeBitmapIndex_Side_D0L, gStairFrames[kFrameStairsSide_D0R]);
return;
case kWallElemType:
drawWallSetBitmap(_wallSetBitMaps[kWall_D0R], gFrameWalls[kViewSquare_D0R]);
@@ -1445,11 +1442,11 @@ void DisplayMan::drawSquareD0C(direction dir, int16 posX, int16 posY) {
switch (squareAspect[0]) {
case kStairsFrontElemType:
if (squareAspect[kStairsUpAspect]) {
- drawFloorPitOrStairsBitmap(_g0681stairsNativeBitmapIndex_Up_Front_D0C_Left, gStairFrames[kFrameStairsUpFront_D0L]);
- drawFloorPitOrStairsBitmapFlippedHorizontally(_g0681stairsNativeBitmapIndex_Up_Front_D0C_Left, gStairFrames[kFrameStairsUpFront_D0R]);
+ drawFloorPitOrStairsBitmap(_g681_stairsNativeBitmapIndex_Up_Front_D0C_Left, gStairFrames[kFrameStairsUpFront_D0L]);
+ drawFloorPitOrStairsBitmapFlippedHorizontally(_g681_stairsNativeBitmapIndex_Up_Front_D0C_Left, gStairFrames[kFrameStairsUpFront_D0R]);
} else {
- drawFloorPitOrStairsBitmap(_g0688stairsNativeBitmapIndex_Down_Front_D0C_Left, gStairFrames[kFrameStairsDownFront_D0L]);
- drawFloorPitOrStairsBitmapFlippedHorizontally(_g0688stairsNativeBitmapIndex_Down_Front_D0C_Left, gStairFrames[kFrameStairsDownFront_D0R]);
+ drawFloorPitOrStairsBitmap(_g688_stairsNativeBitmapIndex_Down_Front_D0C_Left, gStairFrames[kFrameStairsDownFront_D0L]);
+ drawFloorPitOrStairsBitmapFlippedHorizontally(_g688_stairsNativeBitmapIndex_Down_Front_D0C_Left, gStairFrames[kFrameStairsDownFront_D0R]);
}
break;
default:
@@ -1458,13 +1455,13 @@ void DisplayMan::drawSquareD0C(direction dir, int16 posX, int16 posY) {
}
void DisplayMan::drawDungeon(direction dir, int16 posX, int16 posY) {
- loadPalette(gPalEntrance);
+ loadPalette(g20_PalEntrance);
// TODO: this is a global variable, set from here
bool flippedFloorCeiling = (posX + posY + dir) & 1;
// NOTE: this can hold every bitmap, width and height is "flexible"
byte *tmpBitmap = new byte[305 * 111];
- clearBitmap(tmpBitmap, 305, 111, kColorBlack);
+ clearBitmap(tmpBitmap, 305, 111, k10_ColorFlesh);
for (int16 i = 0; i < 6; ++i)
_vm->_dungeonMan->_dungeonViewClickableBoxes[i].setToZero();
@@ -1475,19 +1472,19 @@ void DisplayMan::drawDungeon(direction dir, int16 posX, int16 posY) {
if (flippedFloorCeiling) {
uint16 w = gFloorFrame._srcWidth, h = gFloorFrame._srcHeight;
- blitToBitmap(_floorBitmap, w, h, tmpBitmap, w);
+ blitToBitmap(_g84_floorBitmap, w, h, tmpBitmap, w);
flipBitmapHorizontal(tmpBitmap, w, h);
drawWallSetBitmap(tmpBitmap, gFloorFrame);
- drawWallSetBitmap(_ceilingBitmap, gCeilingFrame);
+ drawWallSetBitmap(_g85_ceilingBitmap, gCeilingFrame);
for (uint16 i = 0; i <= kWall_D3LCR - kWall_D0R; ++i)
_wallSetBitMaps[i + kWall_D0R] = _wallSetBitMaps[i + kWall_D0R_Flipped];
} else {
uint16 w = gCeilingFrame._srcWidth, h = gCeilingFrame._srcHeight;
- blitToBitmap(_ceilingBitmap, w, h, tmpBitmap, w);
+ blitToBitmap(_g85_ceilingBitmap, w, h, tmpBitmap, w);
flipBitmapHorizontal(tmpBitmap, w, h);
drawWallSetBitmap(tmpBitmap, gCeilingFrame);
- drawWallSetBitmap(_floorBitmap, gFloorFrame);
+ drawWallSetBitmap(_g84_floorBitmap, gFloorFrame);
}
if (_vm->_dungeonMan->getRelSquareType(dir, 3, -2, posX, posY) == kWallElemType)
@@ -1548,9 +1545,9 @@ void DisplayMan::clearBitmap(byte *bitmap, uint16 width, uint16 height, Color co
void DisplayMan::loadFloorSet(FloorSet set) {
// there are 2 bitmaps per set, first one is at 75
- GraphicIndice indice = (GraphicIndice)(kFirstFloorSet + (kFloorSetGraphicCount * set));
- _floorBitmap = _bitmaps[indice];
- _ceilingBitmap = _bitmaps[indice + 1];
+ GraphicIndice indice = (GraphicIndice)(kFirstFloorSet + (k2_FloorSetGraphicCount * set));
+ _g84_floorBitmap = _bitmaps[indice];
+ _g85_ceilingBitmap = _bitmaps[indice + 1];
}
@@ -1558,8 +1555,8 @@ Box gBoxWallBitmap_D3LCR = Box(0, 115, 0, 50); // @ G0161_s_Graphic558_Box_WallB
Box gBoxWallBitmap_D2LCR = Box(0, 135, 0, 70); // @ G0162_s_Graphic558_Box_WallBitmap_D2LCR
void DisplayMan::loadWallSet(WallSet set) {
- uint16 firstIndice = (set * kWallSetGraphicCount) + kFirstWallSet;
- for (uint16 i = 0; i < kWallSetGraphicCount; ++i) {
+ uint16 firstIndice = (set * k13_WallSetGraphicCount) + kFirstWallSet;
+ for (uint16 i = 0; i < k13_WallSetGraphicCount; ++i) {
_wallSetBitMaps[i] = _bitmaps[i + firstIndice];
}
@@ -1613,31 +1610,31 @@ void DisplayMan::loadCurrentMapGraphics() {
// the original loads some flipped walls here, I moved it to loadWallSet
{
- int16 val = _vm->_dungeonMan->_currMap._map->_wallSet * kStairsGraphicCount + kFirstStairs;
- _g0675stairsNativeBitmapIndex_Up_Front_D3L = val++;
- _g0676stairsNativeBitmapIndex_Up_Front_D3C = val++;
- _g0677stairsNativeBitmapIndex_Up_Front_D2L = val++;
- _g0678stairsNativeBitmapIndex_Up_Front_D2C = val++;
- _g0679stairsNativeBitmapIndex_Up_Front_D1L = val++;
- _g0680stairsNativeBitmapIndex_Up_Front_D1C = val++;
- _g0681stairsNativeBitmapIndex_Up_Front_D0C_Left = val++;
- _g0682stairsNativeBitmapIndex_Down_Front_D3L = val++;
- _g0683stairsNativeBitmapIndex_Down_Front_D3C = val++;
- _g0684stairsNativeBitmapIndex_Down_Front_D2L = val++;
- _g0685stairsNativeBitmapIndex_Down_Front_D2C = val++;
- _g0686stairsNativeBitmapIndex_Down_Front_D1L = val++;
- _g0687stairsNativeBitmapIndex_Down_Front_D1C = val++;
- _g0688stairsNativeBitmapIndex_Down_Front_D0C_Left = val++;
- _g0689stairsNativeBitmapIndex_Side_D2L = val++;
- _g0690stairsNativeBitmapIndex_Up_Side_D1L = val++;
- _g0691stairsNativeBitmapIndex_Down_Side_D1L = val++;
- _g0692stairsNativeBitmapIndex_Side_D0L = val++;
+ int16 val = _vm->_dungeonMan->_currMap._map->_wallSet * k18_StairsGraphicCount + kFirstStairs;
+ _g675_stairsNativeBitmapIndex_Up_Front_D3L = val++;
+ _g676_stairsNativeBitmapIndex_Up_Front_D3C = val++;
+ _g677_stairsNativeBitmapIndex_Up_Front_D2L = val++;
+ _g678_stairsNativeBitmapIndex_Up_Front_D2C = val++;
+ _g679_stairsNativeBitmapIndex_Up_Front_D1L = val++;
+ _g680_stairsNativeBitmapIndex_Up_Front_D1C = val++;
+ _g681_stairsNativeBitmapIndex_Up_Front_D0C_Left = val++;
+ _g682_stairsNativeBitmapIndex_Down_Front_D3L = val++;
+ _g683_stairsNativeBitmapIndex_Down_Front_D3C = val++;
+ _g684_stairsNativeBitmapIndex_Down_Front_D2L = val++;
+ _g685_stairsNativeBitmapIndex_Down_Front_D2C = val++;
+ _g686_stairsNativeBitmapIndex_Down_Front_D1L = val++;
+ _g687_stairsNativeBitmapIndex_Down_Front_D1C = val++;
+ _g688_stairsNativeBitmapIndex_Down_Front_D0C_Left = val++;
+ _g689_stairsNativeBitmapIndex_Side_D2L = val++;
+ _g690_stairsNativeBitmapIndex_Up_Side_D1L = val++;
+ _g691_stairsNativeBitmapIndex_Down_Side_D1L = val++;
+ _g692_stairsNativeBitmapIndex_Side_D0L = val++;
}
- for (int16 i = 0; i < kAlcoveOrnCount; ++i)
- _currMapAlcoveOrnIndices[i] = -1;
- for (int16 i = 0; i < kFountainOrnCount; ++i)
- _currMapFountainOrnIndices[i] = -1;
+ for (int16 i = 0; i < k3_AlcoveOrnCount; ++i)
+ _g267_currMapAlcoveOrnIndices[i] = -1;
+ for (int16 i = 0; i < k1_FountainOrnCount; ++i)
+ _g268_currMapFountainOrnIndices[i] = -1;
@@ -1646,47 +1643,47 @@ void DisplayMan::loadCurrentMapGraphics() {
uint16 fountainCount = 0;
Map &currMap = *_vm->_dungeonMan->_currMap._map;
- _currMapViAltarIndex = -1;
+ _g266_currMapViAltarIndex = -1;
for (uint16 i = 0; i < currMap._wallOrnCount; ++i) {
- uint16 ornIndice = _currMapWallOrnIndices[i];
+ uint16 ornIndice = _g261_currMapWallOrnIndices[i];
uint16 nativeIndice = kFirstWallOrn + ornIndice * 2;
- _currMapWallOrnInfo[i][kNativeBitmapIndex] = nativeIndice;
- for (uint16 ornCounter = 0; ornCounter < kAlcoveOrnCount; ++ornCounter) {
+ _g101_currMapWallOrnInfo[i][k0_NativeBitmapIndex] = nativeIndice;
+ for (uint16 ornCounter = 0; ornCounter < k3_AlcoveOrnCount; ++ornCounter) {
if (ornIndice == gAlcoveOrnIndices[ornCounter]) {
- _currMapAlcoveOrnIndices[alcoveCount++] = i;
+ _g267_currMapAlcoveOrnIndices[alcoveCount++] = i;
if (ornIndice == 2)
- _currMapViAltarIndex = i;
+ _g266_currMapViAltarIndex = i;
}
}
- for (uint16 ornCounter = 0; ornCounter < kFountainOrnCount; ++ornCounter)
+ for (uint16 ornCounter = 0; ornCounter < k1_FountainOrnCount; ++ornCounter)
if (ornIndice == gFountainOrnIndices[ornCounter])
- _currMapFountainOrnIndices[fountainCount++] = i;
+ _g268_currMapFountainOrnIndices[fountainCount++] = i;
- _currMapWallOrnInfo[i][kCoordinateSet] = gWallOrnCoordSetIndices[ornIndice];
+ _g101_currMapWallOrnInfo[i][k1_CoordinateSet] = gWallOrnCoordSetIndices[ornIndice];
}
for (uint16 i = 0; i < currMap._floorOrnCount; ++i) {
- uint16 ornIndice = _currMapFloorOrnIndices[i];
+ uint16 ornIndice = _g262_currMapFloorOrnIndices[i];
uint16 nativeIndice = kFirstFloorOrn + ornIndice * 6;
- _currMapFloorOrnInfo[i][kNativeBitmapIndex] = nativeIndice;
- _currMapFloorOrnInfo[i][kCoordinateSet] = gFloorOrnCoordSetIndices[ornIndice];
+ _g102_currMapFloorOrnInfo[i][k0_NativeBitmapIndex] = nativeIndice;
+ _g102_currMapFloorOrnInfo[i][k1_CoordinateSet] = gFloorOrnCoordSetIndices[ornIndice];
}
for (uint16 i = 0; i < currMap._doorOrnCount; ++i) {
- uint16 ornIndice = _currMapDoorOrnIndices[i];
+ uint16 ornIndice = _g263_currMapDoorOrnIndices[i];
uint16 nativeIndice = kFirstDoorOrn + ornIndice;
- _currMapDoorOrnInfo[i][kNativeBitmapIndex] = nativeIndice;
- _currMapDoorOrnInfo[i][kCoordinateSet] = gDoorOrnCoordIndices[ornIndice];
+ _g103_currMapDoorOrnInfo[i][k0_NativeBitmapIndex] = nativeIndice;
+ _g103_currMapDoorOrnInfo[i][k1_CoordinateSet] = gDoorOrnCoordIndices[ornIndice];
}
applyCreatureReplColors(9, 8);
applyCreatureReplColors(10, 12);
for (uint16 creatureType = 0; creatureType < currMap._creatureTypeCount; ++creatureType) {
- CreatureAspect &aspect = gCreatureAspects[_currMapAllowedCreatureTypes[creatureType]];
+ CreatureAspect &aspect = gCreatureAspects[_g264_currMapAllowedCreatureTypes[creatureType]];
uint16 replColorOrdinal = aspect.getReplColour9();
if (replColorOrdinal)
applyCreatureReplColors(9, _vm->ordinalToIndex(replColorOrdinal));
@@ -1698,7 +1695,7 @@ void DisplayMan::loadCurrentMapGraphics() {
void DisplayMan::applyCreatureReplColors(int replacedColor, int replacementColor) {
for (int16 i = 0; i < 6; ++i)
- gPalDungeonView[i][replacedColor] = gCreatureReplColorSets[replacementColor]._RGBColor[i];
+ g21_PalDungeonView[i][replacedColor] = gCreatureReplColorSets[replacementColor]._RGBColor[i];
gPalChangesCreature_D2[replacedColor] = gCreatureReplColorSets[replacementColor]._D2ReplacementColor;
gPalChangesCreature_D3[replacedColor] = gCreatureReplColorSets[replacementColor]._D3ReplacementColor;
@@ -1706,15 +1703,15 @@ void DisplayMan::applyCreatureReplColors(int replacedColor, int replacementColor
void DisplayMan::drawFloorPitOrStairsBitmap(uint16 nativeIndex, Frame &f) {
if (f._srcWidth) {
- blitToScreen(_bitmaps[nativeIndex], f._srcWidth, f._srcX, f._srcY, f._box, kColorFlesh, gDungeonViewport);
+ blitToScreen(_bitmaps[nativeIndex], f._srcWidth, f._srcX, f._srcY, f._box, k10_ColorFlesh, gDungeonViewport);
}
}
void DisplayMan::drawFloorPitOrStairsBitmapFlippedHorizontally(uint16 nativeIndex, Frame &f) {
if (f._srcWidth) {
- blitToBitmap(_bitmaps[nativeIndex], f._srcWidth, f._srcHeight, _tmpBitmap, f._srcWidth);
- flipBitmapHorizontal(_tmpBitmap, f._srcWidth, f._srcHeight);
- blitToScreen(_tmpBitmap, f._srcWidth, f._srcX, f._srcY, f._box, kColorFlesh, gDungeonViewport);
+ blitToBitmap(_bitmaps[nativeIndex], f._srcWidth, f._srcHeight, _g74_tmpBitmap, f._srcWidth);
+ flipBitmapHorizontal(_g74_tmpBitmap, f._srcWidth, f._srcHeight);
+ blitToScreen(_g74_tmpBitmap, f._srcWidth, f._srcX, f._srcY, f._box, k10_ColorFlesh, gDungeonViewport);
}
}
@@ -1766,24 +1763,24 @@ bool DisplayMan::isDrawnWallOrnAnAlcove(int16 wallOrnOrd, ViewWall viewWallIndex
if (wallOrnOrd) {
int16 var_X;
int16 wallOrnIndex = wallOrnOrd - 1;
- int16 nativeBitmapIndex = _currMapWallOrnInfo[wallOrnIndex][kNativeBitmapIndex];
+ int16 nativeBitmapIndex = _g101_currMapWallOrnInfo[wallOrnIndex][k0_NativeBitmapIndex];
- uint16 *coordinateSetA = gWallOrnCoordSets[_currMapWallOrnInfo[wallOrnIndex][kCoordinateSet]][viewWallIndex];
+ uint16 *coordinateSetA = gWallOrnCoordSets[_g101_currMapWallOrnInfo[wallOrnIndex][k1_CoordinateSet]][viewWallIndex];
isAlcove = _vm->_dungeonMan->isWallOrnAnAlcove(wallOrnIndex);
isInscription = (wallOrnIndex == _vm->_dungeonMan->_currMapInscriptionWallOrnIndex);
if (isInscription) {
- _vm->_dungeonMan->decodeText((char*)inscriptionString, _inscriptionThing, kTextTypeInscription);
+ _vm->_dungeonMan->decodeText((char*)inscriptionString, _g290_inscriptionThing, kTextTypeInscription);
}
- if (viewWallIndex >= kViewWall_D1L_RIGHT) {
- if (viewWallIndex == kViewWall_D1C_FRONT) {
+ if (viewWallIndex >= k10_ViewWall_D1L_RIGHT) {
+ if (viewWallIndex == k12_ViewWall_D1C_FRONT) {
if (isInscription) {
Frame &D1CFrame = gFrameWalls[kViewSquare_D1C];
blitToScreen(_wallSetBitMaps[kWall_D1LCR], D1CFrame._srcWidth, 94, 28, gBoxWallPatchBehindInscription._x1, gBoxWallPatchBehindInscription._x2,
- gBoxWallPatchBehindInscription._y1, gBoxWallPatchBehindInscription._y2, kColorNoTransparency, gDungeonViewport);
+ gBoxWallPatchBehindInscription._y1, gBoxWallPatchBehindInscription._y2, k255_ColorNoTransparency, gDungeonViewport);
unsigned char *string = inscriptionString;
- bitmapRed = _bitmaps[kInscriptionFontIndice];
+ bitmapRed = _bitmaps[k120_InscriptionFontIndice];
int16 textLineIndex = 0;
do {
int16 characterCount = 0;
@@ -1794,7 +1791,7 @@ bool DisplayMan::isDrawnWallOrnAnAlcove(int16 wallOrnOrd, ViewWall viewWallIndex
frame._box._x2 = (frame._box._x1 = 112 - (characterCount * 4)) + 7;
frame._box._y1 = (frame._box._y2 = gInscriptionLineY[textLineIndex++]) - 7;
while (characterCount--) {
- blitToScreen(bitmapRed, 288, (*string++) * 8, 0, frame._box, kColorFlesh, gDungeonViewport);
+ blitToScreen(bitmapRed, 288, (*string++) * 8, 0, frame._box, k10_ColorFlesh, gDungeonViewport);
frame._box._x1 += 8;
frame._box._x2 += 8;
}
@@ -1803,58 +1800,58 @@ bool DisplayMan::isDrawnWallOrnAnAlcove(int16 wallOrnOrd, ViewWall viewWallIndex
}
nativeBitmapIndex++;
- _vm->_dungeonMan->_dungeonViewClickableBoxes[kViewCellDoorButtonOrWallOrn]._x1 = coordinateSetA[0];
- _vm->_dungeonMan->_dungeonViewClickableBoxes[kViewCellDoorButtonOrWallOrn]._x2 = coordinateSetA[1];
- _vm->_dungeonMan->_dungeonViewClickableBoxes[kViewCellDoorButtonOrWallOrn]._y1 = coordinateSetA[2];
- _vm->_dungeonMan->_dungeonViewClickableBoxes[kViewCellDoorButtonOrWallOrn]._y2 = coordinateSetA[3];
+ _vm->_dungeonMan->_dungeonViewClickableBoxes[k5_ViewCellDoorButtonOrWallOrn]._x1 = coordinateSetA[0];
+ _vm->_dungeonMan->_dungeonViewClickableBoxes[k5_ViewCellDoorButtonOrWallOrn]._x2 = coordinateSetA[1];
+ _vm->_dungeonMan->_dungeonViewClickableBoxes[k5_ViewCellDoorButtonOrWallOrn]._y1 = coordinateSetA[2];
+ _vm->_dungeonMan->_dungeonViewClickableBoxes[k5_ViewCellDoorButtonOrWallOrn]._y2 = coordinateSetA[3];
_vm->_dungeonMan->_isFacingAlcove = isAlcove;
- _vm->_dungeonMan->_isFacingViAltar = (wallOrnIndex == _currMapViAltarIndex);
+ _vm->_dungeonMan->_isFacingViAltar = (wallOrnIndex == _g266_currMapViAltarIndex);
_vm->_dungeonMan->_isFacingFountain = false;
- for (int16 fountainOrnIndex = 0; fountainOrnIndex < kFountainOrnCount; ++fountainOrnIndex) {
- if (_currMapFountainOrnIndices[fountainOrnIndex] == wallOrnIndex) {
+ for (int16 fountainOrnIndex = 0; fountainOrnIndex < k1_FountainOrnCount; ++fountainOrnIndex) {
+ if (_g268_currMapFountainOrnIndices[fountainOrnIndex] == wallOrnIndex) {
_vm->_dungeonMan->_isFacingFountain = true;
break;
}
}
}
bitmapGreen = _bitmaps[nativeBitmapIndex];
- if (viewWallIndex == kViewWall_D1R_LEFT) {
- blitToBitmap(bitmapGreen, coordinateSetA[4], coordinateSetA[5], _tmpBitmap, coordinateSetA[4]);
- flipBitmapHorizontal(_tmpBitmap, coordinateSetA[4], coordinateSetA[5]);
- bitmapGreen = _tmpBitmap;
+ if (viewWallIndex == k11_ViewWall_D1R_LEFT) {
+ blitToBitmap(bitmapGreen, coordinateSetA[4], coordinateSetA[5], _g74_tmpBitmap, coordinateSetA[4]);
+ flipBitmapHorizontal(_g74_tmpBitmap, coordinateSetA[4], coordinateSetA[5]);
+ bitmapGreen = _g74_tmpBitmap;
}
var_X = 0;
} else {
coordinateSetOffset = 0;
uint16 *coordSetB;
- int16 wallOrnCoordSetIndex = _currMapWallOrnInfo[wallOrnIndex][kCoordinateSet];
- flipHorizontal = (viewWallIndex == kViewWall_D2R_LEFT) || (viewWallIndex == kViewWall_D3R_LEFT);
+ int16 wallOrnCoordSetIndex = _g101_currMapWallOrnInfo[wallOrnIndex][k1_CoordinateSet];
+ flipHorizontal = (viewWallIndex == k6_ViewWall_D2R_LEFT) || (viewWallIndex == k1_ViewWall_D3R_LEFT);
if (flipHorizontal) {
- coordSetB = gWallOrnCoordSets[wallOrnCoordSetIndex][kViewWall_D1R_LEFT];
- } else if ((viewWallIndex == kViewWall_D2L_RIGHT) || (viewWallIndex == kViewWall_D3L_RIGHT)) {
- coordSetB = gWallOrnCoordSets[wallOrnCoordSetIndex][kViewWall_D1L_RIGHT];
+ coordSetB = gWallOrnCoordSets[wallOrnCoordSetIndex][k11_ViewWall_D1R_LEFT];
+ } else if ((viewWallIndex == k5_ViewWall_D2L_RIGHT) || (viewWallIndex == k0_ViewWall_D3L_RIGHT)) {
+ coordSetB = gWallOrnCoordSets[wallOrnCoordSetIndex][k10_ViewWall_D1L_RIGHT];
} else {
nativeBitmapIndex++;
- coordSetB = gWallOrnCoordSets[wallOrnCoordSetIndex][kViewWall_D1C_FRONT];
- if (viewWallIndex == kViewWall_D2L_FRONT) {
+ coordSetB = gWallOrnCoordSets[wallOrnCoordSetIndex][k12_ViewWall_D1C_FRONT];
+ if (viewWallIndex == k7_ViewWall_D2L_FRONT) {
coordinateSetOffset = 6;
- } else if (viewWallIndex == kViewWall_D2R_FRONT) {
+ } else if (viewWallIndex == k9_ViewWall_D2R_FRONT) {
coordinateSetOffset = -6;
}
}
int16 pixelWidth = (coordinateSetA + coordinateSetOffset)[1] - (coordinateSetA + coordinateSetOffset)[0];
- blitToBitmapShrinkWithPalChange(_bitmaps[nativeBitmapIndex], coordSetB[4] << 1, coordSetB[5], _tmpBitmap, pixelWidth + 1, coordinateSetA[5],
- (viewWallIndex <= kViewWall_D3R_FRONT) ? gPalChangesDoorButtonAndWallOrn_D3 : gPalChangesDoorButtonAndWallOrn_D2);
+ blitToBitmapShrinkWithPalChange(_bitmaps[nativeBitmapIndex], coordSetB[4] << 1, coordSetB[5], _g74_tmpBitmap, pixelWidth + 1, coordinateSetA[5],
+ (viewWallIndex <= k4_ViewWall_D3R_FRONT) ? gPalChangesDoorButtonAndWallOrn_D3 : gPalChangesDoorButtonAndWallOrn_D2);
bitmapGreen = _bitmaps[nativeBitmapIndex];
var_X = pixelWidth;
if (flipHorizontal) {
- if (bitmapGreen != _tmpBitmap)
- blitToBitmap(bitmapGreen, coordSetB[4], coordSetB[5], _tmpBitmap, coordSetB[4]);
- flipBitmapHorizontal(_tmpBitmap, coordSetB[4], coordSetB[5]);
- bitmapGreen = _tmpBitmap;
+ if (bitmapGreen != _g74_tmpBitmap)
+ blitToBitmap(bitmapGreen, coordSetB[4], coordSetB[5], _g74_tmpBitmap, coordSetB[4]);
+ flipBitmapHorizontal(_g74_tmpBitmap, coordSetB[4], coordSetB[5]);
+ bitmapGreen = _g74_tmpBitmap;
var_X = 15 - (var_X & 0xF);
- } else if (viewWallIndex == kViewWall_D2L_FRONT) {
+ } else if (viewWallIndex == k7_ViewWall_D2L_FRONT) {
var_X -= coordinateSetA[1] - coordinateSetA[0];
} else {
var_X = 0;
@@ -1883,12 +1880,12 @@ bool DisplayMan::isDrawnWallOrnAnAlcove(int16 wallOrnOrd, ViewWall viewWallIndex
coordinateSetA[3] = gUnreadableInscriptionBoxY2[gWallOrnDerivedBitmapIndexIncrement[viewWallIndex] * 3 + unreadableTextLineCount - 1];
}
}
- blitToScreen(bitmapGreen, coordinateSetA[4], var_X, 0, coordinateSetA[0], coordinateSetA[1], coordinateSetA[2], coordinateSetA[3], kColorFlesh, gDungeonViewport);
+ blitToScreen(bitmapGreen, coordinateSetA[4], var_X, 0, coordinateSetA[0], coordinateSetA[1], coordinateSetA[2], coordinateSetA[3], k10_ColorFlesh, gDungeonViewport);
- if ((viewWallIndex == kViewWall_D1C_FRONT) && _championPortraitOrdinal--) {
+ if ((viewWallIndex == k12_ViewWall_D1C_FRONT) && _g289_championPortraitOrdinal--) {
Box &box = gBoxChampionPortraitOnWall;
- blitToScreen(_bitmaps[kChampionPortraitsIndice], 256, (_championPortraitOrdinal & 0x7) << 5, (_championPortraitOrdinal >> 3) * 29, box._x1, box._x2, box._y1, box._y2,
- kColorDarkGary, gDungeonViewport);
+ blitToScreen(_bitmaps[k26_ChampionPortraitsIndice], 256, (_g289_championPortraitOrdinal & 0x7) << 5, (_g289_championPortraitOrdinal >> 3) * 29, box._x1, box._x2, box._y1, box._y2,
+ k1_ColorDarkGary, gDungeonViewport);
}
return isAlcove;
}
@@ -1935,15 +1932,15 @@ void DisplayMan::drawField(FieldAspect* fieldAspect, Box& box) {
if (fieldAspect->_mask == kMaskFieldAspectNoMask) {
bitmapMask = nullptr;
} else {
- bitmapMask = dispMan._tmpBitmap;
- memcpy(bitmapMask, dispMan.getBitmap(kFieldMask_D3R_GraphicIndice + getFlag(fieldAspect->_mask, kMaskFieldAspectIndex)),
+ bitmapMask = dispMan._g74_tmpBitmap;
+ memcpy(bitmapMask, dispMan.getBitmap(k69_FieldMask_D3R_GraphicIndice + getFlag(fieldAspect->_mask, kMaskFieldAspectIndex)),
fieldAspect->_height * fieldAspect->_pixelWidth * sizeof(bitmapMask[0]));
if (getFlag(fieldAspect->_mask, kMaskFieldAspectFlipMask)) {
dispMan.flipBitmapHorizontal(bitmapMask, fieldAspect->_pixelWidth, fieldAspect->_height);
}
}
- byte *bitmap = dispMan.getBitmap(kFieldTeleporterGraphicIndice + fieldAspect->_nativeBitmapRelativeIndex);
+ byte *bitmap = dispMan.getBitmap(k73_FieldTeleporterGraphicIndice + fieldAspect->_nativeBitmapRelativeIndex);
warning("MISSING CODE: F0133_VIDEO_BlitBoxFilledWithMaskedBitmap");
warning("IGNORED CODE: F0491_CACHE_IsDerivedBitmapInCache, F0493_CACHE_AddDerivedBitmap, F0480_CACHE_ReleaseBlock");
@@ -2114,7 +2111,7 @@ int16 gCenteredExplosionCoordinates[15][2] = { // @ G0225_aai_Graphic558_Centere
#define kBlitDoNotUseMask 0x0080 // @ MASK0x0080_DO_NOT_USE_MASK
void DisplayMan::cthulhu(Thing thingParam, direction directionParam, int16 mapXpos,
- int16 mapYpos, int16 viewSquareIndex, uint16 orderedViewCellOrdinals) {
+ int16 mapYpos, int16 viewSquareIndex, uint16 orderedViewCellOrdinals) {
DungeonMan &dunMan = *_vm->_dungeonMan;
@@ -2232,7 +2229,7 @@ void DisplayMan::cthulhu(Thing thingParam, direction directionParam, int16 mapXp
drawCreaturesCompleted = sqaureHasProjectile = squareHasExplosion = false;
cellCounter = 0;
firstThingToDraw = thingParam;
- if (getFlag(orderedViewCellOrdinals, kCellOrder_DoorFront)) { /* If the function call is to draw objects on a door square viewed from the front */
+ if (getFlag(orderedViewCellOrdinals, k0x0008_CellOrder_DoorFront)) { /* If the function call is to draw objects on a door square viewed from the front */
/* Two function calls are made in that case to draw objects on both sides of the door frame.
The door and its frame are drawn between the two calls. This value indicates the drawing pass so that
creatures are drawn in the right order and so that Fluxcages are not drawn twice */
@@ -2250,7 +2247,7 @@ creatures are drawn in the right order and so that Fluxcages are not drawn twice
do {
/* Draw objects */
if (drawAlcoveObjects) {
- AL_2_viewCell = kViewCellAlcove; /* Index of coordinates to draw objects in alcoves */
+ AL_2_viewCell = k4_ViewCellAlcove; /* Index of coordinates to draw objects in alcoves */
cellYellowBear = returnOppositeDir(directionParam); /* Alcove is on the opposite direction of the viewing direction */
objectShiftIndex = 2;
} else {
@@ -2283,46 +2280,46 @@ creatures are drawn in the right order and so that Fluxcages are not drawn twice
/* Square where objects are visible and object is located on cell being processed */
if ((viewSquareIndex >= kViewSquare_D3C) && (viewSquareIndex <= kViewSquare_D0C) && (thingParam.getCell() == cellYellowBear)) {
objectAspect = &(gObjectAspects[gObjectInfo[dunMan.getObjectInfoIndex(thingParam)]._objectAspectIndex]);
- AL_4_nativeBitmapIndex = kFirstObjectGraphicIndice + objectAspect->_firstNativeBitmapRelativeIndex;
- if (useAlcoveObjectImage = (drawAlcoveObjects && getFlag(objectAspect->_graphicInfo, kObjectAlcoveMask) && !viewLane)) {
+ AL_4_nativeBitmapIndex = k360_FirstObjectGraphicIndice + objectAspect->_firstNativeBitmapRelativeIndex;
+ if (useAlcoveObjectImage = (drawAlcoveObjects && getFlag(objectAspect->_graphicInfo, k0x0010_ObjectAlcoveMask) && !viewLane)) {
AL_4_nativeBitmapIndex++;
}
coordinateSet = gObjectCoordinateSets[objectAspect->_coordinateSet][viewSquareIndex][AL_2_viewCell];
if (!coordinateSet[1]) /* If object is not visible */
continue;
T0115015_DrawProjectileAsObject:
- flipHorizontal = getFlag(objectAspect->_graphicInfo, kObjectFlipOnRightMask) &&
+ flipHorizontal = getFlag(objectAspect->_graphicInfo, k0x0001_ObjectFlipOnRightMask) &&
!useAlcoveObjectImage &&
- ((viewLane == kViewLaneRight) || (!viewLane && ((AL_2_viewCell == kViewCellFrontRight) || (AL_2_viewCell == kViewCellBackRight))));
+ ((viewLane == k2_ViewLaneRight) || (!viewLane && ((AL_2_viewCell == k1_ViewCellFrontRight) || (AL_2_viewCell == k2_ViewCellBackRight))));
/* 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 == kViewSquare_D0C) || ((viewSquareIndex >= kViewSquare_D1C) && (AL_2_viewCell >= kViewCellBackRight))) {
+ if ((viewSquareIndex == kViewSquare_D0C) || ((viewSquareIndex >= kViewSquare_D1C) && (AL_2_viewCell >= k2_ViewCellBackRight))) {
/* If object is in the center lane (only D0C or D1C with condition above) and is not a projectile */
drawingGrabbableObject = (!viewLane && !drawProjectileAsObject);
- AL_8_shiftSetIndex = kShiftSet_D0BackD1Front;
+ AL_8_shiftSetIndex = k0_ShiftSet_D0BackD1Front;
AL_6_bitmapRedBanana = getBitmap(AL_4_nativeBitmapIndex); /* Use base graphic, no resizing */
byteWidth = objectAspect->_width;
heightRedEagle = objectAspect->_height;
if (flipHorizontal) {
- memcpy(_tmpBitmap, AL_6_bitmapRedBanana, byteWidth * heightRedEagle * sizeof(byte));
- flipBitmapHorizontal(_tmpBitmap, byteWidth, heightRedEagle);
- AL_6_bitmapRedBanana = _tmpBitmap;
+ memcpy(_g74_tmpBitmap, AL_6_bitmapRedBanana, byteWidth * heightRedEagle * sizeof(byte));
+ flipBitmapHorizontal(_g74_tmpBitmap, byteWidth, heightRedEagle);
+ AL_6_bitmapRedBanana = _g74_tmpBitmap;
}
} else {
drawingGrabbableObject = false;
- derivedBitmapIndex = kDerivedBitmapFirstObject + objectAspect->_firstDerivedBitmapRelativeIndex;
- if ((viewSquareIndex >= kViewSquare_D1C) || ((viewSquareIndex >= kViewSquare_D2C) && (AL_2_viewCell >= kViewCellBackRight))) {
+ derivedBitmapIndex = k104_DerivedBitmapFirstObject + objectAspect->_firstDerivedBitmapRelativeIndex;
+ if ((viewSquareIndex >= kViewSquare_D1C) || ((viewSquareIndex >= kViewSquare_D2C) && (AL_2_viewCell >= k2_ViewCellBackRight))) {
derivedBitmapIndex++;
- AL_8_shiftSetIndex = kShiftSet_D1BackD2Front;
- byteWidth = getScaledDimension(objectAspect->_width, kScale20_D2);
- heightRedEagle = getScaledDimension(objectAspect->_height, kScale20_D2);
+ AL_8_shiftSetIndex = k1_ShiftSet_D1BackD2Front;
+ byteWidth = getScaledDimension(objectAspect->_width, k20_Scale_D2);
+ heightRedEagle = getScaledDimension(objectAspect->_height, k20_Scale_D2);
paletteChanges = gPalChangesFloorOrn_D2;
} else {
- AL_8_shiftSetIndex = kShiftSet_D2BackD3Front;
- byteWidth = getScaledDimension(objectAspect->_width, kScale16_D3);
- heightRedEagle = getScaledDimension(objectAspect->_height, kScale16_D3);
+ AL_8_shiftSetIndex = k2_ShiftSet_D2BackD3Front;
+ byteWidth = getScaledDimension(objectAspect->_width, k16_Scale_D3);
+ heightRedEagle = getScaledDimension(objectAspect->_height, k16_Scale_D3);
paletteChanges = gPalChangesFloorOrn_D3;
}
if (flipHorizontal) {
@@ -2395,20 +2392,20 @@ T0115015_DrawProjectileAsObject:
AL_6_bitmapRedBanana = bitmapGreenAnt;
dunMan._pileTopObject[AL_2_viewCell] = thingParam; /* The object is at the top of the pile */
}
- blitToScreen(AL_6_bitmapRedBanana, byteWidth, AL_4_xPos, 0, boxByteGreen, kColorFlesh, gDungeonViewport);
+ blitToScreen(AL_6_bitmapRedBanana, byteWidth, AL_4_xPos, 0, boxByteGreen, k10_ColorFlesh, gDungeonViewport);
if (drawProjectileAsObject)
goto T0115171_BackFromT0115015_DrawProjectileAsObject;
}
} while ((thingParam = dunMan.getNextThing(thingParam)) != Thing::_endOfList);
- if (AL_2_viewCell == kViewCellAlcove)
+ if (AL_2_viewCell == k4_ViewCellAlcove)
break; /* End of processing when drawing objects in an alcove */
if (viewSquareIndex < kViewSquare_D3C)
break; /* End of processing if square is too far away at D4 */
/* Draw creatures */
/* 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 <= kViewCellFrontRight) || (cellCounter == 1))
+ drawingLastBackRowCell = ((AL_2_viewCell <= k1_ViewCellFrontRight) || (cellCounter == 1))
&& (!remainingViewCellOrdinalsToProcess || ((remainingViewCellOrdinalsToProcess & 0x0000000F) >= 3));
if ((groupThing == Thing::_none) || drawCreaturesCompleted)
@@ -2438,24 +2435,24 @@ T0115015_DrawProjectileAsObject:
if (remainingViewCellOrdinalsToProcess || (doorFrontViewDrawingPass == 1))
/* Do not draw a single centered creature now, wait until second pass (for a front view door)
or until all cells have been drawn so the creature is drawn over all the objects on the floor */
- goto T0115129_DrawProjectiles;
+ goto T0115129_DrawProjectiles;
drawCreaturesCompleted = true;
if ((creatureSize == kMaskCreatureSizeHalf) && (creatureDirectionDelta & 0x0001)) { /* Side view of half square creature */
- AL_2_viewCell = kHalfSizedViewCell_CenterColumn;
+ AL_2_viewCell = k3_HalfSizedViewCell_CenterColumn;
} else {
- AL_2_viewCell = kHalfSizedViewCell_FrontRow;
+ AL_2_viewCell = k4_HalfSizedViewCell_FrontRow;
}
} else if ((creatureSize == kMaskCreatureSizeHalf) && (drawingLastBackRowCell || !remainingViewCellOrdinalsToProcess || (creatureIndexGreen < 0))) {
if (drawingLastBackRowCell && (doorFrontViewDrawingPass != 2)) {
if ((creatureIndexGreen >= 0) && (creatureDirectionDelta & 0x0001)) {
- AL_2_viewCell = kHalfSizedViewCell_BackRow; /* Side view of a half square creature on the back row. Drawn during pass 1 for a door square */
+ AL_2_viewCell = k2_HalfSizedViewCell_BackRow; /* Side view of a half square creature on the back row. Drawn during pass 1 for a door square */
} else {
goto T0115129_DrawProjectiles;
}
} else if ((doorFrontViewDrawingPass != 1) && !remainingViewCellOrdinalsToProcess) {
if (creatureDirectionDelta & 0x0001) {
if (creatureIndexGreen >= 0) {
- AL_2_viewCell = kHalfSizedViewCell_FrontRow; /* Side view of a half square creature on the front row. Drawn during pass 2 for a door square */
+ AL_2_viewCell = k4_HalfSizedViewCell_FrontRow; /* Side view of a half square creature on the front row. Drawn during pass 2 for a door square */
} else {
goto T0115129_DrawProjectiles;
}
@@ -2467,9 +2464,9 @@ T0115015_DrawProjectileAsObject:
twoHalfSquareCreaturesFrontView = group->getCount();
if (((AL_4_groupCells = _vm->_groupMan->getCreatureValue(AL_4_groupCells, AL_0_creatureIndexRed)) == directionParam)
|| (AL_4_groupCells == returnPrevVal(directionParam))) {
- AL_2_viewCell = kHalfSizedViewCell_LeftColumn;
+ AL_2_viewCell = k0_HalfSizedViewCell_LeftColumn;
} else {
- AL_2_viewCell = kHalfSizedViewCell_RightColumn;
+ AL_2_viewCell = k1_HalfSizedViewCell_RightColumn;
}
}
} else {
@@ -2489,29 +2486,29 @@ T0115077_DrawSecondHalfSquareCreature:
if (!coordinateSet[1])
goto T0115126_CreatureNotVisible;
AL_0_creatureGraphicInfoRed = creatureGraphicInfoGreen;
- AL_4_nativeBitmapIndex = kFirstCreatureGraphicIndice + ((CreatureAspect*)objectAspect)->_firstNativeBitmapRelativeIndex; /* By default, assume using the front image */
+ AL_4_nativeBitmapIndex = k446_FirstCreatureGraphicIndice + ((CreatureAspect*)objectAspect)->_firstNativeBitmapRelativeIndex; /* By default, assume using the front image */
derivedBitmapIndex = ((CreatureAspect*)objectAspect)->_firstDerivedBitmapIndex;
- if (useCreatureSideBitmap = getFlag(AL_0_creatureGraphicInfoRed, kCreatureInfoGraphicMaskSide) && (creatureDirectionDelta & 0x0001)) {
+ if (useCreatureSideBitmap = getFlag(AL_0_creatureGraphicInfoRed, k0x0008_CreatureInfoGraphicMaskSide) && (creatureDirectionDelta & 0x0001)) {
useCreatureAttackBitmap = useFlippedHorizontallyCreatureFrontImage = useCreatureBackBitmap = false;
AL_4_nativeBitmapIndex++; /* Skip the front image. Side image is right after the front image */
derivedBitmapIndex += 2;
sourceByteWidth = byteWidth = ((CreatureAspect*)objectAspect)->_byteWidthSide;
sourceHeight = heightRedEagle = ((CreatureAspect*)objectAspect)->_heightSide;
} else {
- useCreatureBackBitmap = getFlag(AL_0_creatureGraphicInfoRed, kCreatureInfoGraphicMaskBack) && (creatureDirectionDelta == 0);
+ useCreatureBackBitmap = getFlag(AL_0_creatureGraphicInfoRed, k0x0010_CreatureInfoGraphicMaskBack) && (creatureDirectionDelta == 0);
if (useCreatureAttackBitmap = !useCreatureBackBitmap && getFlag(creatureAspectInt, kMaskActiveGroupIsAttacking)
- && getFlag(AL_0_creatureGraphicInfoRed, kCreatureInfoGraphicMaskAttack)) {
+ && getFlag(AL_0_creatureGraphicInfoRed, k0x0020_CreatureInfoGraphicMaskAttack)) {
useFlippedHorizontallyCreatureFrontImage = false;
sourceByteWidth = byteWidth = ((CreatureAspect*)objectAspect)->_byteWidthAttack;
sourceHeight = heightRedEagle = ((CreatureAspect*)objectAspect)->_heightAttack;
AL_4_nativeBitmapIndex++; /* Skip the front image */
derivedBitmapIndex += 2;
- if (getFlag(AL_0_creatureGraphicInfoRed, kCreatureInfoGraphicMaskSide)) {
+ if (getFlag(AL_0_creatureGraphicInfoRed, k0x0008_CreatureInfoGraphicMaskSide)) {
AL_4_nativeBitmapIndex++; /* If the creature has a side image, it preceeds the attack image */
derivedBitmapIndex += 2;
}
- if (getFlag(AL_0_creatureGraphicInfoRed, kCreatureInfoGraphicMaskBack)) {
+ if (getFlag(AL_0_creatureGraphicInfoRed, k0x0010_CreatureInfoGraphicMaskBack)) {
AL_4_nativeBitmapIndex++; /* If the creature has a back image, it preceeds the attack image */
derivedBitmapIndex += 2;
}
@@ -2520,7 +2517,7 @@ T0115077_DrawSecondHalfSquareCreature:
sourceHeight = heightRedEagle = ((CreatureAspect*)objectAspect)->_heightFront;
if (useCreatureBackBitmap) {
useFlippedHorizontallyCreatureFrontImage = false;
- if (getFlag(AL_0_creatureGraphicInfoRed, kCreatureInfoGraphicMaskSide)) {
+ if (getFlag(AL_0_creatureGraphicInfoRed, k0x0008_CreatureInfoGraphicMaskSide)) {
AL_4_nativeBitmapIndex += 2; /* If the creature has a side image, it preceeds the back image */
derivedBitmapIndex += 4;
} else {
@@ -2528,16 +2525,16 @@ T0115077_DrawSecondHalfSquareCreature:
derivedBitmapIndex += 2;
}
} else {
- if (useFlippedHorizontallyCreatureFrontImage = getFlag(AL_0_creatureGraphicInfoRed, kCreatureInfoGraphicMaskFlipNonAttack)
+ if (useFlippedHorizontallyCreatureFrontImage = getFlag(AL_0_creatureGraphicInfoRed, k0x0004_CreatureInfoGraphicMaskFlipNonAttack)
&& getFlag(creatureAspectInt, kMaskActiveGroupFlipBitmap)) {
derivedBitmapIndex += 2;
- if (getFlag(AL_0_creatureGraphicInfoRed, kCreatureInfoGraphicMaskSide)) {
+ if (getFlag(AL_0_creatureGraphicInfoRed, k0x0008_CreatureInfoGraphicMaskSide)) {
derivedBitmapIndex += 2;
}
- if (getFlag(AL_0_creatureGraphicInfoRed, kCreatureInfoGraphicMaskBack)) {
+ if (getFlag(AL_0_creatureGraphicInfoRed, k0x0010_CreatureInfoGraphicMaskBack)) {
derivedBitmapIndex += 2;
}
- if (getFlag(AL_0_creatureGraphicInfoRed, kCreatureInfoGraphicMaskAttack)) {
+ if (getFlag(AL_0_creatureGraphicInfoRed, k0x0020_CreatureInfoGraphicMaskAttack)) {
derivedBitmapIndex += 2;
}
}
@@ -2546,29 +2543,29 @@ T0115077_DrawSecondHalfSquareCreature:
}
if (viewSquareIndex >= kViewSquare_D1C) { /* Creature is on D1 */
creaturePaddingPixelCount = 0;
- AL_8_shiftSetIndex = kShiftSet_D0BackD1Front;
+ AL_8_shiftSetIndex = k0_ShiftSet_D0BackD1Front;
transparentColor = ((CreatureAspect*)objectAspect)->getTranspColour();
if (useCreatureSideBitmap) {
AL_6_bitmapRedBanana = getBitmap(AL_4_nativeBitmapIndex);
if (creatureDirectionDelta == 1) {
- memcpy(_tmpBitmap, AL_6_bitmapRedBanana, byteWidth * heightRedEagle * sizeof(byte));
- flipBitmapHorizontal(_tmpBitmap, byteWidth, heightRedEagle);
- AL_6_bitmapRedBanana = _tmpBitmap;
+ memcpy(_g74_tmpBitmap, AL_6_bitmapRedBanana, byteWidth * heightRedEagle * sizeof(byte));
+ flipBitmapHorizontal(_g74_tmpBitmap, byteWidth, heightRedEagle);
+ AL_6_bitmapRedBanana = _g74_tmpBitmap;
}
} else {
if (useCreatureBackBitmap || !useFlippedHorizontallyCreatureFrontImage) {
AL_6_bitmapRedBanana = getBitmap(AL_4_nativeBitmapIndex);
if (useCreatureAttackBitmap && getFlag(creatureAspectInt, kMaskActiveGroupFlipBitmap)) {
- memcpy(_tmpBitmap, AL_6_bitmapRedBanana, byteWidth * heightRedEagle * sizeof(byte));
- flipBitmapHorizontal(_tmpBitmap, byteWidth, heightRedEagle);
- AL_6_bitmapRedBanana = _tmpBitmap;
+ memcpy(_g74_tmpBitmap, AL_6_bitmapRedBanana, byteWidth * heightRedEagle * sizeof(byte));
+ flipBitmapHorizontal(_g74_tmpBitmap, byteWidth, heightRedEagle);
+ AL_6_bitmapRedBanana = _g74_tmpBitmap;
}
} else { /* Use first additional derived graphic: front D1 */
if (isDerivedBitmapInCache(derivedBitmapIndex)) { /* If derived graphic is already in memory */
AL_6_bitmapRedBanana = getDerivedBitmap(derivedBitmapIndex);
} else {
bitmapGreenAnt = getBitmap(AL_4_nativeBitmapIndex);
- if (getFlag(AL_0_creatureGraphicInfoRed, kCreatureInfoGraphicMaskFlipNonAttack)) {
+ if (getFlag(AL_0_creatureGraphicInfoRed, k0x0004_CreatureInfoGraphicMaskFlipNonAttack)) {
AL_6_bitmapRedBanana = getDerivedBitmap(derivedBitmapIndex);
memcpy(AL_6_bitmapRedBanana, bitmapGreenAnt, byteWidth * heightRedEagle * sizeof(byte));
flipBitmapHorizontal(AL_6_bitmapRedBanana, byteWidth, heightRedEagle);
@@ -2583,16 +2580,16 @@ T0115077_DrawSecondHalfSquareCreature:
}
if (viewSquareIndex >= kViewSquare_D2C) { /* Creature is on D2 */
derivedBitmapIndex++; /* Skip front D3 image in additional graphics */
- AL_8_shiftSetIndex = kShiftSet_D1BackD2Front;
- useCreatureSpecialD2FrontBitmap = getFlag(AL_0_creatureGraphicInfoRed, kCreatureInfoGraphicMaskSpecialD2Front)
+ AL_8_shiftSetIndex = k1_ShiftSet_D1BackD2Front;
+ useCreatureSpecialD2FrontBitmap = getFlag(AL_0_creatureGraphicInfoRed, k0x0080_CreatureInfoGraphicMaskSpecialD2Front)
&& !useCreatureSideBitmap && !useCreatureBackBitmap && !useCreatureAttackBitmap;
paletteChanges = gPalChangesCreature_D2;
- scale = kScale20_D2;
+ scale = k20_Scale_D2;
} else { /* Creature is on D3 */
- AL_8_shiftSetIndex = kShiftSet_D2BackD3Front;
+ AL_8_shiftSetIndex = k2_ShiftSet_D2BackD3Front;
useCreatureSpecialD2FrontBitmap = false;
paletteChanges = gPalChangesCreature_D3;
- scale = kScale16_D3;
+ scale = k16_Scale_D3;
}
byteWidth = getScaledDimension(sourceByteWidth, scale);
heightRedEagle = getScaledDimension(sourceHeight, scale);
@@ -2607,14 +2604,14 @@ T0115077_DrawSecondHalfSquareCreature:
}
if ((useCreatureSideBitmap && (creatureDirectionDelta == 1)) || /* If creature is viewed from the right, the side view must be flipped */
(useCreatureAttackBitmap && getFlag(creatureAspectInt, kMaskActiveGroupFlipBitmap)) ||
- (useCreatureSpecialD2FrontBitmap && getFlag(AL_0_creatureGraphicInfoRed, kCreatureInfoGraphicMaskSpecialD2FrontIsFlipped)) ||
- (useFlippedHorizontallyCreatureFrontImage && getFlag(AL_0_creatureGraphicInfoRed, kCreatureInfoGraphicMaskFlipNonAttack))) { /* If the graphic should be flipped */
+ (useCreatureSpecialD2FrontBitmap && getFlag(AL_0_creatureGraphicInfoRed, k0x0100_CreatureInfoGraphicMaskSpecialD2FrontIsFlipped)) ||
+ (useFlippedHorizontallyCreatureFrontImage && getFlag(AL_0_creatureGraphicInfoRed, k0x0004_CreatureInfoGraphicMaskFlipNonAttack))) { /* If the graphic should be flipped */
if (!useFlippedHorizontallyCreatureFrontImage || !derivedBitmapInCache) {
AL_4_normalizdByteWidth = byteWidth;
warning("SUPER WARNING: we might need getNormalizedByteWidthM77");
if (!useFlippedHorizontallyCreatureFrontImage) {
- memcpy(_tmpBitmap, AL_6_bitmapRedBanana, AL_4_normalizdByteWidth * heightRedEagle * sizeof(byte));
- AL_6_bitmapRedBanana = _tmpBitmap;
+ memcpy(_g74_tmpBitmap, AL_6_bitmapRedBanana, AL_4_normalizdByteWidth * heightRedEagle * sizeof(byte));
+ AL_6_bitmapRedBanana = _g74_tmpBitmap;
}
flipBitmapHorizontal(AL_6_bitmapRedBanana, AL_4_normalizdByteWidth, heightRedEagle);
}
@@ -2629,7 +2626,7 @@ T0115077_DrawSecondHalfSquareCreature:
boxByteGreen._y1 = MIN(0, AL_4_yPos - (heightRedEagle - 1));
AL_4_xPos = coordinateSet[0];
AL_4_xPos += gShiftSets[AL_8_shiftSetIndex][getHorizontalOffsetM22(creatureAspectInt)];
- if (viewLane == kViewLaneLeft) {
+ if (viewLane == k1_ViewLaneLeft) {
AL_4_xPos -= 100;
} else {
if (viewLane) { /* Lane right */
@@ -2652,10 +2649,10 @@ T0115126_CreatureNotVisible:
if (twoHalfSquareCreaturesFrontView) {
twoHalfSquareCreaturesFrontView = false;
creatureAspectInt = activeGroup->_aspect[!creatureIndexGreen]; /* Aspect of the other creature in the pair */
- if (AL_2_viewCell == kHalfSizedViewCell_RightColumn) {
- AL_2_viewCell = kHalfSizedViewCell_LeftColumn;
+ if (AL_2_viewCell == k1_HalfSizedViewCell_RightColumn) {
+ AL_2_viewCell = k0_HalfSizedViewCell_LeftColumn;
} else {
- AL_2_viewCell = kHalfSizedViewCell_RightColumn;
+ AL_2_viewCell = k1_HalfSizedViewCell_RightColumn;
}
goto T0115077_DrawSecondHalfSquareCreature;
}
@@ -2664,8 +2661,8 @@ T0115129_DrawProjectiles:
if (!sqaureHasProjectile
|| ((viewSquareIndex = viewSquareIndexBackup) > kViewSquare_D0C)
/* If there is no projectile to draw or if projectiles are not visible on the specified square or on the cell being drawn */
- || (!(projectilePosX = gObjectCoordinateSets[0][viewSquareIndex][AL_2_viewCell = currentViewCellToDraw][0])))
- continue;
+|| (!(projectilePosX = gObjectCoordinateSets[0][viewSquareIndex][AL_2_viewCell = currentViewCellToDraw][0])))
+continue;
thingParam = firstThingToDraw; /* Restart processing list of objects from the beginning. The next loop draws only projectile objects among the list */
do {
@@ -2673,38 +2670,38 @@ T0115129_DrawProjectiles:
projectile = (Projectile*)dunMan.getThingData(thingParam);
if ((AL_4_projectileAspect = dunMan.getProjectileAspect(projectile->_object)) < 0) { /* Negative value: projectile aspect is the ordinal of a PROJECTIL_ASPECT */
objectAspect = (ObjectAspect*)&gProjectileAspect[_vm->ordinalToIndex(-AL_4_projectileAspect)];
- AL_4_nativeBitmapIndex = ((ProjectileAspect*)objectAspect)->_firstNativeBitmapRelativeIndex + kFirstProjectileGraphicIndice;
- projectileAspectType = getFlag(((ProjectileAspect*)objectAspect)->_graphicInfo, kProjectileAspectTypeMask);
- if (((doNotScaleWithKineticEnergy = !getFlag(((ProjectileAspect*)objectAspect)->_graphicInfo, kProjectileScaleWithKineticEnergyMask))
+ AL_4_nativeBitmapIndex = ((ProjectileAspect*)objectAspect)->_firstNativeBitmapRelativeIndex + k316_FirstProjectileGraphicIndice;
+ projectileAspectType = getFlag(((ProjectileAspect*)objectAspect)->_graphicInfo, k0x0003_ProjectileAspectTypeMask);
+ if (((doNotScaleWithKineticEnergy = !getFlag(((ProjectileAspect*)objectAspect)->_graphicInfo, k0x0100_ProjectileScaleWithKineticEnergyMask))
|| (projectile->_kineticEnergy == 255)) && (viewSquareIndex == kViewSquare_D0C)) {
scale = 0; /* Use native bitmap without resizing */
byteWidth = ((ProjectileAspect*)objectAspect)->_width;
heightRedEagle = ((ProjectileAspect*)objectAspect)->_height;
} else {
AL_8_projectileScaleIndex = ((viewSquareIndex / 3) << 1) + (AL_2_viewCell >> 1);
- scale = gProjectileScales[AL_8_projectileScaleIndex];
+ scale = g215_ProjectileScales[AL_8_projectileScaleIndex];
if (!doNotScaleWithKineticEnergy) {
scale = (scale * MAX(96, projectile->_kineticEnergy + 1)) >> 8;
}
byteWidth = getScaledDimension(((ProjectileAspect*)objectAspect)->_width, scale);
heightRedEagle = getScaledDimension(((ProjectileAspect*)objectAspect)->_height, scale);
}
- if (projectileAspectTypeHasBackGraphicAndRotation = (projectileAspectType == kProjectileAspectHasBackGraphicRotation)) {
+ if (projectileAspectTypeHasBackGraphicAndRotation = (projectileAspectType == k0_ProjectileAspectHasBackGraphicRotation)) {
projectileFlipVertical = ((mapXpos + mapYpos) & 0x0001);
}
- if (projectileAspectType == kProjectileAspectHasNone) {
+ if (projectileAspectType == k3_ProjectileAspectHasNone) {
projectileBitmapIndexData = 0;
flipVertical = flipHorizontal = false;
} else {
if (isOrientedWestEast((direction)(projectileDirection = _vm->_timeline->_events[projectile->_timerIndex]._C._projectile.getDir()))
!= isOrientedWestEast(directionParam)) {
- if (projectileAspectType == kProjectileAspectHasRotation) {
+ if (projectileAspectType == k2_ProjectileAspectHasRotation) {
projectileBitmapIndexData = 1;
} else {
projectileBitmapIndexData = 2;
}
if (projectileAspectTypeHasBackGraphicAndRotation) {
- flipHorizontal = !AL_2_viewCell || (AL_2_viewCell == kViewCellBackLeft);
+ flipHorizontal = !AL_2_viewCell || (AL_2_viewCell == k3_ViewCellBackLeft);
if (!(flipVertical = projectileFlipVertical)) {
flipHorizontal = !flipHorizontal;
}
@@ -2714,16 +2711,16 @@ T0115129_DrawProjectiles:
}
} else {
/* If the projectile does not have a back graphic or has one but is not seen from the back or if it has a back graphic and rotation and should be flipped vertically */
- if ((projectileAspectType >= kProjectileAspectHasRotation)
- || ((projectileAspectType == kProjectileAspectBackGraphic)
+ if ((projectileAspectType >= k2_ProjectileAspectHasRotation)
+ || ((projectileAspectType == k1_ProjectileAspectBackGraphic)
&& (projectileDirection != directionParam)) || (projectileAspectTypeHasBackGraphicAndRotation && projectileFlipVertical)) {
projectileBitmapIndexData = 0;
} else {
projectileBitmapIndexData = 1;
}
- flipVertical = projectileAspectTypeHasBackGraphicAndRotation && (AL_2_viewCell < kViewCellBackRight);
- flipHorizontal = getFlag(((ProjectileAspect*)objectAspect)->_graphicInfo, kProjectileSideMask)
- && !((viewLane == kViewLaneRight) || (!viewLane && ((AL_2_viewCell == kViewCellFrontRight) || (AL_2_viewCell == kViewCellBackRight))));
+ flipVertical = projectileAspectTypeHasBackGraphicAndRotation && (AL_2_viewCell < k2_ViewCellBackRight);
+ flipHorizontal = getFlag(((ProjectileAspect*)objectAspect)->_graphicInfo, k0x0010_ProjectileSideMask)
+ && !((viewLane == k2_ViewLaneRight) || (!viewLane && ((AL_2_viewCell == k1_ViewCellFrontRight) || (AL_2_viewCell == k2_ViewCellBackRight))));
}
}
AL_4_nativeBitmapIndex += projectileBitmapIndexData;
@@ -2734,7 +2731,7 @@ T0115129_DrawProjectiles:
if (flipHorizontal) {
paddingPixelCount = (7 - ((byteWidth / 2 - 1) & 0x0007)) << 1;
}
- derivedBitmapIndex = kDerivedBitmapFirstProjectile + ((ProjectileAspect*)objectAspect)->_firstNativeBitmapRelativeIndex + (projectileBitmapIndexData * 6);
+ derivedBitmapIndex = k282_DerivedBitmapFirstProjectile + ((ProjectileAspect*)objectAspect)->_firstNativeBitmapRelativeIndex + (projectileBitmapIndexData * 6);
if (doNotScaleWithKineticEnergy && isDerivedBitmapInCache(derivedBitmapIndex) + AL_8_projectileScaleIndex) {
AL_6_bitmapRedBanana = getDerivedBitmap(derivedBitmapIndex);
} else {
@@ -2742,10 +2739,10 @@ T0115129_DrawProjectiles:
if (doNotScaleWithKineticEnergy) {
AL_6_bitmapRedBanana = getDerivedBitmap(derivedBitmapIndex);
} else {
- AL_6_bitmapRedBanana = _tmpBitmap;
+ AL_6_bitmapRedBanana = _g74_tmpBitmap;
}
blitToBitmapShrinkWithPalChange(bitmapGreenAnt, ((ProjectileAspect*)objectAspect)->_width, ((ProjectileAspect*)objectAspect)->_height,
- AL_6_bitmapRedBanana, byteWidth, heightRedEagle, _palChangesProjectile[AL_8_projectileScaleIndex >> 1]);
+ AL_6_bitmapRedBanana, byteWidth, heightRedEagle, _g75_palChangesProjectile[AL_8_projectileScaleIndex >> 1]);
if (doNotScaleWithKineticEnergy) {
warning("IGNORED CODE F0493_CACHE_AddDerivedBitmap");
}
@@ -2754,9 +2751,9 @@ T0115129_DrawProjectiles:
if (flipHorizontal || flipVertical) {
warning("might need noralized bytewidth");
AL_4_normalizdByteWidth = byteWidth;
- if (AL_6_bitmapRedBanana != _tmpBitmap) {
- memcpy(_tmpBitmap, AL_6_bitmapRedBanana, AL_4_normalizdByteWidth * heightRedEagle * sizeof(byte));
- AL_6_bitmapRedBanana = _tmpBitmap;
+ if (AL_6_bitmapRedBanana != _g74_tmpBitmap) {
+ memcpy(_g74_tmpBitmap, AL_6_bitmapRedBanana, AL_4_normalizdByteWidth * heightRedEagle * sizeof(byte));
+ AL_6_bitmapRedBanana = _g74_tmpBitmap;
}
if (flipVertical) {
flipBitmapVertical(AL_6_bitmapRedBanana, AL_4_normalizdByteWidth, heightRedEagle);
@@ -2781,17 +2778,17 @@ the bitmap is flipped horizontally (flipHorizontal = C1_TRUE) then a wrong part
screen. To fix this bug, "+ paddingPixelCount" must be added to the second parameter of this function call */
AL_4_xPos = MAX(paddingPixelCount, (int16)(byteWidth - projectilePosX - 1));
}
- blitToScreen(AL_6_bitmapRedBanana, byteWidth, AL_4_xPos, 0, boxByteGreen, kColorFlesh, gDungeonViewport);
+ blitToScreen(AL_6_bitmapRedBanana, byteWidth, AL_4_xPos, 0, boxByteGreen, k10_ColorFlesh, gDungeonViewport);
} else { /* Positive value: projectile aspect is the index of a OBJECT_ASPECT */
useAlcoveObjectImage = false;
projectileCoordinates[0] = projectilePosX;
projectileCoordinates[1] = 47;
coordinateSet = projectileCoordinates;
objectAspect = &gObjectAspects[AL_4_projectileAspect];
- AL_4_nativeBitmapIndex = objectAspect->_firstNativeBitmapRelativeIndex + kFirstObjectGraphicIndice;
+ AL_4_nativeBitmapIndex = objectAspect->_firstNativeBitmapRelativeIndex + k360_FirstObjectGraphicIndice;
drawProjectileAsObject = true;
/* Go to code section to draw an object. Once completed, it jumps back to T0115171_BackFromT0115015_DrawProjectileAsObject below */
- goto T0115015_DrawProjectileAsObject;
+ goto T0115015_DrawProjectileAsObject;
}
}
T0115171_BackFromT0115015_DrawProjectileAsObject:;
@@ -2812,32 +2809,32 @@ T0115171_BackFromT0115015_DrawProjectileAsObject:;
AL_2_cellPurpleMan = thingParam.getCell();
explosion = (Explosion*)dunMan.getThingData(thingParam);
if ((rebirthExplosion = ((unsigned int)(AL_4_explosionType = explosion->getType()) >= kExplosionType_RebirthStep1))
- && ((AL_1_viewSquareExplosionIndex < kViewSquare_D3C_Explosion)
+ && ((AL_1_viewSquareExplosionIndex < kViewSquare_D3C_Explosion)
|| (AL_1_viewSquareExplosionIndex > kViewSquare_D1C_Explosion)
|| (AL_2_cellPurpleMan != cellYellowBear))) /* If explosion is rebirth and is not visible */
continue;
smoke = false;
if ((AL_4_explosionType == kExplosionType_Fireball) || (AL_4_explosionType == kExplosionType_LightningBolt) || (AL_4_explosionType == kExplosionType_RebirthStep2)) {
- AL_4_explosionAspectIndex = kExplosionAspectFire;
+ AL_4_explosionAspectIndex = k0_ExplosionAspectFire;
} else {
if ((AL_4_explosionType == kExplosionType_PoisonBolt) || (AL_4_explosionType == kExplosionType_PoisonCloud)) {
- AL_4_explosionAspectIndex = kExplosionAspectPoison;
+ AL_4_explosionAspectIndex = k2_ExplosionAspectPoison;
} else {
if (AL_4_explosionType == kExplosionType_Smoke) {
smoke = true;
- AL_4_explosionAspectIndex = kExplosionAspectSmoke;
+ AL_4_explosionAspectIndex = k3_ExplosionAspectSmoke;
} else {
if (AL_4_explosionType == kExplosionType_RebirthStep1) {
objectAspect = (ObjectAspect*)&gProjectileAspect[_vm->ordinalToIndex(-dunMan.getProjectileAspect(Thing::_explLightningBolt))];
- AL_6_bitmapRedBanana = getBitmap(((ProjectileAspect*)objectAspect)->_firstNativeBitmapRelativeIndex + (kFirstProjectileGraphicIndice + 1));
+ AL_6_bitmapRedBanana = getBitmap(((ProjectileAspect*)objectAspect)->_firstNativeBitmapRelativeIndex + (k316_FirstProjectileGraphicIndice + 1));
explosionCoordinates = gRebirthStep1ExplosionCoordinates[AL_1_viewSquareExplosionIndex - 3];
byteWidth = getScaledDimension((((ProjectileAspect*)objectAspect)->_width), explosionCoordinates[2]);
heightRedEagle = getScaledDimension((((ProjectileAspect*)objectAspect)->_height), explosionCoordinates[2]);
if (AL_1_viewSquareExplosionIndex != kViewSquare_D1C_Explosion) {
blitToBitmapShrinkWithPalChange(AL_6_bitmapRedBanana,
- ((ProjectileAspect*)objectAspect)->_width, ((ProjectileAspect*)objectAspect)->_height, _tmpBitmap,
- byteWidth, heightRedEagle, gPalChangesNoChanges);
- AL_6_bitmapRedBanana = _tmpBitmap;
+ ((ProjectileAspect*)objectAspect)->_width, ((ProjectileAspect*)objectAspect)->_height, _g74_tmpBitmap,
+ byteWidth, heightRedEagle, gPalChangesNoChanges);
+ AL_6_bitmapRedBanana = _g74_tmpBitmap;
}
goto T0115200_DrawExplosion;
}
@@ -2847,7 +2844,7 @@ T0115171_BackFromT0115015_DrawProjectileAsObject:;
}
continue;
}
- AL_4_explosionAspectIndex = kExplosionAspectSpell;
+ AL_4_explosionAspectIndex = k1_ExplosionAspectSpell;
}
}
}
@@ -2863,14 +2860,14 @@ T0115171_BackFromT0115015_DrawProjectileAsObject:;
}
}
warning("IGNORED CODE: F0491_CACHE_IsDerivedBitmapInCache");
- AL_6_bitmapRedBanana = getBitmap(AL_4_explosionAspectIndex + kFirstExplosionPatternGraphicIndice);
+ AL_6_bitmapRedBanana = getBitmap(AL_4_explosionAspectIndex + k351_FirstExplosionPatternGraphicIndice);
if (smoke) {
- blitToBitmapShrinkWithPalChange(AL_6_bitmapRedBanana, 48, 32, _tmpBitmap, 48, 32, gPalChangeSmoke);
- AL_6_bitmapRedBanana = _tmpBitmap;
+ blitToBitmapShrinkWithPalChange(AL_6_bitmapRedBanana, 48, 32, _g74_tmpBitmap, 48, 32, gPalChangeSmoke);
+ AL_6_bitmapRedBanana = _g74_tmpBitmap;
}
- blitBoxFilledWithMaskedBitmapToScreen(AL_6_bitmapRedBanana, nullptr, getDerivedBitmap(kDerivedBitmapViewport), gBoxExplosionPattern_D0C,
+ blitBoxFilledWithMaskedBitmapToScreen(AL_6_bitmapRedBanana, nullptr, getDerivedBitmap(k0_DerivedBitmapViewport), gBoxExplosionPattern_D0C,
_vm->_rnd->getRandomNumber(4) + 87, _vm->_rnd->getRandomNumber(64),
- 224, (Color)(kBlitDoNotUseMask | kColorFlesh), 0, 0, 136, 93);
+ 224, (Color)(kBlitDoNotUseMask | k10_ColorFlesh), 0, 0, 136, 93);
warning("IGNORED CODE: F0493_CACHE_AddDerivedBitmap");
warning("IGNORED CODE: F0493_CACHE_AddDerivedBitmap");
} else {
@@ -2882,9 +2879,9 @@ T0115171_BackFromT0115015_DrawProjectileAsObject:;
explosionCoordinates = gCenteredExplosionCoordinates[AL_1_viewSquareExplosionIndex];
} else {
if ((AL_2_cellPurpleMan == directionParam) || (AL_2_cellPurpleMan == returnPrevVal(directionParam))) {
- AL_2_viewCell = kViewCellFronLeft;
+ AL_2_viewCell = k0_ViewCellFronLeft;
} else {
- AL_2_viewCell = kViewCellFrontRight;
+ AL_2_viewCell = k1_ViewCellFrontRight;
}
explosionCoordinates = gExplosionCoordinates[AL_1_viewSquareExplosionIndex][AL_2_viewCell];
}
@@ -2897,7 +2894,7 @@ T0115200_DrawExplosion:
if (flipHorizontal = _vm->_rnd->getRandomNumber(2)) {
paddingPixelCount = (7 - ((byteWidth / 2 - 1) & 0x0007)) << 1; /* Number of unused pixels in the units on the right of the bitmap */
}
- boxByteGreen._y2 = MIN(135, explosionCoordinates[1] + (heightRedEagle >> 1)) + 1;
+ boxByteGreen._y2 = MIN(135, explosionCoordinates[1] + (heightRedEagle >> 1)) + 1;
AL_4_yPos = MAX(0, explosionCoordinates[1] - (heightRedEagle >> 1) + !(heightRedEagle & 0x0001));
if (AL_4_yPos >= 136)
continue;
@@ -2913,7 +2910,7 @@ T0115200_DrawExplosion:
left side of the viewport (boxByteGreen.X1 = 0) and the bitmap is not flipped horizontally (flipHorizontal = C0_FALSE) then the
variable paddingPixelCount is not set before being used here. Its previous value (defined while drawing something else) is used
and may cause an incorrect bitmap to be drawn */
- AL_4_xPos = MIN(paddingPixelCount,(int16)( byteWidth / 2 - AL_4_xPos - 1));
+ AL_4_xPos = MIN(paddingPixelCount, (int16)(byteWidth / 2 - AL_4_xPos - 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 = C1_TRUE)
@@ -2924,8 +2921,8 @@ then a wrong part of the bitmap is drawn on screen. To fix this bug, "+ paddingP
warning("might need M77_NORMALIZED_BYTE_WIDTH");
byteWidth = byteWidth;
if (flipHorizontal || flipVertical) {
- memcpy(_tmpBitmap, AL_6_bitmapRedBanana, byteWidth * heightRedEagle);
- AL_6_bitmapRedBanana = _tmpBitmap;
+ memcpy(_g74_tmpBitmap, AL_6_bitmapRedBanana, byteWidth * heightRedEagle);
+ AL_6_bitmapRedBanana = _g74_tmpBitmap;
}
if (flipHorizontal) {
flipBitmapHorizontal(AL_6_bitmapRedBanana, byteWidth, heightRedEagle);
@@ -2933,12 +2930,12 @@ then a wrong part of the bitmap is drawn on screen. To fix this bug, "+ paddingP
if (flipVertical) {
flipBitmapVertical(AL_6_bitmapRedBanana, byteWidth, heightRedEagle);
}
- blitToScreen(AL_6_bitmapRedBanana, byteWidth, AL_4_xPos, 0, boxByteGreen, kColorFlesh, gDungeonViewport);
+ blitToScreen(AL_6_bitmapRedBanana, byteWidth, AL_4_xPos, 0, boxByteGreen, k10_ColorFlesh, gDungeonViewport);
}
}
} while ((thingParam = dunMan.getNextThing(thingParam)) != Thing::_endOfList);
/* Fluxcage is an explosion displayed as a field (like teleporters), above all other graphics */
- if ((fluxcageExplosion != 0) && (doorFrontViewDrawingPass != 1) && !_doNotDrawFluxcagesDuringEndgame) {
+ if ((fluxcageExplosion != 0) && (doorFrontViewDrawingPass != 1) && !_g77_doNotDrawFluxcagesDuringEndgame) {
AL_1_viewSquareExplosionIndex -= 3; /* Convert square index for explosions back to square index */
fieldAspect = gFieldAspects[viewSquareIndex];
(fieldAspect._nativeBitmapRelativeIndex)++; /* NativeBitmapRelativeIndex is now the index of the Fluxcage field graphic */
@@ -2959,16 +2956,16 @@ uint16 DisplayMan::getHorizontalOffsetM22(uint16 val) {
}
bool DisplayMan::isDerivedBitmapInCache(int16 derivedBitmapIndex) {
- if (_derivedBitmaps[derivedBitmapIndex] == nullptr) {
+ if (_g638_derivedBitmaps[derivedBitmapIndex] == nullptr) {
// * 2, because the original uses 4 bits instead of 8 bits to store a pixel
- _derivedBitmaps[derivedBitmapIndex] = new byte[_derivedBitmapByteCount[derivedBitmapIndex] * 2];
+ _g638_derivedBitmaps[derivedBitmapIndex] = new byte[_g639_derivedBitmapByteCount[derivedBitmapIndex] * 2];
return false;
} else
return true;
}
byte* DisplayMan::getDerivedBitmap(int16 derivedBitmapIndex) {
- return _derivedBitmaps[derivedBitmapIndex];
+ return _g638_derivedBitmaps[derivedBitmapIndex];
}
void DisplayMan::clearScreenBox(Color color, Box &box, Viewport &viewport) {
diff --git a/engines/dm/gfx.h b/engines/dm/gfx.h
index 397417fd75..ca478b32b9 100644
--- a/engines/dm/gfx.h
+++ b/engines/dm/gfx.h
@@ -36,74 +36,78 @@
namespace DM {
+#define k2_FloorSetGraphicCount 2 // @ C002_FLOOR_SET_GRAPHIC_COUNT
+#define k13_WallSetGraphicCount 13 // @ C013_WALL_SET_GRAPHIC_COUNT
+#define k18_StairsGraphicCount 18 // @ C018_STAIRS_GRAPHIC_COUNT
+#define k3_DoorSetGraphicsCount 3 // @ C003_DOOR_SET_GRAPHIC_COUNT
+#define k1_DoorButtonCount 1 // @ C001_DOOR_BUTTON_COUNT
+#define k3_AlcoveOrnCount 3 // @ C003_ALCOVE_ORNAMENT_COUNT
+#define k1_FountainOrnCount 1 // @ C001_FOUNTAIN_ORNAMENT_COUNT
+#define k27_CreatureTypeCount 27 // @ C027_CREATURE_TYPE_COUNT
+#define k4_ExplosionAspectCount 4 // @ C004_EXPLOSION_ASPECT_COUNT
+#define k14_ProjectileAspectCount 14 // @ C014_PROJECTILE_ASPECT_COUNT
+#define k85_ObjAspectCount 85 // @ C085_OBJECT_ASPECT_COUNT
+
+#define k0_NativeBitmapIndex 0 // @ C0_NATIVE_BITMAP_INDEX
+#define k1_CoordinateSet 1 // @ C1_COORDINATE_SET
/* View lanes */
-#define kViewLaneCenter 0 // @ C0_VIEW_LANE_CENTER
-#define kViewLaneLeft 1 // @ C1_VIEW_LANE_LEFT
-#define kViewLaneRight 2 // @ C2_VIEW_LANE_RIGHT
+#define k0_ViewLaneCenter 0 // @ C0_VIEW_LANE_CENTER
+#define k1_ViewLaneLeft 1 // @ C1_VIEW_LANE_LEFT
+#define k2_ViewLaneRight 2 // @ C2_VIEW_LANE_RIGHT
-#define kHalfSizedViewCell_LeftColumn 0 // @ C00_VIEW_CELL_LEFT_COLUMN
-#define kHalfSizedViewCell_RightColumn 1 // @ C01_VIEW_CELL_RIGHT_COLUMN
-#define kHalfSizedViewCell_BackRow 2 // @ C02_VIEW_CELL_BACK_ROW
-#define kHalfSizedViewCell_CenterColumn 3 // @ C03_VIEW_CELL_CENTER_COLUMN
-#define kHalfSizedViewCell_FrontRow 4 // @ C04_VIEW_CELL_FRONT_ROW
+#define k0_HalfSizedViewCell_LeftColumn 0 // @ C00_VIEW_CELL_LEFT_COLUMN
+#define k1_HalfSizedViewCell_RightColumn 1 // @ C01_VIEW_CELL_RIGHT_COLUMN
+#define k2_HalfSizedViewCell_BackRow 2 // @ C02_VIEW_CELL_BACK_ROW
+#define k3_HalfSizedViewCell_CenterColumn 3 // @ C03_VIEW_CELL_CENTER_COLUMN
+#define k4_HalfSizedViewCell_FrontRow 4 // @ C04_VIEW_CELL_FRONT_ROW
/* Shift sets */
-#define kShiftSet_D0BackD1Front 0 // @ C0_SHIFT_SET_D0_BACK_OR_D1_FRONT
-#define kShiftSet_D1BackD2Front 1 // @ C1_SHIFT_SET_D1_BACK_OR_D2_FRONT
-#define kShiftSet_D2BackD3Front 2 // @ C2_SHIFT_SET_D2_BACK_OR_D3_FRONT
-
-#define kCellOrder_DoorFront 0x0008 // @ MASK0x0008_DOOR_FRONT
-#define kCellOrder_Alcove 0x0000 // @ C0000_CELL_ORDER_ALCOVE
-#define kCellOrder_BackLeft 0x0001 // @ C0001_CELL_ORDER_BACKLEFT
-#define kCellOrder_BackRight 0x0002 // @ C0002_CELL_ORDER_BACKRIGHT
-#define kCellOrder_DoorPass1_BackLeft 0x0018 // @ C0018_CELL_ORDER_DOORPASS1_BACKLEFT
-#define kCellOrder_BackLeft_BackRight 0x0021 // @ C0021_CELL_ORDER_BACKLEFT_BACKRIGHT
-#define kCellOrder_DoorPass1_BackRight 0x0028 // @ C0028_CELL_ORDER_DOORPASS1_BACKRIGHT
-#define kCellOrder_BackRight_FrontRight 0x0032 // @ C0032_CELL_ORDER_BACKRIGHT_FRONTRIGHT
-#define kCellOrder_DoorPass2_FrontRight 0x0039 // @ C0039_CELL_ORDER_DOORPASS2_FRONTRIGHT
-#define kCellOrder_BackLeft_FrontLeft 0x0041 // @ C0041_CELL_ORDER_BACKLEFT_FRONTLEFT
-#define kCellOrder_DoorPass2_FrontLeft 0x0049 // @ C0049_CELL_ORDER_DOORPASS2_FRONTLEFT
-#define kCellOrder_DoorPass1_BackRight_BackLeft 0x0128 // @ C0128_CELL_ORDER_DOORPASS1_BACKRIGHT_BACKLEFT
-#define kCellOrder_DoorPass1_BackLeft_BackRight 0x0218 // @ C0218_CELL_ORDER_DOORPASS1_BACKLEFT_BACKRIGHT
-#define kCellOrder_BackLeft_BackRight_FrontRight 0x0321 // @ C0321_CELL_ORDER_BACKLEFT_BACKRIGHT_FRONTRIGHT
-#define kCellOrder_BackRight_FrontLeft_FrontRight 0x0342 // @ C0342_CELL_ORDER_BACKRIGHT_FRONTLEFT_FRONTRIGHT
-#define kCellOrder_DoorPass2_FrontLeft_FrontRight 0x0349 // @ C0349_CELL_ORDER_DOORPASS2_FRONTLEFT_FRONTRIGHT
-#define kCellOrder_BackRight_BackLeft_FrontLeft 0x0412 // @ C0412_CELL_ORDER_BACKRIGHT_BACKLEFT_FRONTLEFT
-#define kCellOrder_BackLeft_FrontRight_FrontLeft 0x0431 // @ C0431_CELL_ORDER_BACKLEFT_FRONTRIGHT_FRONTLEFT
-#define kCellOrder_DoorPass2_FrontRight_FrontLeft 0x0439 // @ C0439_CELL_ORDER_DOORPASS2_FRONTRIGHT_FRONTLEFT
-#define kCellOrder_BackLeft_BackRight_FrontLeft_FrontRight 0x3421 // @ C3421_CELL_ORDER_BACKLEFT_BACKRIGHT_FRONTLEFT_FRONTRIGHT
-#define kCellOrder_BackRight_BackLeft_FrontRight_FrontLeft 0x4312 // @ C4312_CELL_ORDER_BACKRIGHT_BACKLEFT_FRONTRIGHT_FRONTLEFT
-
-
-#define kFloorSetGraphicCount 2 // @ C002_FLOOR_SET_GRAPHIC_COUNT
-#define kWallSetGraphicCount 13 // @ C013_WALL_SET_GRAPHIC_COUNT
-#define kStairsGraphicCount 18 // @ C018_STAIRS_GRAPHIC_COUNT
-#define kDoorSetGraphicsCount 3 // @ C003_DOOR_SET_GRAPHIC_COUNT
-#define kDoorButtonCount 1 // @ C001_DOOR_BUTTON_COUNT
-#define kNativeBitmapIndex 0 // @ C0_NATIVE_BITMAP_INDEX
-#define kCoordinateSet 1 // @ C1_COORDINATE_SET
-#define kCreatureTypeCount 27 // @ C027_CREATURE_TYPE_COUNT
-#define kExplosionAspectCount 4 // @ C004_EXPLOSION_ASPECT_COUNT
-#define kObjAspectCount 85 // @ C085_OBJECT_ASPECT_COUNT
-#define kProjectileAspectCount 14 // @ C014_PROJECTILE_ASPECT_COUNT
+#define k0_ShiftSet_D0BackD1Front 0 // @ C0_SHIFT_SET_D0_BACK_OR_D1_FRONT
+#define k1_ShiftSet_D1BackD2Front 1 // @ C1_SHIFT_SET_D1_BACK_OR_D2_FRONT
+#define k2_ShiftSet_D2BackD3Front 2 // @ C2_SHIFT_SET_D2_BACK_OR_D3_FRONT
+
+#define k0x0008_CellOrder_DoorFront 0x0008 // @ MASK0x0008_DOOR_FRONT
+#define k0x0000_CellOrder_Alcove 0x0000 // @ C0000_CELL_ORDER_ALCOVE
+#define k0x0001_CellOrder_BackLeft 0x0001 // @ C0001_CELL_ORDER_BACKLEFT
+#define k0x0002_CellOrder_BackRight 0x0002 // @ C0002_CELL_ORDER_BACKRIGHT
+#define k0x0018_CellOrder_DoorPass1_BackLeft 0x0018 // @ C0018_CELL_ORDER_DOORPASS1_BACKLEFT
+#define k0x0021_CellOrder_BackLeft_BackRight 0x0021 // @ C0021_CELL_ORDER_BACKLEFT_BACKRIGHT
+#define k0x0028_CellOrder_DoorPass1_BackRight 0x0028 // @ C0028_CELL_ORDER_DOORPASS1_BACKRIGHT
+#define k0x0032_CellOrder_BackRight_FrontRight 0x0032 // @ C0032_CELL_ORDER_BACKRIGHT_FRONTRIGHT
+#define k0x0039_CellOrder_DoorPass2_FrontRight 0x0039 // @ C0039_CELL_ORDER_DOORPASS2_FRONTRIGHT
+#define k0x0041_CellOrder_BackLeft_FrontLeft 0x0041 // @ C0041_CELL_ORDER_BACKLEFT_FRONTLEFT
+#define k0x0049_CellOrder_DoorPass2_FrontLeft 0x0049 // @ C0049_CELL_ORDER_DOORPASS2_FRONTLEFT
+#define k0x0128_CellOrder_DoorPass1_BackRight_BackLeft 0x0128 // @ C0128_CELL_ORDER_DOORPASS1_BACKRIGHT_BACKLEFT
+#define k0x0218_CellOrder_DoorPass1_BackLeft_BackRight 0x0218 // @ C0218_CELL_ORDER_DOORPASS1_BACKLEFT_BACKRIGHT
+#define k0x0321_CellOrder_BackLeft_BackRight_FrontRight 0x0321 // @ C0321_CELL_ORDER_BACKLEFT_BACKRIGHT_FRONTRIGHT
+#define k0x0342_CellOrder_BackRight_FrontLeft_FrontRight 0x0342 // @ C0342_CELL_ORDER_BACKRIGHT_FRONTLEFT_FRONTRIGHT
+#define k0x0349_CellOrder_DoorPass2_FrontLeft_FrontRight 0x0349 // @ C0349_CELL_ORDER_DOORPASS2_FRONTLEFT_FRONTRIGHT
+#define k0x0412_CellOrder_BackRight_BackLeft_FrontLeft 0x0412 // @ C0412_CELL_ORDER_BACKRIGHT_BACKLEFT_FRONTLEFT
+#define k0x0431_CellOrder_BackLeft_FrontRight_FrontLeft 0x0431 // @ C0431_CELL_ORDER_BACKLEFT_FRONTRIGHT_FRONTLEFT
+#define k0x0439_CellOrder_DoorPass2_FrontRight_FrontLeft 0x0439 // @ C0439_CELL_ORDER_DOORPASS2_FRONTRIGHT_FRONTLEFT
+#define k0x3421_CellOrder_BackLeft_BackRight_FrontLeft_FrontRight 0x3421 // @ C3421_CELL_ORDER_BACKLEFT_BACKRIGHT_FRONTLEFT_FRONTRIGHT
+#define k0x4312_CellOrder_BackRight_BackLeft_FrontRight_FrontLeft 0x4312 // @ C4312_CELL_ORDER_BACKRIGHT_BACKLEFT_FRONTRIGHT_FRONTLEFT
+
+
+
/* Explosion aspects */
-#define kExplosionAspectFire 0 // @ C0_EXPLOSION_ASPECT_FIRE
-#define kExplosionAspectSpell 1 // @ C1_EXPLOSION_ASPECT_SPELL
-#define kExplosionAspectPoison 2 // @ C2_EXPLOSION_ASPECT_POISON
-#define kExplosionAspectSmoke 3 // @ C3_EXPLOSION_ASPECT_SMOKE
+#define k0_ExplosionAspectFire 0 // @ C0_EXPLOSION_ASPECT_FIRE
+#define k1_ExplosionAspectSpell 1 // @ C1_EXPLOSION_ASPECT_SPELL
+#define k2_ExplosionAspectPoison 2 // @ C2_EXPLOSION_ASPECT_POISON
+#define k3_ExplosionAspectSmoke 3 // @ C3_EXPLOSION_ASPECT_SMOKE
/* Creature info GraphicInfo */
-#define kCreatureInfoGraphicMaskAdditional 0x0003 // @ MASK0x0003_ADDITIONAL
-#define kCreatureInfoGraphicMaskFlipNonAttack 0x0004 // @ MASK0x0004_FLIP_NON_ATTACK
-#define kCreatureInfoGraphicMaskSide 0x0008 // @ MASK0x0008_SIDE
-#define kCreatureInfoGraphicMaskBack 0x0010 // @ MASK0x0010_BACK
-#define kCreatureInfoGraphicMaskAttack 0x0020 // @ MASK0x0020_ATTACK
-#define kCreatureInfoGraphicMaskSpecialD2Front 0x0080 // @ MASK0x0080_SPECIAL_D2_FRONT
-#define kCreatureInfoGraphicMaskSpecialD2FrontIsFlipped 0x0100 // @ MASK0x0100_SPECIAL_D2_FRONT_IS_FLIPPED_FRONT
-#define kCreatureInfoGraphicMaskFlipAttack 0x0200 // @ MASK0x0200_FLIP_ATTACK
-#define kCreatureInfoGraphicMaskFlipDuringAttack 0x0400 // @ MASK0x0400_FLIP_DURING_ATTACK
+#define k0x0003_CreatureInfoGraphicMaskAdditional 0x0003 // @ MASK0x0003_ADDITIONAL
+#define k0x0004_CreatureInfoGraphicMaskFlipNonAttack 0x0004 // @ MASK0x0004_FLIP_NON_ATTACK
+#define k0x0008_CreatureInfoGraphicMaskSide 0x0008 // @ MASK0x0008_SIDE
+#define k0x0010_CreatureInfoGraphicMaskBack 0x0010 // @ MASK0x0010_BACK
+#define k0x0020_CreatureInfoGraphicMaskAttack 0x0020 // @ MASK0x0020_ATTACK
+#define k0x0080_CreatureInfoGraphicMaskSpecialD2Front 0x0080 // @ MASK0x0080_SPECIAL_D2_FRONT
+#define k0x0100_CreatureInfoGraphicMaskSpecialD2FrontIsFlipped 0x0100 // @ MASK0x0100_SPECIAL_D2_FRONT_IS_FLIPPED_FRONT
+#define k0x0200_CreatureInfoGraphicMaskFlipAttack 0x0200 // @ MASK0x0200_FLIP_ATTACK
+#define k0x0400_CreatureInfoGraphicMaskFlipDuringAttack 0x0400 // @ MASK0x0400_FLIP_DURING_ATTACK
class ExplosionAspect {
public:
@@ -113,118 +117,118 @@ public:
ExplosionAspect(uint16 byteWidth, uint16 height) :_pixelWidth(byteWidth * 2), _height(height) {}
}; // @ EXPLOSION_ASPECT
-extern ExplosionAspect gExplosionAspects[kExplosionAspectCount];
+extern ExplosionAspect g211_ExplosionAspects[k4_ExplosionAspectCount]; // @ G0211_as_Graphic558_ExplosionAspects
-extern byte gProjectileScales[7]; // @ G0215_auc_Graphic558_ProjectileScales
+extern byte g215_ProjectileScales[7]; // @ G0215_auc_Graphic558_ProjectileScales
-#define kDerivedBitmapViewport 0 // @ C000_DERIVED_BITMAP_VIEWPORT
-#define kDerivedBitmapThievesEyeVisibleArea 1 // @ C001_DERIVED_BITMAP_THIEVES_EYE_VISIBLE_AREA
-#define kDerivedBitmapDamageToCreatureMedium 2 // @ C002_DERIVED_BITMAP_DAMAGE_TO_CREATURE_MEDIUM
-#define kDerivedBitmapDamageToCreatureSmall 3 // @ C003_DERIVED_BITMAP_DAMAGE_TO_CREATURE_SMALL
-#define kDerivedBitmapFirstWallOrnament 4 // @ C004_DERIVED_BITMAP_FIRST_WALL_ORNAMENT
-#define kDerivedBitmapFirstDoorOrnament_D3 68 // @ C068_DERIVED_BITMAP_FIRST_DOOR_ORNAMENT_D3
-#define kDerivedBitmapFirstDoorOrnament_D2 69 // @ C069_DERIVED_BITMAP_FIRST_DOOR_ORNAMENT_D2
-#define kDerivedBitmapFirstDoorButton 102 // @ C102_DERIVED_BITMAP_FIRST_DOOR_BUTTON
-#define kDerivedBitmapFirstObject 104 // @ C104_DERIVED_BITMAP_FIRST_OBJECT
-#define kDerivedBitmapFirstProjectile 282 // @ C282_DERIVED_BITMAP_FIRST_PROJECTILE
-#define kDerivedBitmapFirstExplosion 438 // @ C438_DERIVED_BITMAP_FIRST_EXPLOSION
-#define kDerivedBitmapFirstCreature 495 // @ C495_DERIVED_BITMAP_FIRST_CREATURE
+#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 kScale16_D3 16 // @ C16_SCALE_D3
-#define kScale20_D2 20 // @ C20_SCALE_D2
+#define k16_Scale_D3 16 // @ C16_SCALE_D3
+#define k20_Scale_D2 20 // @ C20_SCALE_D2
/* Object aspect GraphicInfo */
-#define kObjectFlipOnRightMask 0x0001 // @ MASK0x0001_FLIP_ON_RIGHT
-#define kObjectAlcoveMask 0x0010 // @ MASK0x0010_ALCOVE
+#define k0x0001_ObjectFlipOnRightMask 0x0001 // @ MASK0x0001_FLIP_ON_RIGHT
+#define k0x0010_ObjectAlcoveMask 0x0010 // @ MASK0x0010_ALCOVE
/* Projectile aspect GraphicInfo */
-#define kProjectileSideMask 0x0010 // @ MASK0x0010_SIDE
-#define kProjectileScaleWithKineticEnergyMask 0x0100 // @ MASK0x0100_SCALE_WITH_KINETIC_ENERGY
-#define kProjectileAspectTypeMask 0x0003 // @ MASK0x0003_ASPECT_TYPE
+#define k0x0010_ProjectileSideMask 0x0010 // @ MASK0x0010_SIDE
+#define k0x0100_ProjectileScaleWithKineticEnergyMask 0x0100 // @ MASK0x0100_SCALE_WITH_KINETIC_ENERGY
+#define k0x0003_ProjectileAspectTypeMask 0x0003 // @ MASK0x0003_ASPECT_TYPE
/* Projectile aspect type */
-#define kProjectileAspectHasBackGraphicRotation 0 // @ C0_PROJECTILE_ASPECT_TYPE_HAS_BACK_GRAPHIC_AND_ROTATION
-#define kProjectileAspectBackGraphic 1 // @ C1_PROJECTILE_ASPECT_TYPE_HAS_BACK_GRAPHIC_AND_NO_ROTATION
-#define kProjectileAspectHasRotation 2 // @ C2_PROJECTILE_ASPECT_TYPE_NO_BACK_GRAPHIC_AND_ROTATION
-#define kProjectileAspectHasNone 3 // @ C3_PROJECTILE_ASPECT_TYPE_NO_BACK_GRAPHIC_AND_NO_ROTATION
+#define k0_ProjectileAspectHasBackGraphicRotation 0 // @ C0_PROJECTILE_ASPECT_TYPE_HAS_BACK_GRAPHIC_AND_ROTATION
+#define k1_ProjectileAspectBackGraphic 1 // @ C1_PROJECTILE_ASPECT_TYPE_HAS_BACK_GRAPHIC_AND_NO_ROTATION
+#define k2_ProjectileAspectHasRotation 2 // @ C2_PROJECTILE_ASPECT_TYPE_NO_BACK_GRAPHIC_AND_ROTATION
+#define k3_ProjectileAspectHasNone 3 // @ C3_PROJECTILE_ASPECT_TYPE_NO_BACK_GRAPHIC_AND_NO_ROTATION
/* Projectile aspects */
-#define kProjectileAspectExplosionLightningBolt 3 // @ C03_PROJECTILE_ASPECT_EXPLOSION_LIGHTNING_BOLT
-#define kProjectileAspectExplosionFireBall 10 // @ C10_PROJECTILE_ASPECT_EXPLOSION_FIREBALL
-#define kProjectileAspectExplosionDefault 11 // @ C11_PROJECTILE_ASPECT_EXPLOSION_DEFAULT
-#define kProjectileAspectExplosionSlime 12 // @ C12_PROJECTILE_ASPECT_EXPLOSION_SLIME
-#define kProjectileAspectExplosionPoisonBoltCloud 13 // @ C13_PROJECTILE_ASPECT_EXPLOSION_POISON_BOLT_POISON_CLOUD
+#define k3_ProjectileAspectExplosionLightningBolt 3 // @ C03_PROJECTILE_ASPECT_EXPLOSION_LIGHTNING_BOLT
+#define k10_ProjectileAspectExplosionFireBall 10 // @ C10_PROJECTILE_ASPECT_EXPLOSION_FIREBALL
+#define k11_ProjectileAspectExplosionDefault 11 // @ C11_PROJECTILE_ASPECT_EXPLOSION_DEFAULT
+#define k12_ProjectileAspectExplosionSlime 12 // @ C12_PROJECTILE_ASPECT_EXPLOSION_SLIME
+#define k13_ProjectileAspectExplosionPoisonBoltCloud 13 // @ C13_PROJECTILE_ASPECT_EXPLOSION_POISON_BOLT_POISON_CLOUD
enum ViewCell {
- kViewCellFronLeft = 0, // @ C00_VIEW_CELL_FRONT_LEFT
- kViewCellFrontRight = 1, // @ C01_VIEW_CELL_FRONT_RIGHT
- kViewCellBackRight = 2, // @ C02_VIEW_CELL_BACK_RIGHT
- kViewCellBackLeft = 3, // @ C03_VIEW_CELL_BACK_LEFT
- kViewCellAlcove = 4, // @ C04_VIEW_CELL_ALCOVE
- kViewCellDoorButtonOrWallOrn = 5 // @ C05_VIEW_CELL_DOOR_BUTTON_OR_WALL_ORNAMENT
+ 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 {
- kInscriptionFontIndice = 120, // @ C120_GRAPHIC_INSCRIPTION_FONT
- kDoorMaskDestroyedIndice = 301, // @ C301_GRAPHIC_DOOR_MASK_DESTROYED
- kChampionPortraitsIndice = 26, // @ C026_GRAPHIC_CHAMPION_PORTRAITS
- kMovementArrowsIndice = 13, // @ C013_GRAPHIC_MOVEMENT_ARROWS
- kObjectIcons_000_TO_031 = 42, // @ C042_GRAPHIC_OBJECT_ICONS_000_TO_031
- kObjectIcons_032_TO_063 = 43, // @ C043_GRAPHIC_OBJECT_ICONS_032_TO_063
- kObjectIcons_064_TO_095 = 44, // @ C044_GRAPHIC_OBJECT_ICONS_064_TO_095
- kObjectIcons_096_TO_127 = 45, // @ C045_GRAPHIC_OBJECT_ICONS_096_TO_127
- kObjectIcons_128_TO_159 = 46, // @ C046_GRAPHIC_OBJECT_ICONS_128_TO_159
- kObjectIcons_160_TO_191 = 47, // @ C047_GRAPHIC_OBJECT_ICONS_160_TO_191
- kObjectIcons_192_TO_223 = 48, // @ C048_GRAPHIC_OBJECT_ICONS_192_TO_223
- kInventoryGraphicIndice = 17, // @ C017_GRAPHIC_INVENTORY
- kPanelEmptyIndice = 20, // @ C020_GRAPHIC_PANEL_EMPTY
- kFoodLabelIndice = 30, // @ C030_GRAPHIC_FOOD_LABEL
- kWaterLabelIndice = 31, // @ C031_GRAPHIC_WATER_LABEL
- kPoisionedLabelIndice = 32, // @ C032_GRAPHIC_POISONED_LABEL
- kPanelResurectReincaranteIndice = 40, // @ C040_GRAPHIC_PANEL_RESURRECT_REINCARNATE
- kBorderPartyShieldIndice = 37, // @ C037_GRAPHIC_BORDER_PARTY_SHIELD
- kBorderPartyFireshieldIndice = 38, // @ C038_GRAPHIC_BORDER_PARTY_FIRESHIELD
- kBorderPartySpellshieldIndice = 39, // @ C039_GRAPHIC_BORDER_PARTY_SPELLSHIELD
- kStatusBoxDeadChampion = 8, // @ C008_GRAPHIC_STATUS_BOX_DEAD_CHAMPION
- kSlotBoxNormalIndice = 33, // @ C033_GRAPHIC_SLOT_BOX_NORMAL
- kSlotBoxWoundedIndice = 34, // @ C034_GRAPHIC_SLOT_BOX_WOUNDED
- kChampionIcons = 28, // @ C028_GRAPHIC_CHAMPION_ICONS
- kFontGraphicIndice = 557, // @ C557_GRAPHIC_FONT
- kSlotBoxActingHandIndice = 35, // @ C035_GRAPHIC_SLOT_BOX_ACTING_HAND
- kPanelRenameChampionIndice = 27, // @ C027_GRAPHIC_PANEL_RENAME_CHAMPION
- kMenuActionAreaIndice = 10, // @ C010_GRAPHIC_MENU_ACTION_AREA
- kMenuSpellAreLinesIndice = 11, // @ C011_GRAPHIC_MENU_SPELL_AREA_LINES
- kMenuSpellAreaBackground = 9, // @ C009_GRAPHIC_MENU_SPELL_AREA_BACKGROUND
- kPanelOpenScrollIndice = 23, // @ C023_GRAPHIC_PANEL_OPEN_SCROLL
- kPanelOpenChestIndice = 25, // @ C025_GRAPHIC_PANEL_OPEN_CHEST
- kEyeForObjectDescriptionIndice = 19, // @ C019_GRAPHIC_EYE_FOR_OBJECT_DESCRIPTION
- kArrowForChestContentIndice = 18, // @ C018_GRAPHIC_ARROW_FOR_CHEST_CONTENT
- kObjectDescCircleIndice = 29, // @ C029_GRAPHIC_OBJECT_DESCRIPTION_CIRCLE
- kFloorOrn_15_D3L_footprints = 241, // @ C241_GRAPHIC_FLOOR_ORNAMENT_15_D3L_FOOTPRINTS
- kFieldMask_D3R_GraphicIndice = 69, // @ C069_GRAPHIC_FIELD_MASK_D3R
- kFieldTeleporterGraphicIndice = 73, // @ C073_GRAPHIC_FIELD_TELEPORTER
- kFirstExplosionGraphicIndice = 348, // @ C348_GRAPHIC_FIRST_EXPLOSION
- kFirstObjectGraphicIndice = 360, // @ C360_GRAPHIC_FIRST_OBJECT
- kFirstCreatureGraphicIndice = 446, // @ C446_GRAPHIC_FIRST_CREATURE
- kFirstProjectileGraphicIndice = 316, // @ C316_GRAPHIC_FIRST_PROJECTILE
- kFirstExplosionPatternGraphicIndice = 351, // @ C351_GRAPHIC_FIRST_EXPLOSION_PATTERN
- k049FloorPit_D3L_GraphicIndice = 49, // @ C049_GRAPHIC_FLOOR_PIT_D3L
- k050FloorPit_D3C_GraphicIndice = 50, // @ C050_GRAPHIC_FLOOR_PIT_D3C
- k051FloorPit_D2L_GraphicIndice = 51, // @ C051_GRAPHIC_FLOOR_PIT_D2L
- k052FloorPit_D2C_GraphicIndice = 52, // @ C052_GRAPHIC_FLOOR_PIT_D2C
- k053FloorPit_D1L_GraphicIndice = 53, // @ C053_GRAPHIC_FLOOR_PIT_D1L
- k054FloorPit_D1C_GraphicIndice = 54, // @ C054_GRAPHIC_FLOOR_PIT_D1C
- k055FloorPit_D0L_GraphicIndice = 55, // @ C055_GRAPHIC_FLOOR_PIT_D0L
- k056FloorPit_D0C_GraphicIndice = 56 // @ C056_GRAPHIC_FLOOR_PIT_D0C
+ k8_StatusBoxDeadChampion = 8, // @ C008_GRAPHIC_STATUS_BOX_DEAD_CHAMPION
+ k9_MenuSpellAreaBackground = 9, // @ C009_GRAPHIC_MENU_SPELL_AREA_BACKGROUND
+ k10_MenuActionAreaIndice = 10, // @ C010_GRAPHIC_MENU_ACTION_AREA
+ k11_MenuSpellAreLinesIndice = 11, // @ C011_GRAPHIC_MENU_SPELL_AREA_LINES
+ k13_MovementArrowsIndice = 13, // @ C013_GRAPHIC_MOVEMENT_ARROWS
+ k17_InventoryGraphicIndice = 17, // @ C017_GRAPHIC_INVENTORY
+ k18_ArrowForChestContentIndice = 18, // @ C018_GRAPHIC_ARROW_FOR_CHEST_CONTENT
+ k19_EyeForObjectDescriptionIndice = 19, // @ C019_GRAPHIC_EYE_FOR_OBJECT_DESCRIPTION
+ k20_PanelEmptyIndice = 20, // @ C020_GRAPHIC_PANEL_EMPTY
+ k23_PanelOpenScrollIndice = 23, // @ C023_GRAPHIC_PANEL_OPEN_SCROLL
+ k25_PanelOpenChestIndice = 25, // @ C025_GRAPHIC_PANEL_OPEN_CHEST
+ k26_ChampionPortraitsIndice = 26, // @ C026_GRAPHIC_CHAMPION_PORTRAITS
+ k27_PanelRenameChampionIndice = 27, // @ C027_GRAPHIC_PANEL_RENAME_CHAMPION
+ k28_ChampionIcons = 28, // @ C028_GRAPHIC_CHAMPION_ICONS
+ k29_ObjectDescCircleIndice = 29, // @ C029_GRAPHIC_OBJECT_DESCRIPTION_CIRCLE
+ k30_FoodLabelIndice = 30, // @ C030_GRAPHIC_FOOD_LABEL
+ k31_WaterLabelIndice = 31, // @ C031_GRAPHIC_WATER_LABEL
+ k32_PoisionedLabelIndice = 32, // @ C032_GRAPHIC_POISONED_LABEL
+ k33_SlotBoxNormalIndice = 33, // @ C033_GRAPHIC_SLOT_BOX_NORMAL
+ k34_SlotBoxWoundedIndice = 34, // @ C034_GRAPHIC_SLOT_BOX_WOUNDED
+ k35_SlotBoxActingHandIndice = 35, // @ C035_GRAPHIC_SLOT_BOX_ACTING_HAND
+ k37_BorderPartyShieldIndice = 37, // @ C037_GRAPHIC_BORDER_PARTY_SHIELD
+ k38_BorderPartyFireshieldIndice = 38, // @ C038_GRAPHIC_BORDER_PARTY_FIRESHIELD
+ k39_BorderPartySpellshieldIndice = 39, // @ C039_GRAPHIC_BORDER_PARTY_SPELLSHIELD
+ k40_PanelResurectReincaranteIndice = 40, // @ C040_GRAPHIC_PANEL_RESURRECT_REINCARNATE
+ k42_ObjectIcons_000_TO_031 = 42, // @ C042_GRAPHIC_OBJECT_ICONS_000_TO_031
+ k43_ObjectIcons_032_TO_063 = 43, // @ C043_GRAPHIC_OBJECT_ICONS_032_TO_063
+ k44_ObjectIcons_064_TO_095 = 44, // @ C044_GRAPHIC_OBJECT_ICONS_064_TO_095
+ k45_ObjectIcons_096_TO_127 = 45, // @ C045_GRAPHIC_OBJECT_ICONS_096_TO_127
+ k46_ObjectIcons_128_TO_159 = 46, // @ C046_GRAPHIC_OBJECT_ICONS_128_TO_159
+ k47_ObjectIcons_160_TO_191 = 47, // @ C047_GRAPHIC_OBJECT_ICONS_160_TO_191
+ k48_ObjectIcons_192_TO_223 = 48, // @ C048_GRAPHIC_OBJECT_ICONS_192_TO_223
+ k49_FloorPit_D3L_GraphicIndice = 49, // @ C049_GRAPHIC_FLOOR_PIT_D3L
+ k50_FloorPit_D3C_GraphicIndice = 50, // @ C050_GRAPHIC_FLOOR_PIT_D3C
+ k51_FloorPit_D2L_GraphicIndice = 51, // @ C051_GRAPHIC_FLOOR_PIT_D2L
+ k52_FloorPit_D2C_GraphicIndice = 52, // @ C052_GRAPHIC_FLOOR_PIT_D2C
+ k53_FloorPit_D1L_GraphicIndice = 53, // @ C053_GRAPHIC_FLOOR_PIT_D1L
+ k54_FloorPit_D1C_GraphicIndice = 54, // @ C054_GRAPHIC_FLOOR_PIT_D1C
+ k55_FloorPit_D0L_GraphicIndice = 55, // @ C055_GRAPHIC_FLOOR_PIT_D0L
+ k56_FloorPit_D0C_GraphicIndice = 56, // @ C056_GRAPHIC_FLOOR_PIT_D0C
+ k69_FieldMask_D3R_GraphicIndice = 69, // @ C069_GRAPHIC_FIELD_MASK_D3R
+ k73_FieldTeleporterGraphicIndice = 73, // @ C073_GRAPHIC_FIELD_TELEPORTER
+ k120_InscriptionFontIndice = 120, // @ C120_GRAPHIC_INSCRIPTION_FONT
+ k241_FloorOrn_15_D3L_footprints = 241, // @ C241_GRAPHIC_FLOOR_ORNAMENT_15_D3L_FOOTPRINTS
+ k301_DoorMaskDestroyedIndice = 301, // @ C301_GRAPHIC_DOOR_MASK_DESTROYED
+ k316_FirstProjectileGraphicIndice = 316, // @ C316_GRAPHIC_FIRST_PROJECTILE
+ k348_FirstExplosionGraphicIndice = 348, // @ C348_GRAPHIC_FIRST_EXPLOSION
+ k351_FirstExplosionPatternGraphicIndice = 351, // @ C351_GRAPHIC_FIRST_EXPLOSION_PATTERN
+ k360_FirstObjectGraphicIndice = 360, // @ C360_GRAPHIC_FIRST_OBJECT
+ k446_FirstCreatureGraphicIndice = 446, // @ C446_GRAPHIC_FIRST_CREATURE
+ k557_FontGraphicIndice = 557 // @ C557_GRAPHIC_FONT
};
-extern uint16 gPalSwoosh[16];
-extern uint16 gPalMousePointer[16];
-extern uint16 gPalCredits[16];
-extern uint16 gPalEntrance[16];
-extern uint16 gPalDungeonView[6][16];
+extern uint16 gK57_PalSwoosh[16]; // @ K0057_aui_Palette_Swoosh
+extern uint16 gK150_PalMousePointer[16]; // @ K0150_aui_Palette_MousePointer
+extern uint16 g19_PalCredits[16]; // @ G0019_aui_Graphic562_Palette_Credits
+extern uint16 g20_PalEntrance[16]; // @ G0020_aui_Graphic562_Palette_Entrance
+extern uint16 g21_PalDungeonView[6][16]; // @ G0021_aaui_Graphic562_Palette_DungeonView
class Box {
public:
@@ -241,7 +245,7 @@ public:
void setToZero() { _x1 = _x2 = _y1 = _y2 = 0; }
}; // @ BOX_BYTE, BOX_WORD
-extern Box gBoxMovementArrows; // G0002_s_Graphic562_Box_MovementArrows
+extern Box g2_BoxMovementArrows; // G0002_s_Graphic562_Box_MovementArrows
class Frame {
public:
@@ -257,47 +261,47 @@ public:
};
enum WallSet {
- kWallSetStone = 0 // @ C0_WALL_SET_STONE
+ k0_WallSetStone = 0 // @ C0_WALL_SET_STONE
};
enum FloorSet {
- kFloorSetStone = 0 // @ C0_FLOOR_SET_STONE
+ k0_FloorSetStone = 0 // @ C0_FLOOR_SET_STONE
};
enum ViewWall {
- kViewWall_D3L_RIGHT = 0, // @ C00_VIEW_WALL_D3L_RIGHT
- kViewWall_D3R_LEFT = 1, // @ C01_VIEW_WALL_D3R_LEFT
- kViewWall_D3L_FRONT = 2, // @ C02_VIEW_WALL_D3L_FRONT
- kViewWall_D3C_FRONT = 3, // @ C03_VIEW_WALL_D3C_FRONT
- kViewWall_D3R_FRONT = 4, // @ C04_VIEW_WALL_D3R_FRONT
- kViewWall_D2L_RIGHT = 5, // @ C05_VIEW_WALL_D2L_RIGHT
- kViewWall_D2R_LEFT = 6, // @ C06_VIEW_WALL_D2R_LEFT
- kViewWall_D2L_FRONT = 7, // @ C07_VIEW_WALL_D2L_FRONT
- kViewWall_D2C_FRONT = 8, // @ C08_VIEW_WALL_D2C_FRONT
- kViewWall_D2R_FRONT = 9, // @ C09_VIEW_WALL_D2R_FRONT
- kViewWall_D1L_RIGHT = 10, // @ C10_VIEW_WALL_D1L_RIGHT
- kViewWall_D1R_LEFT = 11, // @ C11_VIEW_WALL_D1R_LEFT
- kViewWall_D1C_FRONT = 12 // @ C12_VIEW_WALL_D1C_FRONT
+ k0_ViewWall_D3L_RIGHT = 0, // @ C00_VIEW_WALL_D3L_RIGHT
+ k1_ViewWall_D3R_LEFT = 1, // @ C01_VIEW_WALL_D3R_LEFT
+ k2_ViewWall_D3L_FRONT = 2, // @ C02_VIEW_WALL_D3L_FRONT
+ k3_ViewWall_D3C_FRONT = 3, // @ C03_VIEW_WALL_D3C_FRONT
+ k4_ViewWall_D3R_FRONT = 4, // @ C04_VIEW_WALL_D3R_FRONT
+ k5_ViewWall_D2L_RIGHT = 5, // @ C05_VIEW_WALL_D2L_RIGHT
+ k6_ViewWall_D2R_LEFT = 6, // @ C06_VIEW_WALL_D2R_LEFT
+ k7_ViewWall_D2L_FRONT = 7, // @ C07_VIEW_WALL_D2L_FRONT
+ k8_ViewWall_D2C_FRONT = 8, // @ C08_VIEW_WALL_D2C_FRONT
+ k9_ViewWall_D2R_FRONT = 9, // @ C09_VIEW_WALL_D2R_FRONT
+ k10_ViewWall_D1L_RIGHT = 10, // @ C10_VIEW_WALL_D1L_RIGHT
+ k11_ViewWall_D1R_LEFT = 11, // @ C11_VIEW_WALL_D1R_LEFT
+ k12_ViewWall_D1C_FRONT = 12 // @ C12_VIEW_WALL_D1C_FRONT
};
enum Color {
- kColorNoTransparency = 255,
- kColorBlack = 0,
- kColorDarkGary = 1,
- kColorLightGray = 2,
- kColorDarkBrown = 3,
- kColorCyan = 4,
- kColorLightBrown = 5,
- kColorDarkGreen = 6,
- kColorLightGreen = 7,
- kColorRed = 8,
- kColorGold = 9,
- kColorFlesh = 10,
- kColorYellow = 11,
- kColorDarkestGray = 12,
- kColorLightestGray = 13,
- kColorBlue = 14,
- kColorWhite = 15
+ k255_ColorNoTransparency = 255,
+ 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 {
@@ -326,7 +330,8 @@ public:
:_posX(posX), _posY(posY), _width(width), _height(height) {}
};
-struct CreatureAspect {
+class CreatureAspect {
+public:
uint16 _firstNativeBitmapRelativeIndex;
uint16 _firstDerivedBitmapIndex;
byte _byteWidthFront;
@@ -335,16 +340,33 @@ struct CreatureAspect {
byte _heightSide;
byte _byteWidthAttack;
byte _heightAttack;
+private:
byte _coordinateSet_TransparentColor;
byte _replacementColorSetIndices;
+public:
+
+ CreatureAspect(uint16 uint161, uint16 uint162, byte byte0, byte byte1, byte byte2, byte byte3, byte byte4, byte byte5, byte byte6, byte byte7)
+ : _firstNativeBitmapRelativeIndex(uint161),
+ _firstDerivedBitmapIndex(uint162),
+ _byteWidthFront(byte0 * 2),
+ _heightFront(byte1),
+ _byteWidthSide(byte2 * 2),
+ _heightSide(byte3),
+ _byteWidthAttack(byte4 * 2),
+ _heightAttack(byte5),
+ _coordinateSet_TransparentColor(byte6),
+ _replacementColorSetIndices(byte7) {}
byte getCoordSet() { return (_coordinateSet_TransparentColor >> 4) & 0xF; } // @ M71_COORDINATE_SET
byte getTranspColour() { return _coordinateSet_TransparentColor & 0xF; } // @ M72_TRANSPARENT_COLOR
byte getReplColour10() { return (_replacementColorSetIndices >> 4) & 0xF; } // @ M74_COLOR_10_REPLACEMENT_COLOR_SET
byte getReplColour9() { return _replacementColorSetIndices & 0xF; } // @ M73_COLOR_09_REPLACEMENT_COLOR_SET
+
+
}; // @ CREATURE_ASPECT
-struct ObjectAspect {
+class ObjectAspect {
+public:
byte _firstNativeBitmapRelativeIndex;
byte _firstDerivedBitmapRelativeIndex;
byte _width;
@@ -356,7 +378,8 @@ struct ObjectAspect {
_width(byteWidth * 2), _height(h), _graphicInfo(grap), _coordinateSet(coord) {}
}; // @ OBJECT_ASPECT
-struct ProjectileAspect {
+class ProjectileAspect {
+public:
byte _firstNativeBitmapRelativeIndex;
byte _firstDerivedBitmapRelativeIndex;
byte _width;
@@ -368,7 +391,8 @@ struct ProjectileAspect {
_width(byteWidth * 2), _height(h), _graphicInfo(grap) {}
}; // @ PROJECTIL_ASPECT
-struct CreatureReplColorSet {
+class CreatureReplColorSet {
+public:
uint16 _RGBColor[6];
byte _D2ReplacementColor;
byte _D3ReplacementColor;
@@ -377,15 +401,12 @@ struct CreatureReplColorSet {
extern Viewport gDefultViewPort;
extern Viewport gDungeonViewport;
-#define kAlcoveOrnCount 3
-#define kFountainOrnCount 1
-
-#define kDoorButton 0 // @ C0_DOOR_BUTTON
-#define kWallOrnInscription 0 // @ C0_WALL_ORNAMENT_INSCRIPTION
-#define kFloorOrnFootprints 15 // @ C15_FLOOR_ORNAMENT_FOOTPRINTS
-#define kDoorOrnDestroyedMask 15 // @ C15_DOOR_ORNAMENT_DESTROYED_MASK
-#define kDoorOrnThivesEyeMask 16 // @ C16_DOOR_ORNAMENT_THIEVES_EYE_MASK
+#define k0_DoorButton 0 // @ C0_DOOR_BUTTON
+#define k0_WallOrnInscription 0 // @ C0_WALL_ORNAMENT_INSCRIPTION
+#define k15_FloorOrnFootprints 15 // @ C15_FLOOR_ORNAMENT_FOOTPRINTS
+#define k15_DoorOrnDestroyedMask 15 // @ C15_DOOR_ORNAMENT_DESTROYED_MASK
+#define k16_DoorOrnThivesEyeMask 16 // @ C16_DOOR_ORNAMENT_THIEVES_EYE_MASK
class DisplayMan {
friend class DM::TextMan;
@@ -405,9 +426,9 @@ class DisplayMan {
byte *_wallSetBitMaps[25]; // @G[0696..0710]_puc_Bitmap_WallSet_...
// pointers are not owned by these fields
- byte *_floorBitmap;
- byte *_ceilingBitmap;
- byte *_palChangesProjectile[4]; // @G0075_apuc_PaletteChanges_Projectile
+ byte *_g84_floorBitmap; // @ G0084_puc_Bitmap_Floor
+ byte *_g85_ceilingBitmap; // @ G0085_puc_Bitmap_Ceiling
+ byte *_g75_palChangesProjectile[4]; // @G0075_apuc_PaletteChanges_Projectile
DisplayMan(const DisplayMan &other); // no implementation on purpose
void operator=(const DisplayMan &rhs); // no implementation on purpose
@@ -440,30 +461,30 @@ class DisplayMan {
bool isDrawnWallOrnAnAlcove(int16 wallOrnOrd, ViewWall viewWallIndex); // @ F0107_DUNGEONVIEW_IsDrawnWallOrnamentAnAlcove_CPSF
- uint16 *_derivedBitmapByteCount; // @ G0639_pui_DerivedBitmapByteCount
- byte **_derivedBitmaps; // @ G0638_pui_DerivedBitmapBlockIndices
-
- int16 _g0675stairsNativeBitmapIndex_Up_Front_D3L; // @ G0675_i_StairsNativeBitmapIndex_Up_Front_D3L
- int16 _g0676stairsNativeBitmapIndex_Up_Front_D3C; // @ G0676_i_StairsNativeBitmapIndex_Up_Front_D3C
- int16 _g0677stairsNativeBitmapIndex_Up_Front_D2L; // @ G0677_i_StairsNativeBitmapIndex_Up_Front_D2L
- int16 _g0678stairsNativeBitmapIndex_Up_Front_D2C; // @ G0678_i_StairsNativeBitmapIndex_Up_Front_D2C
- int16 _g0679stairsNativeBitmapIndex_Up_Front_D1L; // @ G0679_i_StairsNativeBitmapIndex_Up_Front_D1L
- int16 _g0680stairsNativeBitmapIndex_Up_Front_D1C; // @ G0680_i_StairsNativeBitmapIndex_Up_Front_D1C
- int16 _g0681stairsNativeBitmapIndex_Up_Front_D0C_Left; // @ G0681_i_StairsNativeBitmapIndex_Up_Front_D0C_Left
- int16 _g0682stairsNativeBitmapIndex_Down_Front_D3L; // @ G0682_i_StairsNativeBitmapIndex_Down_Front_D3L
- int16 _g0683stairsNativeBitmapIndex_Down_Front_D3C; // @ G0683_i_StairsNativeBitmapIndex_Down_Front_D3C
- int16 _g0684stairsNativeBitmapIndex_Down_Front_D2L; // @ G0684_i_StairsNativeBitmapIndex_Down_Front_D2L
- int16 _g0685stairsNativeBitmapIndex_Down_Front_D2C; // @ G0685_i_StairsNativeBitmapIndex_Down_Front_D2C
- int16 _g0686stairsNativeBitmapIndex_Down_Front_D1L; // @ G0686_i_StairsNativeBitmapIndex_Down_Front_D1L
- int16 _g0687stairsNativeBitmapIndex_Down_Front_D1C; // @ G0687_i_StairsNativeBitmapIndex_Down_Front_D1C
- int16 _g0688stairsNativeBitmapIndex_Down_Front_D0C_Left; // @ G0688_i_StairsNativeBitmapIndex_Down_Front_D0C_Left
- int16 _g0689stairsNativeBitmapIndex_Side_D2L; // @ G0689_i_StairsNativeBitmapIndex_Side_D2L
- int16 _g0690stairsNativeBitmapIndex_Up_Side_D1L; // @ G0690_i_StairsNativeBitmapIndex_Up_Side_D1L
- int16 _g0691stairsNativeBitmapIndex_Down_Side_D1L; // @ G0691_i_StairsNativeBitmapIndex_Down_Side_D1L
- int16 _g0692stairsNativeBitmapIndex_Side_D0L; // @ G0692_i_StairsNativeBitmapIndex_Side_D0L
+ uint16 *_g639_derivedBitmapByteCount; // @ G0639_pui_DerivedBitmapByteCount
+ byte **_g638_derivedBitmaps; // @ G0638_pui_DerivedBitmapBlockIndices
+
+ int16 _g675_stairsNativeBitmapIndex_Up_Front_D3L; // @ G0675_i_StairsNativeBitmapIndex_Up_Front_D3L
+ int16 _g676_stairsNativeBitmapIndex_Up_Front_D3C; // @ G0676_i_StairsNativeBitmapIndex_Up_Front_D3C
+ int16 _g677_stairsNativeBitmapIndex_Up_Front_D2L; // @ G0677_i_StairsNativeBitmapIndex_Up_Front_D2L
+ int16 _g678_stairsNativeBitmapIndex_Up_Front_D2C; // @ G0678_i_StairsNativeBitmapIndex_Up_Front_D2C
+ int16 _g679_stairsNativeBitmapIndex_Up_Front_D1L; // @ G0679_i_StairsNativeBitmapIndex_Up_Front_D1L
+ int16 _g680_stairsNativeBitmapIndex_Up_Front_D1C; // @ G0680_i_StairsNativeBitmapIndex_Up_Front_D1C
+ int16 _g681_stairsNativeBitmapIndex_Up_Front_D0C_Left; // @ G0681_i_StairsNativeBitmapIndex_Up_Front_D0C_Left
+ int16 _g682_stairsNativeBitmapIndex_Down_Front_D3L; // @ G0682_i_StairsNativeBitmapIndex_Down_Front_D3L
+ int16 _g683_stairsNativeBitmapIndex_Down_Front_D3C; // @ G0683_i_StairsNativeBitmapIndex_Down_Front_D3C
+ int16 _g684_stairsNativeBitmapIndex_Down_Front_D2L; // @ G0684_i_StairsNativeBitmapIndex_Down_Front_D2L
+ int16 _g685_stairsNativeBitmapIndex_Down_Front_D2C; // @ G0685_i_StairsNativeBitmapIndex_Down_Front_D2C
+ int16 _g686_stairsNativeBitmapIndex_Down_Front_D1L; // @ G0686_i_StairsNativeBitmapIndex_Down_Front_D1L
+ int16 _g687_stairsNativeBitmapIndex_Down_Front_D1C; // @ G0687_i_StairsNativeBitmapIndex_Down_Front_D1C
+ int16 _g688_stairsNativeBitmapIndex_Down_Front_D0C_Left; // @ G0688_i_StairsNativeBitmapIndex_Down_Front_D0C_Left
+ int16 _g689_stairsNativeBitmapIndex_Side_D2L; // @ G0689_i_StairsNativeBitmapIndex_Side_D2L
+ int16 _g690_stairsNativeBitmapIndex_Up_Side_D1L; // @ G0690_i_StairsNativeBitmapIndex_Up_Side_D1L
+ int16 _g691_stairsNativeBitmapIndex_Down_Side_D1L; // @ G0691_i_StairsNativeBitmapIndex_Down_Side_D1L
+ int16 _g692_stairsNativeBitmapIndex_Side_D0L; // @ G0692_i_StairsNativeBitmapIndex_Side_D0L
public:
// some methods use this for a stratchpad, don't make assumptions about content between function calls
- byte *_tmpBitmap;
+ byte *_g74_tmpBitmap; // @ G0074_puc_Bitmap_Temporary
explicit DisplayMan(DMEngine *dmEngine);
~DisplayMan();
@@ -484,25 +505,25 @@ public:
void blitToBitmap(byte *srcBitmap, uint16 srcWidth, uint16 srcX, uint16 srcY,
byte *destBitmap, uint16 destWidth,
uint16 destFromX, uint16 destToX, uint16 destFromY, uint16 destToY,
- Color transparent = kColorNoTransparency, Viewport &viewport = gDefultViewPort);
+ Color transparent = k255_ColorNoTransparency, Viewport &viewport = gDefultViewPort);
void blitToBitmap(byte *srcBitmap, uint16 srcWidth, uint16 srcX, uint16 srcY,
- byte *destBitmap, uint16 destWidth, Box &box, Color transparent = kColorNoTransparency, Viewport &viewport = gDefultViewPort);
+ byte *destBitmap, uint16 destWidth, Box &box, Color transparent = k255_ColorNoTransparency, Viewport &viewport = gDefultViewPort);
void blitToBitmapShrinkWithPalChange(byte *srcBitmap, int16 srcWidth, int16 srcHight,
byte *destBitmap, int16 destWidth, int16 destHeight, byte *palChange); // @ F0129_VIDEO_BlitShrinkWithPaletteChanges
void blitToBitmap(byte *srcBitmap, uint16 srcWidth, uint16 srcHeight, byte *destBitmap, uint16 destWidth, uint16 destX = 0, uint16 destY = 0);
void blitToScreen(byte *srcBitmap, uint16 srcWidth, uint16 srcX, uint16 srcY,
uint16 destFromX, uint16 destToX, uint16 destFromY, uint16 destToY,
- Color transparent = kColorNoTransparency, Viewport &viewport = gDefultViewPort);
+ Color transparent = k255_ColorNoTransparency, Viewport &viewport = gDefultViewPort);
void blitToScreen(byte *srcBitmap, uint16 srcWidth, uint16 srcX, uint16 srcY,
Box &box,
- Color transparent = kColorNoTransparency, Viewport &viewport = gDefultViewPort);
+ Color transparent = k255_ColorNoTransparency, Viewport &viewport = gDefultViewPort);
void blitBoxFilledWithMaskedBitmap(byte *src, byte *dest, byte *mask, byte *tmp, Box &box, int16 lastUnitIndex,
int16 firstUnitIndex, int16 destPixelWidth, Color transparent,
int16 xPos, int16 yPos, int16 destHeight, int16 height2, Viewport &viewport = gDefultViewPort); // @ F0133_VIDEO_BlitBoxFilledWithMaskedBitmap
void blitBoxFilledWithMaskedBitmapToScreen(byte *src, byte *mask, byte *tmp, Box &box, int16 lastUnitIndex,
- int16 firstUnitIndex, int16 destPixelWidth, Color transparent,
- int16 xPos, int16 yPos, int16 destHeight, int16 height2, Viewport &viewport = gDungeonViewport); // @ F0133_VIDEO_BlitBoxFilledWithMaskedBitmap
+ int16 firstUnitIndex, int16 destPixelWidth, Color transparent,
+ int16 xPos, int16 yPos, int16 destHeight, int16 height2, Viewport &viewport = gDungeonViewport); // @ F0133_VIDEO_BlitBoxFilledWithMaskedBitmap
void flipBitmapHorizontal(byte *bitmap, uint16 width, uint16 height);
void flipBitmapVertical(byte *bitmap, uint16 width, uint16 height);
@@ -521,29 +542,29 @@ public:
int16 getScaledBitmapPixelCount(int16 pixelWidth, int16 pixelHeight, int16 scale); // @ F0459_START_GetScaledBitmapByteCount
int16 getScaledDimension(int16 dimension, int16 scale); // @ M78_SCALED_DIMENSION
void cthulhu(Thing thingParam, direction directionParam,
- int16 mapXpos, int16 mapYpos, int16 viewSquareIndex,
- uint16 orderedViewCellOrdinals); // @ F0115_DUNGEONVIEW_DrawObjectsCreaturesProjectilesExplosions_CPSEF
+ int16 mapXpos, int16 mapYpos, int16 viewSquareIndex,
+ uint16 orderedViewCellOrdinals); // @ F0115_DUNGEONVIEW_DrawObjectsCreaturesProjectilesExplosions_CPSEF
uint16 getNormalizedByteWidthM77(uint16 byteWidth); // @ M77_NORMALIZED_BYTE_WIDTH
uint16 getVerticalOffsetM23(uint16 val); // @ M23_VERTICAL_OFFSET
uint16 getHorizontalOffsetM22(uint16 val); // @ M22_HORIZONTAL_OFFSET
- int16 _championPortraitOrdinal; // @ G0289_i_DungeonView_ChampionPortraitOrdinal
- int16 _currMapAlcoveOrnIndices[kAlcoveOrnCount]; // @ G0267_ai_CurrentMapAlcoveOrnamentIndices
- int16 _currMapFountainOrnIndices[kFountainOrnCount]; // @ G0268_ai_CurrentMapFountainOrnamentIndices
- int16 _currMapWallOrnInfo[16][2]; // @ G0101_aai_CurrentMapWallOrnamentsInfo
- int16 _currMapFloorOrnInfo[16][2]; // @ G0102_aai_CurrentMapFloorOrnamentsInfo
- int16 _currMapDoorOrnInfo[17][2]; // @ G0103_aai_CurrentMapDoorOrnamentsInfo
- byte *_currMapAllowedCreatureTypes; // @ G0264_puc_CurrentMapAllowedCreatureTypes
- byte _currMapWallOrnIndices[16]; // @ G0261_auc_CurrentMapWallOrnamentIndices
- byte _currMapFloorOrnIndices[16]; // @ G0262_auc_CurrentMapFloorOrnamentIndices
- byte _currMapDoorOrnIndices[18]; // @ G0263_auc_CurrentMapDoorOrnamentIndices
+ int16 _g289_championPortraitOrdinal; // @ G0289_i_DungeonView_ChampionPortraitOrdinal
+ int16 _g267_currMapAlcoveOrnIndices[k3_AlcoveOrnCount]; // @ G0267_ai_CurrentMapAlcoveOrnamentIndices
+ int16 _g268_currMapFountainOrnIndices[k1_FountainOrnCount]; // @ G0268_ai_CurrentMapFountainOrnamentIndices
+ int16 _g101_currMapWallOrnInfo[16][2]; // @ G0101_aai_CurrentMapWallOrnamentsInfo
+ int16 _g102_currMapFloorOrnInfo[16][2]; // @ G0102_aai_CurrentMapFloorOrnamentsInfo
+ int16 _g103_currMapDoorOrnInfo[17][2]; // @ G0103_aai_CurrentMapDoorOrnamentsInfo
+ byte *_g264_currMapAllowedCreatureTypes; // @ G0264_puc_CurrentMapAllowedCreatureTypes
+ byte _g261_currMapWallOrnIndices[16]; // @ G0261_auc_CurrentMapWallOrnamentIndices
+ byte _g262_currMapFloorOrnIndices[16]; // @ G0262_auc_CurrentMapFloorOrnamentIndices
+ byte _g263_currMapDoorOrnIndices[18]; // @ G0263_auc_CurrentMapDoorOrnamentIndices
- int16 _currMapViAltarIndex; // @ G0266_i_CurrentMapViAltarWallOrnamentIndex
+ int16 _g266_currMapViAltarIndex; // @ G0266_i_CurrentMapViAltarWallOrnamentIndex
- Thing _inscriptionThing; // @ G0290_T_DungeonView_InscriptionThing
+ Thing _g290_inscriptionThing; // @ G0290_T_DungeonView_InscriptionThing
- bool _useByteBoxCoordinates; // @ G0578_B_UseByteBoxCoordinates
- bool _doNotDrawFluxcagesDuringEndgame; // @ G0077_B_DoNotDrawFluxcagesDuringEndgame
+ bool _g578_useByteBoxCoordinates; // @ G0578_B_UseByteBoxCoordinates
+ bool _g77_doNotDrawFluxcagesDuringEndgame; // @ G0077_B_DoNotDrawFluxcagesDuringEndgame
bool isDerivedBitmapInCache(int16 derivedBitmapIndex); // @ F0491_CACHE_IsDerivedBitmapInCache
byte *getDerivedBitmap(int16 derivedBitmapIndex); // @ F0492_CACHE_GetDerivedBitmap
diff --git a/engines/dm/inventory.cpp b/engines/dm/inventory.cpp
index b3c3a900d2..d7382340f3 100644
--- a/engines/dm/inventory.cpp
+++ b/engines/dm/inventory.cpp
@@ -87,22 +87,22 @@ void InventoryMan::toggleInventory(ChampionIndex championIndex) {
}
}
- dm._useByteBoxCoordinates = false;
+ dm._g578_useByteBoxCoordinates = false;
_inventoryChampionOrdinal = _vm->indexToOrdinal(championIndex);
if (!invChampOrdinal) {
warning("MISSING CODE: F0136_VIDEO_ShadeScreenBox");
}
champion = &cm._champions[championIndex];
- int16 w = dm.getWidth(kInventoryGraphicIndice);
- int16 h = dm.getHeight(kInventoryGraphicIndice);
- dm.blitToScreen(dm.getBitmap(kInventoryGraphicIndice), w, 0, 0, 0, w, 0, h, kColorNoTransparency, gDungeonViewport);
+ int16 w = dm.getWidth(k17_InventoryGraphicIndice);
+ int16 h = dm.getHeight(k17_InventoryGraphicIndice);
+ dm.blitToScreen(dm.getBitmap(k17_InventoryGraphicIndice), w, 0, 0, 0, w, 0, h, k255_ColorNoTransparency, gDungeonViewport);
if (cm._candidateChampionOrdinal) {
- dm.clearScreenBox(kColorDarkestGray, gBoxFloppyZzzCross, gDungeonViewport);
+ dm.clearScreenBox(k12_ColorDarkestGray, gBoxFloppyZzzCross, gDungeonViewport);
}
- _vm->_textMan->printToViewport(5, 116, kColorLightestGray, "HEALTH");
- _vm->_textMan->printToViewport(5, 124, kColorLightestGray, "STAMINA");
- _vm->_textMan->printToViewport(5, 132, kColorLightestGray, "MANA");
+ _vm->_textMan->printToViewport(5, 116, k13_ColorLightestGray, "HEALTH");
+ _vm->_textMan->printToViewport(5, 124, k13_ColorLightestGray, "STAMINA");
+ _vm->_textMan->printToViewport(5, 132, k13_ColorLightestGray, "MANA");
for (uint16 slotIndex = kChampionSlotReadyHand; slotIndex < kChampionSlotChest_1; slotIndex++) {
_vm->_championMan->drawSlot(championIndex, (ChampionSlot)slotIndex);
@@ -124,13 +124,13 @@ void InventoryMan::toggleInventory(ChampionIndex championIndex) {
void InventoryMan::drawStatusBoxPortrait(ChampionIndex championIndex) {
DisplayMan &dispMan = *_vm->_displayMan;
- dispMan._useByteBoxCoordinates = false;
+ dispMan._g578_useByteBoxCoordinates = false;
Box box;
box._y1 = 0;
box._y2 = 28 + 1;
box._x1 = championIndex * kChampionStatusBoxSpacing + 7;
box._x2 = box._x1 + 31 + 1;
- dispMan.blitToScreen(_vm->_championMan->_champions[championIndex]._portrait, 32, 0, 0, box, kColorNoTransparency);
+ dispMan.blitToScreen(_vm->_championMan->_champions[championIndex]._portrait, 32, 0, 0, box, k255_ColorNoTransparency);
}
void InventoryMan::drawPanelHorizontalBar(int16 x, int16 y, int16 pixelWidth, Color color) {
@@ -139,15 +139,15 @@ void InventoryMan::drawPanelHorizontalBar(int16 x, int16 y, int16 pixelWidth, Co
box._x2 = box._x1 + pixelWidth + 1;
box._y1 = y;
box._y2 = box._y1 + 6 + 1;
- _vm->_displayMan->_useByteBoxCoordinates = false;
+ _vm->_displayMan->_g578_useByteBoxCoordinates = false;
_vm->_displayMan->clearScreenBox(color, box);
}
void InventoryMan::drawPanelFoodOrWaterBar(int16 amount, int16 y, Color color) {
if (amount < -512) {
- color = kColorRed;
+ color = k8_ColorRed;
} else if (amount < 0) {
- color = kColorYellow;
+ color = k11_ColorYellow;
}
int16 pixelWidth = amount + 1024;
@@ -155,7 +155,7 @@ void InventoryMan::drawPanelFoodOrWaterBar(int16 amount, int16 y, Color color) {
pixelWidth = 3071;
}
pixelWidth /= 32;
- drawPanelHorizontalBar(115, y + 2, pixelWidth, kColorBlack);
+ drawPanelHorizontalBar(115, y + 2, pixelWidth, k0_ColorBlack);
drawPanelHorizontalBar(113, y, pixelWidth, color);
}
@@ -163,19 +163,19 @@ void InventoryMan::drawPanelFoodWaterPoisoned() {
Champion &champ = _vm->_championMan->_champions[_inventoryChampionOrdinal];
closeChest();
DisplayMan &dispMan = *_vm->_displayMan;
- dispMan.blitToScreen(dispMan.getBitmap(kPanelEmptyIndice), 144, 0, 0, gBoxPanel, kColorRed);
- dispMan.blitToScreen(dispMan.getBitmap(kFoodLabelIndice), 48, 0, 0, gBoxFood, kColorDarkestGray);
- dispMan.blitToScreen(dispMan.getBitmap(kWaterLabelIndice), 48, 0, 0, gBoxWater, kColorDarkestGray);
+ dispMan.blitToScreen(dispMan.getBitmap(k20_PanelEmptyIndice), 144, 0, 0, gBoxPanel, k8_ColorRed);
+ dispMan.blitToScreen(dispMan.getBitmap(k30_FoodLabelIndice), 48, 0, 0, gBoxFood, k12_ColorDarkestGray);
+ dispMan.blitToScreen(dispMan.getBitmap(k31_WaterLabelIndice), 48, 0, 0, gBoxWater, k12_ColorDarkestGray);
if (champ._poisonEventCount) {
- dispMan.blitToScreen(dispMan.getBitmap(kPoisionedLabelIndice), 96, 0, 0, gBoxPoisoned, kColorDarkestGray);
+ dispMan.blitToScreen(dispMan.getBitmap(k32_PoisionedLabelIndice), 96, 0, 0, gBoxPoisoned, k12_ColorDarkestGray);
}
- drawPanelFoodOrWaterBar(champ._food, 69, kColorLightBrown);
- drawPanelFoodOrWaterBar(champ._water, 92, kColorBlue);
+ drawPanelFoodOrWaterBar(champ._food, 69, k5_ColorLightBrown);
+ drawPanelFoodOrWaterBar(champ._water, 92, k14_ColorBlue);
}
void InventoryMan::drawPanelResurrectReincarnate() {
_panelContent = kPanelContentResurrectReincarnate;
- _vm->_displayMan->blitToScreen(_vm->_displayMan->getBitmap(kPanelResurectReincaranteIndice), 144, 0, 0, gBoxPanel, kColorDarkGreen, gDungeonViewport);
+ _vm->_displayMan->blitToScreen(_vm->_displayMan->getBitmap(k40_PanelResurectReincaranteIndice), 144, 0, 0, gBoxPanel, k6_ColorDarkGreen, gDungeonViewport);
}
void InventoryMan::drawPanel() {
@@ -245,7 +245,7 @@ void InventoryMan::drawPanelScrollTextLine(int16 yPos, char* text) {
*iter -= 96;
}
}
- _vm->_textMan->printToViewport(162 - (6 * strlen(text) / 2), yPos, kColorBlack, text, kColorWhite);
+ _vm->_textMan->printToViewport(162 - (6 * strlen(text) / 2), yPos, k0_ColorBlack, text, k15_ColorWhite);
}
void InventoryMan::drawPanelScroll(Scroll* scroll) {
@@ -258,7 +258,7 @@ void InventoryMan::drawPanelScroll(Scroll* scroll) {
charRed++;
}
*charRed = '\0';
- dispMan.blitToScreen(dispMan.getBitmap(kPanelOpenScrollIndice), 144, 0, 0, gBoxPanel, kColorRed, gDungeonViewport);
+ dispMan.blitToScreen(dispMan.getBitmap(k23_PanelOpenScrollIndice), 144, 0, 0, gBoxPanel, k8_ColorRed, gDungeonViewport);
int16 lineCount = 1;
charRed++;
char *charGreen = charRed; // first char of the second line
@@ -310,7 +310,7 @@ void InventoryMan::openAndDrawChest(Thing thingToOpen, Container* chest, bool is
if (!isPressingEye) {
objMan.drawIconInSlotBox(kSlotBoxInventoryActionHand, kIconIndiceContainerChestOpen);
}
- dispMan.blitToScreen(dispMan.getBitmap(kPanelOpenChestIndice), 144, 0, 0, gBoxPanel, kColorRed);
+ dispMan.blitToScreen(dispMan.getBitmap(k25_PanelOpenChestIndice), 144, 0, 0, gBoxPanel, k8_ColorRed);
int16 chestSlotIndex = 0;
Thing thing = chest->getSlot();
@@ -336,7 +336,7 @@ void InventoryMan::drawIconToViewport(IconIndice iconIndex, int16 xPos, int16 yP
box._x2 = (box._x1 = xPos) + 15 + 1;
box._y2 = (box._y1 = yPos) + 15 + 1;
_vm->_objectMan->extractIconFromBitmap(iconIndex, iconBitmap);
- _vm->_displayMan->blitToScreen(iconBitmap, 16, 0, 0, box, kColorNoTransparency, gDungeonViewport);
+ _vm->_displayMan->blitToScreen(iconBitmap, 16, 0, 0, box, k255_ColorNoTransparency, gDungeonViewport);
}
void InventoryMan::buildObjectAttributeString(int16 potentialAttribMask, int16 actualAttribMask, char** attribStrings, char* destString, char* prefixString, char* suffixString) {
@@ -394,7 +394,7 @@ void InventoryMan::drawPanelObjectDescriptionString(char* descString) {
severalLines = true;
}
- _vm->_textMan->printToViewport(_objDescTextXpos, _objDescTextYpos, kColorLightestGray, stringLine);
+ _vm->_textMan->printToViewport(_objDescTextXpos, _objDescTextYpos, k13_ColorLightestGray, stringLine);
_objDescTextYpos += 7;
if (severalLines) {
severalLines = false;
@@ -410,8 +410,8 @@ Box gBoxArrowOrEye = Box(83, 98, 57, 65); // @ G0033_s_Graphic562_Box_ArrowOrEye
void InventoryMan::drawPanelArrowOrEye(bool pressingEye) {
DisplayMan &dispMan = *_vm->_displayMan;
- dispMan.blitToScreen(dispMan.getBitmap(pressingEye ? kEyeForObjectDescriptionIndice : kArrowForChestContentIndice),
- 16, 0, 0, gBoxArrowOrEye, kColorRed, gDungeonViewport);
+ dispMan.blitToScreen(dispMan.getBitmap(pressingEye ? k19_EyeForObjectDescriptionIndice : k18_ArrowForChestContentIndice),
+ 16, 0, 0, gBoxArrowOrEye, k8_ColorRed, gDungeonViewport);
}
@@ -443,8 +443,8 @@ void InventoryMan::drawPanelObject(Thing thingToDraw, bool pressingEye) {
openAndDrawChest(thingToDraw, (Container*)rawThingPtr, pressingEye);
} else {
IconIndice iconIndex = objMan.getIconIndex(thingToDraw);
- dispMan.blitToScreen(dispMan.getBitmap(kPanelEmptyIndice), 144, 0, 0, gBoxPanel, kColorRed, gDungeonViewport);
- dispMan.blitToScreen(dispMan.getBitmap(kObjectDescCircleIndice), 32, 0, 0, gBoxObjectDescCircle, kColorDarkestGray, gDungeonViewport);
+ dispMan.blitToScreen(dispMan.getBitmap(k20_PanelEmptyIndice), 144, 0, 0, gBoxPanel, k8_ColorRed, gDungeonViewport);
+ dispMan.blitToScreen(dispMan.getBitmap(k29_ObjectDescCircleIndice), 32, 0, 0, gBoxObjectDescCircle, k12_ColorDarkestGray, gDungeonViewport);
char *descString = nullptr;
char str[40];
@@ -466,7 +466,7 @@ void InventoryMan::drawPanelObject(Thing thingToDraw, bool pressingEye) {
descString = objMan._objectNames[iconIndex];
}
- textMan.printToViewport(134, 68, kColorLightestGray, descString);
+ textMan.printToViewport(134, 68, k13_ColorLightestGray, descString);
drawIconToViewport(iconIndex, 111, 59);
char *attribString[4] = {"CONSUMABLE", "POISONED", "BROKEN", "CURSED"}; // TODO: localization
diff --git a/engines/dm/menus.cpp b/engines/dm/menus.cpp
index a09a33dbf1..74ca0ac00c 100644
--- a/engines/dm/menus.cpp
+++ b/engines/dm/menus.cpp
@@ -60,11 +60,11 @@ MenuMan::~MenuMan() {
void MenuMan::drawMovementArrows() {
DisplayMan &disp = *_vm->_displayMan;
- byte *arrowsBitmap = disp.getBitmap(kMovementArrowsIndice);
- Box &dest = gBoxMovementArrows;
- uint16 w = disp.getWidth(kMovementArrowsIndice);
+ byte *arrowsBitmap = disp.getBitmap(k13_MovementArrowsIndice);
+ Box &dest = g2_BoxMovementArrows;
+ uint16 w = disp.getWidth(k13_MovementArrowsIndice);
- disp.blitToScreen(arrowsBitmap, w, 0, 0, dest._x1, dest._x2, dest._y1, dest._y2, kColorNoTransparency);
+ disp.blitToScreen(arrowsBitmap, w, 0, 0, dest._x1, dest._x2, dest._y1, dest._y2, k255_ColorNoTransparency);
}
void MenuMan::clearActingChampion() {
ChampionMan &cm = *_vm->_championMan;
@@ -88,12 +88,12 @@ void MenuMan::drawActionIcon(ChampionIndex championIndex) {
box._x2 = box._x1 + 19 + 1;
box._y1 = 86;
box._y2 = 120 + 1;
- dm._useByteBoxCoordinates = false;
+ dm._g578_useByteBoxCoordinates = false;
if (!champion._currHealth) {
- dm.clearScreenBox(kColorBlack, box);
+ dm.clearScreenBox(k0_ColorBlack, box);
return;
}
- byte *bitmapIcon = dm._tmpBitmap;
+ byte *bitmapIcon = dm._g74_tmpBitmap;
Thing thing = champion.getSlot(kChampionSlotActionHand);
IconIndice iconIndex;
if (thing == Thing::_none) {
@@ -101,13 +101,13 @@ void MenuMan::drawActionIcon(ChampionIndex championIndex) {
} else if (gObjectInfo[_vm->_dungeonMan->getObjectInfoIndex(thing)]._actionSetIndex) {
iconIndex = _vm->_objectMan->getIconIndex(thing);
} else {
- dm.clearBitmap(bitmapIcon, 16, 16, kColorCyan);
+ dm.clearBitmap(bitmapIcon, 16, 16, k4_ColorCyan);
goto T0386006;
}
_vm->_objectMan->extractIconFromBitmap(iconIndex, bitmapIcon);
dm.blitToBitmapShrinkWithPalChange(bitmapIcon, 16, 16, bitmapIcon, 16, 16, gPalChangesActionAreaObjectIcon);
T0386006:
- dm.clearScreenBox(kColorCyan, box);
+ dm.clearScreenBox(k4_ColorCyan, box);
Box box2;
box2._x1 = box._x1 + 2;
box2._x2 = box._x2 - 2; // no need to add +1 for exclusive boundaries, box already has that
@@ -122,7 +122,7 @@ T0386006:
void MenuMan::drawDisabledMenu() {
if (!_vm->_championMan->_partyIsSleeping) {
warning("MISSING CODE: F0363_COMMAND_HighlightBoxDisable");
- _vm->_displayMan->_useByteBoxCoordinates = false;
+ _vm->_displayMan->_g578_useByteBoxCoordinates = false;
if (_vm->_inventoryMan->_inventoryChampionOrdinal) {
if (_vm->_inventoryMan->_panelContent == kPanelContentChest) {
_vm->_inventoryMan->closeChest();
@@ -197,8 +197,8 @@ void MenuMan::drawActionArea() {
TextMan &textMan = *_vm->_textMan;
warning("MISSING CODE: F0077_MOUSE_HidePointer_CPSE");
- dispMan._useByteBoxCoordinates = false;
- dispMan.clearScreenBox(kColorBlack, gBoxActionArea);
+ dispMan._g578_useByteBoxCoordinates = false;
+ dispMan.clearScreenBox(k0_ColorBlack, gBoxActionArea);
if (_actionAreaContainsIcons) {
for (uint16 champIndex = kChampionFirst; champIndex < champMan._partyChampionCount; ++champIndex)
drawActionIcon((ChampionIndex)champIndex);
@@ -208,11 +208,11 @@ void MenuMan::drawActionArea() {
box = gBoxActionArea2ActionMenu;
if (_actionList._actionIndices[1] == kChampionActionNone)
box = gBoxActionArea1ActionMenu;
- dispMan.blitToScreen(dispMan.getBitmap(kMenuActionAreaIndice), 96, 0, 0, box, kColorNoTransparency);
- textMan.printWithTrailingSpacesToScreen(235, 83, kColorBlack, kColorCyan, champMan._champions[_vm->ordinalToIndex(champMan._actingChampionOrdinal)]._name,
+ dispMan.blitToScreen(dispMan.getBitmap(k10_MenuActionAreaIndice), 96, 0, 0, box, k255_ColorNoTransparency);
+ textMan.printWithTrailingSpacesToScreen(235, 83, k0_ColorBlack, k4_ColorCyan, champMan._champions[_vm->ordinalToIndex(champMan._actingChampionOrdinal)]._name,
kChampionNameMaximumLength);
for (uint16 actionListIndex = 0; actionListIndex < 3; actionListIndex++) {
- textMan.printWithTrailingSpacesToScreen(241, 93 + actionListIndex * 12, kColorCyan, kColorBlack,
+ textMan.printWithTrailingSpacesToScreen(241, 93 + actionListIndex * 12, k4_ColorCyan, k0_ColorBlack,
getActionName(_actionList._actionIndices[actionListIndex]),
kActionNameMaximumLength);
}
@@ -248,12 +248,12 @@ void MenuMan::drawSpellAreaControls(ChampionIndex champIndex) {
for (uint16 i = 0; i < 4; ++i)
champCurrHealth[i] = champMan._champions[i]._currHealth;
warning("MISSING CODE: F0077_MOUSE_HidePointer_CPSE");
- dispMan.clearScreenBox(kColorBlack, gBoxSpellAreaControls);
+ dispMan.clearScreenBox(k0_ColorBlack, gBoxSpellAreaControls);
int16 champCount = champMan._partyChampionCount;
switch (champIndex) {
case kChampionFirst:
warning("MISSING CODE: F0006_MAIN_HighlightScreenBox");
- textMan.printTextToScreen(235, 48, kColorBlack, kColorCyan, champ._name);
+ textMan.printTextToScreen(235, 48, k0_ColorBlack, k4_ColorCyan, champ._name);
if (champCount) {
if (champCurrHealth[1]) {
warning("MISSING CODE: F0006_MAIN_HighlightScreenBox");
@@ -277,7 +277,7 @@ labelChamp3:
warning("MISSING CODE: F0006_MAIN_HighlightScreenBox");
}
warning("MISSING CODE: F0006_MAIN_HighlightScreenBox");
- textMan.printTextToScreen(249, 48, kColorBlack, kColorCyan, champ._name);
+ textMan.printTextToScreen(249, 48, k0_ColorBlack, k4_ColorCyan, champ._name);
goto labelChamp2;
case kChampionThird:
if (champCurrHealth[0]) {
@@ -287,7 +287,7 @@ labelChamp3:
warning("MISSING CODE: F0006_MAIN_HighlightScreenBox");
}
warning("MISSING CODE: F0006_MAIN_HighlightScreenBox");
- textMan.printTextToScreen(263, 48, kColorBlack, kColorCyan, champ._name);
+ textMan.printTextToScreen(263, 48, k0_ColorBlack, k4_ColorCyan, champ._name);
goto labelChamp3;
case kChampionFourth:
if (champCurrHealth[0]) {
@@ -300,7 +300,7 @@ labelChamp3:
warning("MISSING CODE: F0006_MAIN_HighlightScreenBox");
}
warning("MISSING CODE: F0006_MAIN_HighlightScreenBox");
- textMan.printTextToScreen(277, 48, kColorBlack, kColorCyan, champ._name);
+ textMan.printTextToScreen(277, 48, k0_ColorBlack, k4_ColorCyan, champ._name);
break;
}
warning("MISSING CODE: F0078_MOUSE_ShowPointer");
@@ -314,24 +314,24 @@ void MenuMan::buildSpellAreaLine(int16 spellAreaBitmapLine) {
Champion &champ = _vm->_championMan->_champions[_vm->_championMan->_magicCasterChampionIndex];
if (spellAreaBitmapLine == kSpellAreaAvailableSymbols) {
- dispMan._useByteBoxCoordinates = false;
- dispMan.blitToBitmap(dispMan.getBitmap(kMenuSpellAreLinesIndice), 96, 0, 12, _bitmapSpellAreaLine, 96, gBoxSpellAreaLine, kColorNoTransparency);
+ dispMan._g578_useByteBoxCoordinates = false;
+ dispMan.blitToBitmap(dispMan.getBitmap(k11_MenuSpellAreLinesIndice), 96, 0, 12, _bitmapSpellAreaLine, 96, gBoxSpellAreaLine, k255_ColorNoTransparency);
int16 x = 1;
byte c = 96 + (6 * champ._symbolStep);
char spellSymbolString[2] = {'\0', '\0'};
for (uint16 symbolIndex = 0; symbolIndex < 6; symbolIndex++) {
spellSymbolString[0] = c++;
- _vm->_textMan->printTextToBitmap(_bitmapSpellAreaLine, 96, x += 14, 8, kColorCyan, kColorBlack, spellSymbolString, 12);
+ _vm->_textMan->printTextToBitmap(_bitmapSpellAreaLine, 96, x += 14, 8, k4_ColorCyan, k0_ColorBlack, spellSymbolString, 12);
}
} else if (spellAreaBitmapLine == kSpellAreaChampionSymbols) {
- dispMan._useByteBoxCoordinates = false;
- dispMan.blitToBitmap(dispMan.getBitmap(kMenuSpellAreLinesIndice), 96, 0, 24, _bitmapSpellAreaLine, 96, gBoxSpellAreaLine, kColorNoTransparency);
+ dispMan._g578_useByteBoxCoordinates = false;
+ dispMan.blitToBitmap(dispMan.getBitmap(k11_MenuSpellAreLinesIndice), 96, 0, 24, _bitmapSpellAreaLine, 96, gBoxSpellAreaLine, k255_ColorNoTransparency);
char spellSymbolString[2] = {'\0', '\0'};
int16 x = 8;
for (uint16 symbolIndex = 0; symbolIndex < 4; symbolIndex++) {
if ((spellSymbolString[0] = champ._symbols[symbolIndex]) == '\0')
break;
- _vm->_textMan->printTextToBitmap(_bitmapSpellAreaLine, 96, x += 9, 8, kColorCyan, kColorBlack, spellSymbolString, 12);
+ _vm->_textMan->printTextToBitmap(_bitmapSpellAreaLine, 96, x += 9, 8, k4_ColorCyan, k0_ColorBlack, spellSymbolString, 12);
}
}
}
@@ -345,14 +345,14 @@ void MenuMan::setMagicCasterAndDrawSpellArea(int16 champIndex) {
return;
if (champMan._magicCasterChampionIndex == kChampionNone) {
warning("MISSING CODE: F0077_MOUSE_HidePointer_CPSE");
- dispMan.blitToScreen(dispMan.getBitmap(kMenuSpellAreaBackground), 96, 0, 0, gBoxSpellArea);
+ dispMan.blitToScreen(dispMan.getBitmap(k9_MenuSpellAreaBackground), 96, 0, 0, gBoxSpellArea);
warning("MISSING CODE: F0078_MOUSE_ShowPointer");
}
if (champIndex == kChampionNone) {
champMan._magicCasterChampionIndex = kChampionNone;
warning("MISSING CODE: F0077_MOUSE_HidePointer_CPSE");
- dispMan._useByteBoxCoordinates = false;
- dispMan.clearScreenBox(kColorBlack, gBoxSpellArea);
+ dispMan._g578_useByteBoxCoordinates = false;
+ dispMan.clearScreenBox(k0_ColorBlack, gBoxSpellArea);
warning("MISSING CODE: F0078_MOUSE_ShowPointer");
return;
}
diff --git a/engines/dm/objectman.cpp b/engines/dm/objectman.cpp
index 458f3fd2b3..ddb002d446 100644
--- a/engines/dm/objectman.cpp
+++ b/engines/dm/objectman.cpp
@@ -192,10 +192,10 @@ void ObjectMan::extractIconFromBitmap(uint16 iconIndex, byte *destBitmap) {
}
--i;
- byte *srcBitmap = _vm->_displayMan->getBitmap(kObjectIcons_000_TO_031 + i);
+ byte *srcBitmap = _vm->_displayMan->getBitmap(k42_ObjectIcons_000_TO_031 + i);
iconIndex -= gIconGraphicFirstIndex[i];
- _vm->_displayMan->_useByteBoxCoordinates = true;
- _vm->_displayMan->blitToBitmap(srcBitmap, 256, (iconIndex & 0x000F) << 4, iconIndex & 0x0FF0, destBitmap, 16, 0, 16, 0, 16, kColorNoTransparency);
+ _vm->_displayMan->_g578_useByteBoxCoordinates = true;
+ _vm->_displayMan->blitToBitmap(srcBitmap, 256, (iconIndex & 0x000F) << 4, iconIndex & 0x0FF0, destBitmap, 16, 0, 16, 0, 16, k255_ColorNoTransparency);
}
void ObjectMan::drawIconInSlotBox(uint16 slotBoxIndex, int16 iconIndex) {
@@ -218,16 +218,16 @@ void ObjectMan::drawIconInSlotBox(uint16 slotBoxIndex, int16 iconIndex) {
}
}
iconGraphicIndex--;
- byte *iconsBitmap = _vm->_displayMan->getBitmap(iconGraphicIndex + kObjectIcons_000_TO_031);
+ byte *iconsBitmap = _vm->_displayMan->getBitmap(iconGraphicIndex + k42_ObjectIcons_000_TO_031);
iconIndex -= gIconGraphicFirstIndex[iconGraphicIndex];
- _vm->_displayMan->_useByteBoxCoordinates = false;
+ _vm->_displayMan->_g578_useByteBoxCoordinates = false;
if (slotBoxIndex >= kSlotBoxInventoryFirstSlot) {
_vm->_displayMan->blitToScreen(iconsBitmap, 256, (iconIndex & 0x000F) << 4, iconIndex & 0x0FF0,
- box, kColorNoTransparency, gDungeonViewport);
+ box, k255_ColorNoTransparency, gDungeonViewport);
} else {
_vm->_displayMan->blitToScreen(iconsBitmap, 256, (iconIndex & 0x000F) << 4, iconIndex & 0x0FF0,
- box, kColorNoTransparency, gDefultViewPort);
+ box, k255_ColorNoTransparency, gDefultViewPort);
}
}
@@ -245,7 +245,7 @@ void ObjectMan::drawLeaderObjectName(Thing thing) {
} else {
objName = _objectNames[iconIndex];
}
- _vm->_textMan->printWithTrailingSpacesToScreen(233, 37, kColorCyan, kColorBlack, objName, kObjectNameMaximumLength);
+ _vm->_textMan->printWithTrailingSpacesToScreen(233, 37, k4_ColorCyan, k0_ColorBlack, objName, kObjectNameMaximumLength);
}
IconIndice ObjectMan::getIconIndexInSlotBox(uint16 slotBoxIndex) {
diff --git a/engines/dm/text.cpp b/engines/dm/text.cpp
index f8aabb31df..d535194875 100644
--- a/engines/dm/text.cpp
+++ b/engines/dm/text.cpp
@@ -43,9 +43,9 @@ void TextMan::printTextToBitmap(byte* destBitmap, uint16 destPixelWidth, uint16
uint16 textLength = strlen(text);
uint16 nextX = destX;
uint16 nextY = destY;
- byte *srcBitmap = _vm->_displayMan->getBitmap(kFontGraphicIndice);
+ byte *srcBitmap = _vm->_displayMan->getBitmap(k557_FontGraphicIndice);
- byte *tmp = _vm->_displayMan->_tmpBitmap;
+ byte *tmp = _vm->_displayMan->_g74_tmpBitmap;
for (uint16 i = 0; i < (kLetterWidth + 1) * kLetterHeight * 128; ++i) {
tmp[i] = srcBitmap[i] ? textColor : bgColor;
}
@@ -60,7 +60,7 @@ void TextMan::printTextToBitmap(byte* destBitmap, uint16 destPixelWidth, uint16
break;
uint16 srcX = (1 + 5) * toupper(*begin); // 1 + 5 is not the letter width, arbitrary choice of the unpacking code
_vm->_displayMan->blitToBitmap(srcBitmap, 6 * 128, (nextX == destX) ? (srcX + 1) : srcX, 0, destBitmap, destPixelWidth,
- (nextX == destX) ? (nextX + 1) : nextX, nextX + kLetterWidth + 1, nextY, nextY + kLetterHeight, kColorNoTransparency, viewport);
+ (nextX == destX) ? (nextX + 1) : nextX, nextX + kLetterWidth + 1, nextY, nextY + kLetterHeight, k255_ColorNoTransparency, viewport);
nextX += kLetterWidth + 1;
}
}
diff --git a/engines/dm/text.h b/engines/dm/text.h
index 590fade60d..48c2d6e7f9 100644
--- a/engines/dm/text.h
+++ b/engines/dm/text.h
@@ -40,7 +40,7 @@ public:
void printTextToBitmap(byte *destBitmap, uint16 destPixelWidth, uint16 destX, uint16 destY,
Color textColor, Color bgColor, const char *text, uint16 destHeight, Viewport &viewport = gDefultViewPort); // @ F0040_TEXT_Print
void printTextToScreen(uint16 destX, uint16 destY, Color textColor, Color bgColor, const char *text, Viewport &viewport = gDefultViewPort); // @ F0053_TEXT_PrintToLogicalScreen
- void printToViewport(int16 posX, int16 posY, Color textColor, const char *text, Color bgColor = kColorDarkestGray); // @ F0052_TEXT_PrintToViewport
+ void printToViewport(int16 posX, int16 posY, Color textColor, const char *text, Color bgColor = k12_ColorDarkestGray); // @ F0052_TEXT_PrintToViewport
void printWithTrailingSpaces(byte *destBitmap, int16 destPixelWidth, int16 destX, int16 destY, Color textColor, Color bgColor,
const char *text, int16 strLenght, int16 destHeight, Viewport &viewport = gDefultViewPort); // @ F0041_TEXT_PrintWithTrailingSpaces
void printWithTrailingSpacesToScreen(int16 destX, int16 destY, Color textColor, Color bgColor,