aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
authorStrangerke2016-09-11 21:22:22 +0200
committerStrangerke2016-09-11 21:24:02 +0200
commite413f44d4745aea7204ca224573296b1fd46e0ba (patch)
tree885c21fe032bbfca4a8ab684766b4e64c3f5faf4 /engines
parent21979d741b5e72730d34151e3372353d08a5b942 (diff)
downloadscummvm-rg350-e413f44d4745aea7204ca224573296b1fd46e0ba.tar.gz
scummvm-rg350-e413f44d4745aea7204ca224573296b1fd46e0ba.tar.bz2
scummvm-rg350-e413f44d4745aea7204ca224573296b1fd46e0ba.zip
DM: Start renaming constants in DungeonMan
Diffstat (limited to 'engines')
-rw-r--r--engines/dm/champion.cpp4
-rw-r--r--engines/dm/console.cpp2
-rw-r--r--engines/dm/dm.cpp6
-rw-r--r--engines/dm/dungeonman.cpp410
-rw-r--r--engines/dm/dungeonman.h58
-rw-r--r--engines/dm/eventman.cpp24
-rw-r--r--engines/dm/gfx.cpp128
-rw-r--r--engines/dm/group.cpp100
-rw-r--r--engines/dm/inventory.cpp8
-rw-r--r--engines/dm/menus.cpp2
-rw-r--r--engines/dm/movesens.cpp8
-rw-r--r--engines/dm/projexpl.cpp2
-rw-r--r--engines/dm/timeline.cpp2
13 files changed, 377 insertions, 377 deletions
diff --git a/engines/dm/champion.cpp b/engines/dm/champion.cpp
index d138b4c719..90caaeba9a 100644
--- a/engines/dm/champion.cpp
+++ b/engines/dm/champion.cpp
@@ -1476,7 +1476,7 @@ void ChampionMan::championKill(uint16 champIndex) {
L0966_ps_Junk->setDoNotDiscard(true);
L0966_ps_Junk->setChargeCount(champIndex);
curCell = curChampion->_cell;
- _vm->_moveSens->getMoveResult(_vm->thingWithNewCell(unusedThing, curCell), kM1_MapXNotOnASquare, 0, _vm->_dungeonMan->_partyMapX, _vm->_dungeonMan->_partyMapY);
+ _vm->_moveSens->getMoveResult(_vm->thingWithNewCell(unusedThing, curCell), kDMMapXNotOnASquare, 0, _vm->_dungeonMan->_partyMapX, _vm->_dungeonMan->_partyMapY);
}
curChampion->_symbolStep = 0;
curChampion->_symbols[0] = '\0';
@@ -1553,7 +1553,7 @@ void ChampionMan::dropAllObjects(uint16 champIndex) {
for (uint16 slotIndex = kDMSlotReadyHand; slotIndex < kDMSlotChest1; slotIndex++) {
Thing curThing = getObjectRemovedFromSlot(champIndex, slotDropOrder[slotIndex]);
if (curThing != Thing::_none)
- _vm->_moveSens->getMoveResult(_vm->thingWithNewCell(curThing, curCell), kM1_MapXNotOnASquare, 0, _vm->_dungeonMan->_partyMapX, _vm->_dungeonMan->_partyMapY);
+ _vm->_moveSens->getMoveResult(_vm->thingWithNewCell(curThing, curCell), kDMMapXNotOnASquare, 0, _vm->_dungeonMan->_partyMapX, _vm->_dungeonMan->_partyMapY);
}
}
diff --git a/engines/dm/console.cpp b/engines/dm/console.cpp
index b87b753dbe..c4bef55216 100644
--- a/engines/dm/console.cpp
+++ b/engines/dm/console.cpp
@@ -184,7 +184,7 @@ bool Console::Cmd_map(int argc, const char** argv) {
debugPrintf("Setting map directly can cause glitches and crashes.\n");
debugPrintf("Map set to %d\n", index);
- _vm->_moveSens->getMoveResult(Thing::_party, _vm->_dungeonMan->_partyMapX, _vm->_dungeonMan->_partyMapY, kM1_MapXNotOnASquare, 0);
+ _vm->_moveSens->getMoveResult(Thing::_party, _vm->_dungeonMan->_partyMapX, _vm->_dungeonMan->_partyMapY, kDMMapXNotOnASquare, 0);
_vm->_newPartyMapIndex = _vm->_dungeonMan->getLocationAfterLevelChange(
_vm->_dungeonMan->_partyMapIndex, index - _vm->_dungeonMan->_partyMapIndex,
&_vm->_dungeonMan->_partyMapX, &_vm->_dungeonMan->_partyMapY);
diff --git a/engines/dm/dm.cpp b/engines/dm/dm.cpp
index d0ffd6f8a2..63c4e8b26c 100644
--- a/engines/dm/dm.cpp
+++ b/engines/dm/dm.cpp
@@ -271,7 +271,7 @@ void DMEngine::initializeGame() {
startGame();
if (_newGameFl)
- _moveSens->getMoveResult(Thing::_party, kM1_MapXNotOnASquare, 0, _dungeonMan->_partyMapX, _dungeonMan->_partyMapY);
+ _moveSens->getMoveResult(Thing::_party, kDMMapXNotOnASquare, 0, _dungeonMan->_partyMapX, _dungeonMan->_partyMapY);
_eventMan->showMouse();
_eventMan->discardAllInput();
}
@@ -404,7 +404,7 @@ void DMEngine::gameloop() {
if (_newPartyMapIndex != kDMMapIndexNone) {
processNewPartyMap(_newPartyMapIndex);
- _moveSens->getMoveResult(Thing::_party, kM1_MapXNotOnASquare, 0, _dungeonMan->_partyMapX, _dungeonMan->_partyMapY);
+ _moveSens->getMoveResult(Thing::_party, kDMMapXNotOnASquare, 0, _dungeonMan->_partyMapX, _dungeonMan->_partyMapY);
_newPartyMapIndex = kDMMapIndexNone;
_eventMan->discardAllInput();
}
@@ -753,7 +753,7 @@ void DMEngine::drawEntrance() {
_dungeonMan->_currMap = &map;
Square microDungeonSquares[25];
for (uint16 i = 0; i < 25; ++i)
- microDungeonSquares[i] = Square(k0_ElementTypeWall, 0);
+ microDungeonSquares[i] = Square(kDMElementTypeWall, 0);
for (int16 idx = 0; idx < 5; idx++) {
microDungeonCurrentMapData[idx] = (byte*)&microDungeonSquares[idx * 5];
diff --git a/engines/dm/dungeonman.cpp b/engines/dm/dungeonman.cpp
index f91ee69af3..8b6a844edc 100644
--- a/engines/dm/dungeonman.cpp
+++ b/engines/dm/dungeonman.cpp
@@ -46,188 +46,188 @@ void DungeonMan::mapCoordsAfterRelMovement(Direction dir, int16 stepsForward, in
}
void DungeonMan::setupConstants() {
- ObjectInfo objectInfo[180] = { // @ G0237_as_Graphic559_ObjectInfo
+ ObjectInfoIndex objectInfo[180] = { // @ G0237_as_Graphic559_ObjectInfo
/* { Type, ObjectAspectIndex, ActionSetIndex, AllowedSlots } */
- ObjectInfo(30, 1, 0, 0x0500), /* COMPASS Pouch/Chest */
- ObjectInfo(144, 0, 0, 0x0200), /* COMPASS Hands */
- ObjectInfo(148, 67, 0, 0x0500), /* COMPASS Pouch/Chest */
- ObjectInfo(149, 67, 0, 0x0500), /* COMPASS Pouch/Chest */
- ObjectInfo(150, 67, 0, 0x0500), /* TORCH Pouch/Chest */
- ObjectInfo(151, 67, 42, 0x0500), /* TORCH Pouch/Chest */
- ObjectInfo(152, 67, 0, 0x0500), /* TORCH Pouch/Chest */
- ObjectInfo(153, 67, 0, 0x0500), /* TORCH Pouch/Chest */
- ObjectInfo(154, 2, 0, 0x0501), /* WATERSKIN Mouth/Pouch/Chest */
- ObjectInfo(155, 2, 0, 0x0501), /* WATER Mouth/Pouch/Chest */
- ObjectInfo(156, 2, 0, 0x0501), /* JEWEL SYMAL Mouth/Pouch/Chest */
- ObjectInfo(157, 2, 0, 0x0501), /* JEWEL SYMAL Mouth/Pouch/Chest */
- ObjectInfo(158, 2, 0, 0x0501), /* ILLUMULET Mouth/Pouch/Chest */
- ObjectInfo(159, 2, 0, 0x0501), /* ILLUMULET Mouth/Pouch/Chest */
- ObjectInfo(160, 2, 0, 0x0501), /* FLAMITT Mouth/Pouch/Chest */
- ObjectInfo(161, 2, 0, 0x0501), /* FLAMITT Mouth/Pouch/Chest */
- ObjectInfo(162, 2, 0, 0x0501), /* EYE OF TIME Mouth/Pouch/Chest */
- ObjectInfo(163, 2, 0, 0x0501), /* EYE OF TIME Mouth/Pouch/Chest */
- ObjectInfo(164, 68, 0, 0x0500), /* STORMRING Pouch/Chest */
- ObjectInfo(165, 68, 0, 0x0500), /* STORMRING Pouch/Chest */
- ObjectInfo(166, 68, 0, 0x0500), /* STAFF OF CLAWS Pouch/Chest */
- ObjectInfo(167, 68, 42, 0x0500), /* STAFF OF CLAWS Pouch/Chest */
- ObjectInfo(195, 80, 0, 0x0500), /* STAFF OF CLAWS Pouch/Chest */
- ObjectInfo(16, 38, 43, 0x0500), /* BOLT BLADE Pouch/Chest */
- ObjectInfo(18, 38, 7, 0x0500), /* BOLT BLADE Pouch/Chest */
- ObjectInfo(4, 35, 5, 0x0400), /* FURY Chest */
- ObjectInfo(14, 37, 6, 0x0400), /* FURY Chest */
- ObjectInfo(20, 11, 8, 0x0040), /* THE FIRESTAFF Quiver 1 */
- ObjectInfo(23, 12, 9, 0x0040), /* THE FIRESTAFF Quiver 1 */
- ObjectInfo(25, 12, 10, 0x0040), /* THE FIRESTAFF Quiver 1 */
- ObjectInfo(27, 39, 11, 0x0040), /* OPEN SCROLL Quiver 1 */
- ObjectInfo(32, 17, 12, 0x05C0), /* SCROLL Quiver 1/Quiver 2/Pouch/Chest */
- ObjectInfo(33, 12, 13, 0x0040), /* DAGGER Quiver 1 */
- ObjectInfo(34, 12, 13, 0x0040), /* FALCHION Quiver 1 */
- ObjectInfo(35, 12, 14, 0x0040), /* SWORD Quiver 1 */
- ObjectInfo(36, 12, 15, 0x0040), /* RAPIER Quiver 1 */
- ObjectInfo(37, 12, 15, 0x0040), /* SABRE Quiver 1 */
- ObjectInfo(38, 12, 16, 0x0040), /* SAMURAI SWORD Quiver 1 */
- ObjectInfo(39, 12, 17, 0x0040), /* DELTA Quiver 1 */
- ObjectInfo(40, 42, 18, 0x0040), /* DIAMOND EDGE Quiver 1 */
- ObjectInfo(41, 12, 19, 0x0040), /* VORPAL BLADE Quiver 1 */
- ObjectInfo(42, 13, 20, 0x0040), /* THE INQUISITOR Quiver 1 */
- ObjectInfo(43, 13, 21, 0x0040), /* AXE Quiver 1 */
- ObjectInfo(44, 21, 22, 0x0040), /* HARDCLEAVE Quiver 1 */
- ObjectInfo(45, 21, 22, 0x0040), /* MACE Quiver 1 */
- ObjectInfo(46, 33, 23, 0x0440), /* MACE OF ORDER Quiver 1/Chest */
- ObjectInfo(47, 43, 24, 0x0040), /* MORNINGSTAR Quiver 1 */
- ObjectInfo(48, 44, 24, 0x0040), /* CLUB Quiver 1 */
- ObjectInfo(49, 14, 27, 0x0040), /* STONE CLUB Quiver 1 */
- ObjectInfo(50, 45, 27, 0x0040), /* BOW Quiver 1 */
- ObjectInfo(51, 16, 26, 0x05C0), /* CROSSBOW Quiver 1/Quiver 2/Pouch/Chest */
- ObjectInfo(52, 46, 26, 0x05C0), /* ARROW Quiver 1/Quiver 2/Pouch/Chest */
- ObjectInfo(53, 11, 27, 0x0440), /* SLAYER Quiver 1/Chest */
- ObjectInfo(54, 47, 42, 0x05C0), /* SLING Quiver 1/Quiver 2/Pouch/Chest */
- ObjectInfo(55, 48, 40, 0x05C0), /* ROCK Quiver 1/Quiver 2/Pouch/Chest */
- ObjectInfo(56, 49, 42, 0x05C0), /* POISON DART Quiver 1/Quiver 2/Pouch/Chest */
- ObjectInfo(57, 50, 5, 0x0040), /* THROWING STAR Quiver 1 */
- ObjectInfo(58, 11, 5, 0x0040), /* STICK Quiver 1 */
- ObjectInfo(59, 31, 28, 0x0540), /* STAFF Quiver 1/Pouch/Chest */
- ObjectInfo(60, 31, 29, 0x0540), /* WAND Quiver 1/Pouch/Chest */
- ObjectInfo(61, 11, 30, 0x0040), /* TEOWAND Quiver 1 */
- ObjectInfo(62, 11, 31, 0x0040), /* YEW STAFF Quiver 1 */
- ObjectInfo(63, 11, 32, 0x0040), /* STAFF OF MANAR Quiver 1 Atari ST Version 1.0 1987-12-08: ObjectAspectIndex = 35 */
- ObjectInfo(64, 51, 33, 0x0040), /* SNAKE STAFF Quiver 1 */
- ObjectInfo(65, 32, 5, 0x0440), /* THE CONDUIT Quiver 1/Chest */
- ObjectInfo(66, 30, 35, 0x0040), /* DRAGON SPIT Quiver 1 */
- ObjectInfo(135, 65, 36, 0x0440), /* SCEPTRE OF LYF Quiver 1/Chest */
- ObjectInfo(143, 45, 27, 0x0040), /* ROBE Quiver 1 */
- ObjectInfo(28, 82, 1, 0x0040), /* FINE ROBE Quiver 1 */
- ObjectInfo(80, 23, 0, 0x040C), /* KIRTLE Neck/Torso/Chest */
- ObjectInfo(81, 23, 0, 0x040C), /* SILK SHIRT Neck/Torso/Chest */
- ObjectInfo(82, 23, 0, 0x0410), /* ELVEN DOUBLET Legs/Chest */
- ObjectInfo(112, 55, 0, 0x0420), /* LEATHER JERKIN Feet/Chest */
- ObjectInfo(114, 8, 0, 0x0420), /* TUNIC Feet/Chest */
- ObjectInfo(67, 24, 0, 0x0408), /* GHI Torso/Chest */
- ObjectInfo(83, 24, 0, 0x0410), /* MAIL AKETON Legs/Chest */
- ObjectInfo(68, 24, 0, 0x0408), /* MITHRAL AKETON Torso/Chest */
- ObjectInfo(84, 24, 0, 0x0410), /* TORSO PLATE Legs/Chest */
- ObjectInfo(69, 69, 0, 0x0408), /* PLATE OF LYTE Torso/Chest */
- ObjectInfo(70, 24, 0, 0x0408), /* PLATE OF DARC Torso/Chest */
- ObjectInfo(85, 24, 0, 0x0410), /* CAPE Legs/Chest */
- ObjectInfo(86, 69, 0, 0x0410), /* CLOAK OF NIGHT Legs/Chest */
- ObjectInfo(71, 7, 0, 0x0408), /* BARBARIAN HIDE Torso/Chest */
- ObjectInfo(87, 7, 0, 0x0410), /* ROBE Legs/Chest */
- ObjectInfo(119, 57, 0, 0x0420), /* FINE ROBE Feet/Chest */
- ObjectInfo(72, 23, 0, 0x0408), /* TABARD Torso/Chest */
- ObjectInfo(88, 23, 0, 0x0410), /* GUNNA Legs/Chest */
- ObjectInfo(113, 29, 0, 0x0420), /* ELVEN HUKE Feet/Chest */
- ObjectInfo(89, 69, 0, 0x0410), /* LEATHER PANTS Legs/Chest */
- ObjectInfo(73, 69, 0, 0x0408), /* BLUE PANTS Torso/Chest */
- ObjectInfo(74, 24, 0, 0x0408), /* GHI TROUSERS Torso/Chest */
- ObjectInfo(90, 24, 0, 0x0410), /* LEG MAIL Legs/Chest */
- ObjectInfo(103, 53, 0, 0x0402), /* MITHRAL MAIL Head/Chest */
- ObjectInfo(104, 53, 0, 0x0402), /* LEG PLATE Head/Chest */
- ObjectInfo(96, 9, 0, 0x0402), /* POLEYN OF LYTE Head/Chest */
- ObjectInfo(97, 9, 0, 0x0402), /* POLEYN OF DARC Head/Chest */
- ObjectInfo(98, 9, 0, 0x0402), /* BEZERKER HELM Head/Chest */
- ObjectInfo(105, 54, 41, 0x0400), /* HELMET Chest */
- ObjectInfo(106, 54, 41, 0x0200), /* BASINET Hands */
- ObjectInfo(108, 10, 41, 0x0200), /* CASQUE 'N COIF Hands */
- ObjectInfo(107, 54, 41, 0x0200), /* ARMET Hands */
- ObjectInfo(75, 19, 0, 0x0408), /* HELM OF LYTE Torso/Chest */
- ObjectInfo(91, 19, 0, 0x0410), /* HELM OF DARC Legs/Chest */
- ObjectInfo(76, 19, 0, 0x0408), /* CALISTA Torso/Chest */
- ObjectInfo(92, 19, 0, 0x0410), /* CROWN OF NERRA Legs/Chest */
- ObjectInfo(99, 9, 0, 0x0402), /* BUCKLER Head/Chest */
- ObjectInfo(115, 19, 0, 0x0420), /* HIDE SHIELD Feet/Chest */
- ObjectInfo(100, 52, 0, 0x0402), /* SMALL SHIELD Head/Chest */
- ObjectInfo(77, 20, 0, 0x0008), /* WOODEN SHIELD Torso */
- ObjectInfo(93, 22, 0, 0x0010), /* LARGE SHIELD Legs */
- ObjectInfo(116, 56, 0, 0x0420), /* SHIELD OF LYTE Feet/Chest */
- ObjectInfo(109, 10, 41, 0x0200), /* SHIELD OF DARC Hands */
- ObjectInfo(101, 52, 0, 0x0402), /* SANDALS Head/Chest */
- ObjectInfo(78, 20, 0, 0x0008), /* SUEDE BOOTS Torso */
- ObjectInfo(94, 22, 0, 0x0010), /* LEATHER BOOTS Legs */
- ObjectInfo(117, 56, 0, 0x0420), /* HOSEN Feet/Chest */
- ObjectInfo(110, 10, 41, 0x0200), /* FOOT PLATE Hands */
- ObjectInfo(102, 52, 0, 0x0402), /* GREAVE OF LYTE Head/Chest */
- ObjectInfo(79, 20, 0, 0x0008), /* GREAVE OF DARC Torso */
- ObjectInfo(95, 22, 0, 0x0010), /* ELVEN BOOTS Legs */
- ObjectInfo(118, 56, 0, 0x0420), /* GEM OF AGES Feet/Chest */
- ObjectInfo(111, 10, 41, 0x0200), /* EKKHARD CROSS Hands */
- ObjectInfo(140, 52, 0, 0x0402), /* MOONSTONE Head/Chest */
- ObjectInfo(141, 19, 0, 0x0408), /* THE HELLION Torso/Chest */
- ObjectInfo(142, 22, 0, 0x0010), /* PENDANT FERAL Legs */
- ObjectInfo(194, 81, 0, 0x0420), /* COPPER COIN Feet/Chest */
- ObjectInfo(196, 84, 0, 0x0408), /* SILVER COIN Torso/Chest */
- ObjectInfo(0, 34, 0, 0x0500), /* GOLD COIN Pouch/Chest */
- ObjectInfo(8, 6, 0, 0x0501), /* BOULDER Mouth/Pouch/Chest */
- ObjectInfo(10, 15, 0, 0x0504), /* BLUE GEM Neck/Pouch/Chest */
- ObjectInfo(12, 15, 0, 0x0504), /* ORANGE GEM Neck/Pouch/Chest */
- ObjectInfo(146, 40, 0, 0x0500), /* GREEN GEM Pouch/Chest */
- ObjectInfo(147, 41, 0, 0x0400), /* MAGICAL BOX Chest */
- ObjectInfo(125, 4, 37, 0x0500), /* MAGICAL BOX Pouch/Chest */
- ObjectInfo(126, 83, 37, 0x0500), /* MIRROR OF DAWN Pouch/Chest */
- ObjectInfo(127, 4, 37, 0x0500), /* HORN OF FEAR Pouch/Chest */
- ObjectInfo(176, 18, 0, 0x0500), /* ROPE Pouch/Chest */
- ObjectInfo(177, 18, 0, 0x0500), /* RABBIT'S FOOT Pouch/Chest */
- ObjectInfo(178, 18, 0, 0x0500), /* CORBAMITE Pouch/Chest */
- ObjectInfo(179, 18, 0, 0x0500), /* CHOKER Pouch/Chest */
- ObjectInfo(180, 18, 0, 0x0500), /* DEXHELM Pouch/Chest */
- ObjectInfo(181, 18, 0, 0x0500), /* FLAMEBAIN Pouch/Chest */
- ObjectInfo(182, 18, 0, 0x0500), /* POWERTOWERS Pouch/Chest */
- ObjectInfo(183, 18, 0, 0x0500), /* SPEEDBOW Pouch/Chest */
- ObjectInfo(184, 62, 0, 0x0500), /* CHEST Pouch/Chest */
- ObjectInfo(185, 62, 0, 0x0500), /* OPEN CHEST Pouch/Chest */
- ObjectInfo(186, 62, 0, 0x0500), /* ASHES Pouch/Chest */
- ObjectInfo(187, 62, 0, 0x0500), /* BONES Pouch/Chest */
- ObjectInfo(188, 62, 0, 0x0500), /* MON POTION Pouch/Chest */
- ObjectInfo(189, 62, 0, 0x0500), /* UM POTION Pouch/Chest */
- ObjectInfo(190, 62, 0, 0x0500), /* DES POTION Pouch/Chest */
- ObjectInfo(191, 62, 0, 0x0500), /* VEN POTION Pouch/Chest */
- ObjectInfo(128, 76, 0, 0x0200), /* SAR POTION Hands */
- ObjectInfo(129, 3, 0, 0x0500), /* ZO POTION Pouch/Chest */
- ObjectInfo(130, 60, 0, 0x0500), /* ROS POTION Pouch/Chest */
- ObjectInfo(131, 61, 0, 0x0500), /* KU POTION Pouch/Chest */
- ObjectInfo(168, 27, 0, 0x0501), /* DANE POTION Mouth/Pouch/Chest */
- ObjectInfo(169, 28, 0, 0x0501), /* NETA POTION Mouth/Pouch/Chest */
- ObjectInfo(170, 25, 0, 0x0501), /* BRO POTION Mouth/Pouch/Chest */
- ObjectInfo(171, 26, 0, 0x0501), /* MA POTION Mouth/Pouch/Chest */
- ObjectInfo(172, 71, 0, 0x0401), /* YA POTION Mouth/Chest */
- ObjectInfo(173, 70, 0, 0x0401), /* EE POTION Mouth/Chest */
- ObjectInfo(174, 5, 0, 0x0501), /* VI POTION Mouth/Pouch/Chest */
- ObjectInfo(175, 66, 0, 0x0501), /* WATER FLASK Mouth/Pouch/Chest */
- ObjectInfo(120, 15, 0, 0x0504), /* KATH BOMB Neck/Pouch/Chest */
- ObjectInfo(121, 15, 0, 0x0504), /* PEW BOMB Neck/Pouch/Chest */
- ObjectInfo(122, 58, 0, 0x0504), /* RA BOMB Neck/Pouch/Chest */
- ObjectInfo(123, 59, 0, 0x0504), /* FUL BOMB Neck/Pouch/Chest */
- ObjectInfo(124, 59, 0, 0x0504), /* APPLE Neck/Pouch/Chest */
- ObjectInfo(132, 79, 38, 0x0500), /* CORN Pouch/Chest */
- ObjectInfo(133, 63, 38, 0x0500), /* BREAD Pouch/Chest */
- ObjectInfo(134, 64, 0, 0x0500), /* CHEESE Pouch/Chest */
- ObjectInfo(136, 72, 39, 0x0400), /* SCREAMER SLICE Chest */
- ObjectInfo(137, 73, 0, 0x0500), /* WORM ROUND Pouch/Chest */
- ObjectInfo(138, 74, 0, 0x0500), /* DRUMSTICK Pouch/Chest */
- ObjectInfo(139, 75, 0, 0x0504), /* DRAGON STEAK Neck/Pouch/Chest */
- ObjectInfo(192, 77, 0, 0x0500), /* IRON KEY Pouch/Chest */
- ObjectInfo(193, 78, 0, 0x0500), /* KEY OF B Pouch/Chest */
- ObjectInfo(197, 74, 0, 0x0000), /* SOLID KEY */
- ObjectInfo(198, 41, 0, 0x0400) /* SQUARE KEY Chest */
+ ObjectInfoIndex(30, 1, 0, 0x0500), /* COMPASS Pouch/Chest */
+ ObjectInfoIndex(144, 0, 0, 0x0200), /* COMPASS Hands */
+ ObjectInfoIndex(148, 67, 0, 0x0500), /* COMPASS Pouch/Chest */
+ ObjectInfoIndex(149, 67, 0, 0x0500), /* COMPASS Pouch/Chest */
+ ObjectInfoIndex(150, 67, 0, 0x0500), /* TORCH Pouch/Chest */
+ ObjectInfoIndex(151, 67, 42, 0x0500), /* TORCH Pouch/Chest */
+ ObjectInfoIndex(152, 67, 0, 0x0500), /* TORCH Pouch/Chest */
+ ObjectInfoIndex(153, 67, 0, 0x0500), /* TORCH Pouch/Chest */
+ ObjectInfoIndex(154, 2, 0, 0x0501), /* WATERSKIN Mouth/Pouch/Chest */
+ ObjectInfoIndex(155, 2, 0, 0x0501), /* WATER Mouth/Pouch/Chest */
+ ObjectInfoIndex(156, 2, 0, 0x0501), /* JEWEL SYMAL Mouth/Pouch/Chest */
+ ObjectInfoIndex(157, 2, 0, 0x0501), /* JEWEL SYMAL Mouth/Pouch/Chest */
+ ObjectInfoIndex(158, 2, 0, 0x0501), /* ILLUMULET Mouth/Pouch/Chest */
+ ObjectInfoIndex(159, 2, 0, 0x0501), /* ILLUMULET Mouth/Pouch/Chest */
+ ObjectInfoIndex(160, 2, 0, 0x0501), /* FLAMITT Mouth/Pouch/Chest */
+ ObjectInfoIndex(161, 2, 0, 0x0501), /* FLAMITT Mouth/Pouch/Chest */
+ ObjectInfoIndex(162, 2, 0, 0x0501), /* EYE OF TIME Mouth/Pouch/Chest */
+ ObjectInfoIndex(163, 2, 0, 0x0501), /* EYE OF TIME Mouth/Pouch/Chest */
+ ObjectInfoIndex(164, 68, 0, 0x0500), /* STORMRING Pouch/Chest */
+ ObjectInfoIndex(165, 68, 0, 0x0500), /* STORMRING Pouch/Chest */
+ ObjectInfoIndex(166, 68, 0, 0x0500), /* STAFF OF CLAWS Pouch/Chest */
+ ObjectInfoIndex(167, 68, 42, 0x0500), /* STAFF OF CLAWS Pouch/Chest */
+ ObjectInfoIndex(195, 80, 0, 0x0500), /* STAFF OF CLAWS Pouch/Chest */
+ ObjectInfoIndex(16, 38, 43, 0x0500), /* BOLT BLADE Pouch/Chest */
+ ObjectInfoIndex(18, 38, 7, 0x0500), /* BOLT BLADE Pouch/Chest */
+ ObjectInfoIndex(4, 35, 5, 0x0400), /* FURY Chest */
+ ObjectInfoIndex(14, 37, 6, 0x0400), /* FURY Chest */
+ ObjectInfoIndex(20, 11, 8, 0x0040), /* THE FIRESTAFF Quiver 1 */
+ ObjectInfoIndex(23, 12, 9, 0x0040), /* THE FIRESTAFF Quiver 1 */
+ ObjectInfoIndex(25, 12, 10, 0x0040), /* THE FIRESTAFF Quiver 1 */
+ ObjectInfoIndex(27, 39, 11, 0x0040), /* OPEN SCROLL Quiver 1 */
+ ObjectInfoIndex(32, 17, 12, 0x05C0), /* SCROLL Quiver 1/Quiver 2/Pouch/Chest */
+ ObjectInfoIndex(33, 12, 13, 0x0040), /* DAGGER Quiver 1 */
+ ObjectInfoIndex(34, 12, 13, 0x0040), /* FALCHION Quiver 1 */
+ ObjectInfoIndex(35, 12, 14, 0x0040), /* SWORD Quiver 1 */
+ ObjectInfoIndex(36, 12, 15, 0x0040), /* RAPIER Quiver 1 */
+ ObjectInfoIndex(37, 12, 15, 0x0040), /* SABRE Quiver 1 */
+ ObjectInfoIndex(38, 12, 16, 0x0040), /* SAMURAI SWORD Quiver 1 */
+ ObjectInfoIndex(39, 12, 17, 0x0040), /* DELTA Quiver 1 */
+ ObjectInfoIndex(40, 42, 18, 0x0040), /* DIAMOND EDGE Quiver 1 */
+ ObjectInfoIndex(41, 12, 19, 0x0040), /* VORPAL BLADE Quiver 1 */
+ ObjectInfoIndex(42, 13, 20, 0x0040), /* THE INQUISITOR Quiver 1 */
+ ObjectInfoIndex(43, 13, 21, 0x0040), /* AXE Quiver 1 */
+ ObjectInfoIndex(44, 21, 22, 0x0040), /* HARDCLEAVE Quiver 1 */
+ ObjectInfoIndex(45, 21, 22, 0x0040), /* MACE Quiver 1 */
+ ObjectInfoIndex(46, 33, 23, 0x0440), /* MACE OF ORDER Quiver 1/Chest */
+ ObjectInfoIndex(47, 43, 24, 0x0040), /* MORNINGSTAR Quiver 1 */
+ ObjectInfoIndex(48, 44, 24, 0x0040), /* CLUB Quiver 1 */
+ ObjectInfoIndex(49, 14, 27, 0x0040), /* STONE CLUB Quiver 1 */
+ ObjectInfoIndex(50, 45, 27, 0x0040), /* BOW Quiver 1 */
+ ObjectInfoIndex(51, 16, 26, 0x05C0), /* CROSSBOW Quiver 1/Quiver 2/Pouch/Chest */
+ ObjectInfoIndex(52, 46, 26, 0x05C0), /* ARROW Quiver 1/Quiver 2/Pouch/Chest */
+ ObjectInfoIndex(53, 11, 27, 0x0440), /* SLAYER Quiver 1/Chest */
+ ObjectInfoIndex(54, 47, 42, 0x05C0), /* SLING Quiver 1/Quiver 2/Pouch/Chest */
+ ObjectInfoIndex(55, 48, 40, 0x05C0), /* ROCK Quiver 1/Quiver 2/Pouch/Chest */
+ ObjectInfoIndex(56, 49, 42, 0x05C0), /* POISON DART Quiver 1/Quiver 2/Pouch/Chest */
+ ObjectInfoIndex(57, 50, 5, 0x0040), /* THROWING STAR Quiver 1 */
+ ObjectInfoIndex(58, 11, 5, 0x0040), /* STICK Quiver 1 */
+ ObjectInfoIndex(59, 31, 28, 0x0540), /* STAFF Quiver 1/Pouch/Chest */
+ ObjectInfoIndex(60, 31, 29, 0x0540), /* WAND Quiver 1/Pouch/Chest */
+ ObjectInfoIndex(61, 11, 30, 0x0040), /* TEOWAND Quiver 1 */
+ ObjectInfoIndex(62, 11, 31, 0x0040), /* YEW STAFF Quiver 1 */
+ ObjectInfoIndex(63, 11, 32, 0x0040), /* STAFF OF MANAR Quiver 1 Atari ST Version 1.0 1987-12-08: ObjectAspectIndex = 35 */
+ ObjectInfoIndex(64, 51, 33, 0x0040), /* SNAKE STAFF Quiver 1 */
+ ObjectInfoIndex(65, 32, 5, 0x0440), /* THE CONDUIT Quiver 1/Chest */
+ ObjectInfoIndex(66, 30, 35, 0x0040), /* DRAGON SPIT Quiver 1 */
+ ObjectInfoIndex(135, 65, 36, 0x0440), /* SCEPTRE OF LYF Quiver 1/Chest */
+ ObjectInfoIndex(143, 45, 27, 0x0040), /* ROBE Quiver 1 */
+ ObjectInfoIndex(28, 82, 1, 0x0040), /* FINE ROBE Quiver 1 */
+ ObjectInfoIndex(80, 23, 0, 0x040C), /* KIRTLE Neck/Torso/Chest */
+ ObjectInfoIndex(81, 23, 0, 0x040C), /* SILK SHIRT Neck/Torso/Chest */
+ ObjectInfoIndex(82, 23, 0, 0x0410), /* ELVEN DOUBLET Legs/Chest */
+ ObjectInfoIndex(112, 55, 0, 0x0420), /* LEATHER JERKIN Feet/Chest */
+ ObjectInfoIndex(114, 8, 0, 0x0420), /* TUNIC Feet/Chest */
+ ObjectInfoIndex(67, 24, 0, 0x0408), /* GHI Torso/Chest */
+ ObjectInfoIndex(83, 24, 0, 0x0410), /* MAIL AKETON Legs/Chest */
+ ObjectInfoIndex(68, 24, 0, 0x0408), /* MITHRAL AKETON Torso/Chest */
+ ObjectInfoIndex(84, 24, 0, 0x0410), /* TORSO PLATE Legs/Chest */
+ ObjectInfoIndex(69, 69, 0, 0x0408), /* PLATE OF LYTE Torso/Chest */
+ ObjectInfoIndex(70, 24, 0, 0x0408), /* PLATE OF DARC Torso/Chest */
+ ObjectInfoIndex(85, 24, 0, 0x0410), /* CAPE Legs/Chest */
+ ObjectInfoIndex(86, 69, 0, 0x0410), /* CLOAK OF NIGHT Legs/Chest */
+ ObjectInfoIndex(71, 7, 0, 0x0408), /* BARBARIAN HIDE Torso/Chest */
+ ObjectInfoIndex(87, 7, 0, 0x0410), /* ROBE Legs/Chest */
+ ObjectInfoIndex(119, 57, 0, 0x0420), /* FINE ROBE Feet/Chest */
+ ObjectInfoIndex(72, 23, 0, 0x0408), /* TABARD Torso/Chest */
+ ObjectInfoIndex(88, 23, 0, 0x0410), /* GUNNA Legs/Chest */
+ ObjectInfoIndex(113, 29, 0, 0x0420), /* ELVEN HUKE Feet/Chest */
+ ObjectInfoIndex(89, 69, 0, 0x0410), /* LEATHER PANTS Legs/Chest */
+ ObjectInfoIndex(73, 69, 0, 0x0408), /* BLUE PANTS Torso/Chest */
+ ObjectInfoIndex(74, 24, 0, 0x0408), /* GHI TROUSERS Torso/Chest */
+ ObjectInfoIndex(90, 24, 0, 0x0410), /* LEG MAIL Legs/Chest */
+ ObjectInfoIndex(103, 53, 0, 0x0402), /* MITHRAL MAIL Head/Chest */
+ ObjectInfoIndex(104, 53, 0, 0x0402), /* LEG PLATE Head/Chest */
+ ObjectInfoIndex(96, 9, 0, 0x0402), /* POLEYN OF LYTE Head/Chest */
+ ObjectInfoIndex(97, 9, 0, 0x0402), /* POLEYN OF DARC Head/Chest */
+ ObjectInfoIndex(98, 9, 0, 0x0402), /* BEZERKER HELM Head/Chest */
+ ObjectInfoIndex(105, 54, 41, 0x0400), /* HELMET Chest */
+ ObjectInfoIndex(106, 54, 41, 0x0200), /* BASINET Hands */
+ ObjectInfoIndex(108, 10, 41, 0x0200), /* CASQUE 'N COIF Hands */
+ ObjectInfoIndex(107, 54, 41, 0x0200), /* ARMET Hands */
+ ObjectInfoIndex(75, 19, 0, 0x0408), /* HELM OF LYTE Torso/Chest */
+ ObjectInfoIndex(91, 19, 0, 0x0410), /* HELM OF DARC Legs/Chest */
+ ObjectInfoIndex(76, 19, 0, 0x0408), /* CALISTA Torso/Chest */
+ ObjectInfoIndex(92, 19, 0, 0x0410), /* CROWN OF NERRA Legs/Chest */
+ ObjectInfoIndex(99, 9, 0, 0x0402), /* BUCKLER Head/Chest */
+ ObjectInfoIndex(115, 19, 0, 0x0420), /* HIDE SHIELD Feet/Chest */
+ ObjectInfoIndex(100, 52, 0, 0x0402), /* SMALL SHIELD Head/Chest */
+ ObjectInfoIndex(77, 20, 0, 0x0008), /* WOODEN SHIELD Torso */
+ ObjectInfoIndex(93, 22, 0, 0x0010), /* LARGE SHIELD Legs */
+ ObjectInfoIndex(116, 56, 0, 0x0420), /* SHIELD OF LYTE Feet/Chest */
+ ObjectInfoIndex(109, 10, 41, 0x0200), /* SHIELD OF DARC Hands */
+ ObjectInfoIndex(101, 52, 0, 0x0402), /* SANDALS Head/Chest */
+ ObjectInfoIndex(78, 20, 0, 0x0008), /* SUEDE BOOTS Torso */
+ ObjectInfoIndex(94, 22, 0, 0x0010), /* LEATHER BOOTS Legs */
+ ObjectInfoIndex(117, 56, 0, 0x0420), /* HOSEN Feet/Chest */
+ ObjectInfoIndex(110, 10, 41, 0x0200), /* FOOT PLATE Hands */
+ ObjectInfoIndex(102, 52, 0, 0x0402), /* GREAVE OF LYTE Head/Chest */
+ ObjectInfoIndex(79, 20, 0, 0x0008), /* GREAVE OF DARC Torso */
+ ObjectInfoIndex(95, 22, 0, 0x0010), /* ELVEN BOOTS Legs */
+ ObjectInfoIndex(118, 56, 0, 0x0420), /* GEM OF AGES Feet/Chest */
+ ObjectInfoIndex(111, 10, 41, 0x0200), /* EKKHARD CROSS Hands */
+ ObjectInfoIndex(140, 52, 0, 0x0402), /* MOONSTONE Head/Chest */
+ ObjectInfoIndex(141, 19, 0, 0x0408), /* THE HELLION Torso/Chest */
+ ObjectInfoIndex(142, 22, 0, 0x0010), /* PENDANT FERAL Legs */
+ ObjectInfoIndex(194, 81, 0, 0x0420), /* COPPER COIN Feet/Chest */
+ ObjectInfoIndex(196, 84, 0, 0x0408), /* SILVER COIN Torso/Chest */
+ ObjectInfoIndex(0, 34, 0, 0x0500), /* GOLD COIN Pouch/Chest */
+ ObjectInfoIndex(8, 6, 0, 0x0501), /* BOULDER Mouth/Pouch/Chest */
+ ObjectInfoIndex(10, 15, 0, 0x0504), /* BLUE GEM Neck/Pouch/Chest */
+ ObjectInfoIndex(12, 15, 0, 0x0504), /* ORANGE GEM Neck/Pouch/Chest */
+ ObjectInfoIndex(146, 40, 0, 0x0500), /* GREEN GEM Pouch/Chest */
+ ObjectInfoIndex(147, 41, 0, 0x0400), /* MAGICAL BOX Chest */
+ ObjectInfoIndex(125, 4, 37, 0x0500), /* MAGICAL BOX Pouch/Chest */
+ ObjectInfoIndex(126, 83, 37, 0x0500), /* MIRROR OF DAWN Pouch/Chest */
+ ObjectInfoIndex(127, 4, 37, 0x0500), /* HORN OF FEAR Pouch/Chest */
+ ObjectInfoIndex(176, 18, 0, 0x0500), /* ROPE Pouch/Chest */
+ ObjectInfoIndex(177, 18, 0, 0x0500), /* RABBIT'S FOOT Pouch/Chest */
+ ObjectInfoIndex(178, 18, 0, 0x0500), /* CORBAMITE Pouch/Chest */
+ ObjectInfoIndex(179, 18, 0, 0x0500), /* CHOKER Pouch/Chest */
+ ObjectInfoIndex(180, 18, 0, 0x0500), /* DEXHELM Pouch/Chest */
+ ObjectInfoIndex(181, 18, 0, 0x0500), /* FLAMEBAIN Pouch/Chest */
+ ObjectInfoIndex(182, 18, 0, 0x0500), /* POWERTOWERS Pouch/Chest */
+ ObjectInfoIndex(183, 18, 0, 0x0500), /* SPEEDBOW Pouch/Chest */
+ ObjectInfoIndex(184, 62, 0, 0x0500), /* CHEST Pouch/Chest */
+ ObjectInfoIndex(185, 62, 0, 0x0500), /* OPEN CHEST Pouch/Chest */
+ ObjectInfoIndex(186, 62, 0, 0x0500), /* ASHES Pouch/Chest */
+ ObjectInfoIndex(187, 62, 0, 0x0500), /* BONES Pouch/Chest */
+ ObjectInfoIndex(188, 62, 0, 0x0500), /* MON POTION Pouch/Chest */
+ ObjectInfoIndex(189, 62, 0, 0x0500), /* UM POTION Pouch/Chest */
+ ObjectInfoIndex(190, 62, 0, 0x0500), /* DES POTION Pouch/Chest */
+ ObjectInfoIndex(191, 62, 0, 0x0500), /* VEN POTION Pouch/Chest */
+ ObjectInfoIndex(128, 76, 0, 0x0200), /* SAR POTION Hands */
+ ObjectInfoIndex(129, 3, 0, 0x0500), /* ZO POTION Pouch/Chest */
+ ObjectInfoIndex(130, 60, 0, 0x0500), /* ROS POTION Pouch/Chest */
+ ObjectInfoIndex(131, 61, 0, 0x0500), /* KU POTION Pouch/Chest */
+ ObjectInfoIndex(168, 27, 0, 0x0501), /* DANE POTION Mouth/Pouch/Chest */
+ ObjectInfoIndex(169, 28, 0, 0x0501), /* NETA POTION Mouth/Pouch/Chest */
+ ObjectInfoIndex(170, 25, 0, 0x0501), /* BRO POTION Mouth/Pouch/Chest */
+ ObjectInfoIndex(171, 26, 0, 0x0501), /* MA POTION Mouth/Pouch/Chest */
+ ObjectInfoIndex(172, 71, 0, 0x0401), /* YA POTION Mouth/Chest */
+ ObjectInfoIndex(173, 70, 0, 0x0401), /* EE POTION Mouth/Chest */
+ ObjectInfoIndex(174, 5, 0, 0x0501), /* VI POTION Mouth/Pouch/Chest */
+ ObjectInfoIndex(175, 66, 0, 0x0501), /* WATER FLASK Mouth/Pouch/Chest */
+ ObjectInfoIndex(120, 15, 0, 0x0504), /* KATH BOMB Neck/Pouch/Chest */
+ ObjectInfoIndex(121, 15, 0, 0x0504), /* PEW BOMB Neck/Pouch/Chest */
+ ObjectInfoIndex(122, 58, 0, 0x0504), /* RA BOMB Neck/Pouch/Chest */
+ ObjectInfoIndex(123, 59, 0, 0x0504), /* FUL BOMB Neck/Pouch/Chest */
+ ObjectInfoIndex(124, 59, 0, 0x0504), /* APPLE Neck/Pouch/Chest */
+ ObjectInfoIndex(132, 79, 38, 0x0500), /* CORN Pouch/Chest */
+ ObjectInfoIndex(133, 63, 38, 0x0500), /* BREAD Pouch/Chest */
+ ObjectInfoIndex(134, 64, 0, 0x0500), /* CHEESE Pouch/Chest */
+ ObjectInfoIndex(136, 72, 39, 0x0400), /* SCREAMER SLICE Chest */
+ ObjectInfoIndex(137, 73, 0, 0x0500), /* WORM ROUND Pouch/Chest */
+ ObjectInfoIndex(138, 74, 0, 0x0500), /* DRUMSTICK Pouch/Chest */
+ ObjectInfoIndex(139, 75, 0, 0x0504), /* DRAGON STEAK Neck/Pouch/Chest */
+ ObjectInfoIndex(192, 77, 0, 0x0500), /* IRON KEY Pouch/Chest */
+ ObjectInfoIndex(193, 78, 0, 0x0500), /* KEY OF B Pouch/Chest */
+ ObjectInfoIndex(197, 74, 0, 0x0000), /* SOLID KEY */
+ ObjectInfoIndex(198, 41, 0, 0x0400) /* SQUARE KEY Chest */
};
ArmourInfo armourInfo[58] = { // G0239_as_Graphic559_ArmourInfo
/* { Weight, Defense, Attributes, Unreferenced } */
@@ -803,21 +803,21 @@ Square DungeonMan::getSquare(int16 mapX, int16 mapY) {
if (isMapYInBounds) {
SquareType squareType = Square(_currMapData[0][mapY]).getType();
if (((mapX == -1) && (squareType == k1_CorridorElemType)) || (squareType == k2_PitElemType))
- return Square(k0_ElementTypeWall, k0x0004_WallEastRandOrnAllowed);
+ return Square(kDMElementTypeWall, k0x0004_WallEastRandOrnAllowed);
squareType = Square(_currMapData[_currMapWidth - 1][mapY]).getType();
if (((mapX == _currMapWidth) && (squareType == k1_CorridorElemType)) || (squareType == k2_PitElemType))
- return Square(k0_ElementTypeWall, k0x0001_WallWestRandOrnAllowed);
+ return Square(kDMElementTypeWall, k0x0001_WallWestRandOrnAllowed);
} else if (isMapXInBounds) {
SquareType squareType = Square(_currMapData[mapX][0]).getType();
if (((mapY == -1) && (squareType == k1_CorridorElemType)) || (squareType == k2_PitElemType))
- return Square(k0_ElementTypeWall, k0x0002_WallSouthRandOrnAllowed);
+ return Square(kDMElementTypeWall, k0x0002_WallSouthRandOrnAllowed);
squareType = Square(_currMapData[mapX][_currMapHeight - 1]).getType();
if (((mapY == _currMapHeight) && (squareType == k1_CorridorElemType)) || (squareType == k2_PitElemType))
- return Square(k0_ElementTypeWall, k0x0008_WallNorthRandOrnAllowed);
+ return Square(kDMElementTypeWall, k0x0008_WallNorthRandOrnAllowed);
}
- return Square(k0_ElementTypeWall, 0);
+ return Square(kDMElementTypeWall, 0);
}
Square DungeonMan::getRelSquare(Direction dir, int16 stepsForward, int16 stepsRight, int16 posX, int16 posY) {
@@ -864,7 +864,7 @@ void DungeonMan::setSquareAspect(uint16 *aspectArray, Direction dir, int16 mapX,
aspectArray[k0_ElementAspect] = Square(AL0307_uc_Square).getType();
switch (aspectArray[k0_ElementAspect]) {
- case k0_ElementTypeWall:
+ case kDMElementTypeWall:
switch (dir) {
case kDMDirNorth:
leftRandomWallOrnamentAllowed = getFlag(AL0307_uc_Square, k0x0004_WallEastRandOrnAllowed);
@@ -917,9 +917,9 @@ T0172010_ClosedFakeWall:
return;
}
break;
- case k6_ElementTypeFakeWall:
+ case kDMElementTypeFakeWall:
if (!getFlag(AL0307_uc_Square, k0x0004_FakeWallOpen)) {
- aspectArray[k0_ElementAspect] = k0_ElementTypeWall;
+ aspectArray[k0_ElementAspect] = kDMElementTypeWall;
leftRandomWallOrnamentAllowed = rightRandomWallOrnamentAllowed = frontRandomWallOrnamentAllowed = getFlag(AL0307_uc_Square, k0x0008_FakeWallRandOrnOrFootPAllowed);
squareIsFakeWall = true;
goto T0172010_ClosedFakeWall;
@@ -928,12 +928,12 @@ T0172010_ClosedFakeWall:
AL0307_uc_FootprintsAllowed = getFlag(AL0307_uc_Square, k0x0008_FakeWallRandOrnOrFootPAllowed) ? 8 : 0;
// No break on purpose
case k1_CorridorElemType:
- case k2_ElementTypePit:
- case k5_ElementTypeTeleporter:
+ case kDMElementTypePit:
+ case kDMElementTypeTeleporter:
if (aspectArray[k0_ElementAspect] == k1_CorridorElemType) {
aspectArray[k4_FloorOrnOrdAspect] = getRandomOrnOrdinal(getFlag(AL0307_uc_Square, k0x0008_CorridorRandOrnAllowed), _currMap->_randFloorOrnCount, mapX, mapY, 30);
AL0307_uc_FootprintsAllowed = true;
- } else if (aspectArray[k0_ElementAspect] == k2_ElementTypePit) {
+ } else if (aspectArray[k0_ElementAspect] == kDMElementTypePit) {
if (getFlag(AL0307_uc_Square, k0x0008_PitOpen)) {
aspectArray[k2_PitInvisibleAspect] = getFlag(AL0307_uc_Square, k0x0004_PitInvisible);
AL0307_uc_FootprintsAllowed &= 0x0001;
@@ -959,8 +959,8 @@ T0172010_ClosedFakeWall:
setFlag(aspectArray[k4_FloorOrnOrdAspect], k0x8000_FootprintsAspect);
break;
- case k3_ElementTypeStairs:
- aspectArray[k0_ElementAspect] = (bool((getFlag(AL0307_uc_Square, k0x0008_StairsNorthSouthOrient) >> 3)) == _vm->isOrientedWestEast(dir)) ? k18_ElementTypeStairsSide : k19_ElementTypeStaisFront;
+ case kDMElementTypeStairs:
+ aspectArray[k0_ElementAspect] = (bool((getFlag(AL0307_uc_Square, k0x0008_StairsNorthSouthOrient) >> 3)) == _vm->isOrientedWestEast(dir)) ? kDMElementTypeStairsSide : kDMElementTypeStairsFront;
aspectArray[k2_StairsUpAspect] = getFlag(AL0307_uc_Square, k0x0004_StairsUp);
AL0307_uc_FootprintsAllowed = false;
while ((curThing != Thing::_endOfList) && (curThing.getType() <= kDMThingTypeSensor))
@@ -1289,17 +1289,17 @@ int16 DungeonMan::getObjectInfoIndex(Thing thing) {
uint16 *rawType = getThingData(thing);
switch (thing.getType()) {
case kDMThingTypeScroll:
- return k0_ObjectInfoIndexFirstScroll;
+ return kDMObjectInfoIndexFirstScroll;
case kDMThingTypeContainer:
- return k1_ObjectInfoIndexFirstContainer + Container(rawType).getType();
+ return kDMObjectInfoIndexFirstContainer + Container(rawType).getType();
case kDMThingTypeJunk:
- return k127_ObjectInfoIndexFirstJunk + Junk(rawType).getType();
+ return kDMObjectInfoIndexFirstJunk + Junk(rawType).getType();
case kDMThingTypeWeapon:
- return k23_ObjectInfoIndexFirstWeapon + Weapon(rawType).getType();
+ return kDMObjectInfoIndexFirstWeapon + Weapon(rawType).getType();
case kDMThingTypeArmour:
- return k69_ObjectInfoIndexFirstArmour + Armour(rawType).getType();
+ return kDMObjectInfoIndexFirstArmour + Armour(rawType).getType();
case kDMThingTypePotion:
- return k2_ObjectInfoIndexFirstPotion + Potion(rawType).getType();
+ return kDMObjectInfoIndexFirstPotion + Potion(rawType).getType();
default:
return -1;
}
@@ -1468,28 +1468,28 @@ Thing DungeonMan::getDiscardThing(uint16 thingType) {
continue;
setCurrentMap(mapIndex);
- _vm->_moveSens->getMoveResult(squareThing, currMapX, currMapY, kM1_MapXNotOnASquare, 0);
+ _vm->_moveSens->getMoveResult(squareThing, currMapX, currMapY, kDMMapXNotOnASquare, 0);
break;
case kDMThingTypeWeapon:
if (((Weapon *)squareThingData)->getDoNotDiscard())
continue;
setCurrentMap(mapIndex);
- _vm->_moveSens->getMoveResult(squareThing, currMapX, currMapY, kM1_MapXNotOnASquare, 0);
+ _vm->_moveSens->getMoveResult(squareThing, currMapX, currMapY, kDMMapXNotOnASquare, 0);
break;
case kDMThingTypeJunk:
if (((Junk *)squareThingData)->getDoNotDiscard())
continue;
setCurrentMap(mapIndex);
- _vm->_moveSens->getMoveResult(squareThing, currMapX, currMapY, kM1_MapXNotOnASquare, 0);
+ _vm->_moveSens->getMoveResult(squareThing, currMapX, currMapY, kDMMapXNotOnASquare, 0);
break;
case kDMThingTypePotion:
if (((Potion *)squareThingData)->getDoNotDiscard())
continue;
setCurrentMap(mapIndex);
- _vm->_moveSens->getMoveResult(squareThing, currMapX, currMapY, kM1_MapXNotOnASquare, 0);
+ _vm->_moveSens->getMoveResult(squareThing, currMapX, currMapY, kDMMapXNotOnASquare, 0);
break;
}
setCurrentMap(currentMapIdx);
@@ -1607,7 +1607,7 @@ int16 DungeonMan::getStairsExitDirection(int16 mapX, int16 mapY) {
}
int16 squareType = Square(getSquare(mapX, mapY)).getType();
- int16 retval = ((squareType == k0_ElementTypeWall) || (squareType == k3_ElementTypeStairs)) ? 1 : 0;
+ int16 retval = ((squareType == kDMElementTypeWall) || (squareType == kDMElementTypeStairs)) ? 1 : 0;
retval <<= 1;
retval += (northSouthOrientedStairs ? 1 : 0);
diff --git a/engines/dm/dungeonman.h b/engines/dm/dungeonman.h
index 100ce75f68..704ffa134d 100644
--- a/engines/dm/dungeonman.h
+++ b/engines/dm/dungeonman.h
@@ -34,37 +34,37 @@
namespace DM {
/* Object info */
-#define k0_ObjectInfoIndexFirstScroll 0 // @ C000_OBJECT_INFO_INDEX_FIRST_SCROLL
-#define k1_ObjectInfoIndexFirstContainer 1 // @ C001_OBJECT_INFO_INDEX_FIRST_CONTAINER
-#define k2_ObjectInfoIndexFirstPotion 2 // @ C002_OBJECT_INFO_INDEX_FIRST_POTION
-#define k23_ObjectInfoIndexFirstWeapon 23 // @ C023_OBJECT_INFO_INDEX_FIRST_WEAPON
-#define k69_ObjectInfoIndexFirstArmour 69 // @ C069_OBJECT_INFO_INDEX_FIRST_ARMOUR
-#define k127_ObjectInfoIndexFirstJunk 127 // @ C127_OBJECT_INFO_INDEX_FIRST_JUNK
+enum ObjectInfoIndexConst {
+ kDMObjectInfoIndexFirstScroll = 0, // @ C000_OBJECT_INFO_INDEX_FIRST_SCROLL
+ kDMObjectInfoIndexFirstContainer = 1, // @ C001_OBJECT_INFO_INDEX_FIRST_CONTAINER
+ kDMObjectInfoIndexFirstPotion = 2, // @ C002_OBJECT_INFO_INDEX_FIRST_POTION
+ kDMObjectInfoIndexFirstWeapon = 23, // @ C023_OBJECT_INFO_INDEX_FIRST_WEAPON
+ kDMObjectInfoIndexFirstArmour = 69, // @ C069_OBJECT_INFO_INDEX_FIRST_ARMOUR
+ kDMObjectInfoIndexFirstJunk = 127 // @ C127_OBJECT_INFO_INDEX_FIRST_JUNK
+};
-#define kM1_MapXNotOnASquare -1 // @ CM1_MAPX_NOT_ON_A_SQUARE
+#define kDMMapXNotOnASquare -1 // @ CM1_MAPX_NOT_ON_A_SQUARE
enum ElementType {
- kM2_ElementTypeChampion = -2, // @ CM2_ELEMENT_CHAMPION /* Values -2 and -1 are only used as projectile impact types */
- kM1_ElementTypeCreature = -1, // @ CM1_ELEMENT_CREATURE
- k0_ElementTypeWall = 0, // @ C00_ELEMENT_WALL /* Values 0-6 are used as square types and projectile impact types. Values 0-2 and 5-6 are also used for square aspect */
- k1_ElementTypeCorridor = 1, // @ C01_ELEMENT_CORRIDOR
- k2_ElementTypePit = 2, // @ C02_ELEMENT_PIT
- k3_ElementTypeStairs = 3, // @ C03_ELEMENT_STAIRS
- // TODO: refactor direction into a class
- k4_ElementTypeDoor = 4, // @ C04_ELEMENT_DOOR
- k5_ElementTypeTeleporter = 5, // @ C05_ELEMENT_TELEPORTER
- k6_ElementTypeFakeWall = 6, // @ C06_ELEMENT_FAKEWALL
- k16_ElementTypeDoorSide = 16, // @ C16_ELEMENT_DOOR_SIDE /* Values 16-19 are only used for square aspect */
- k17_ElementTypeDoorFront = 17, // @ C17_ELEMENT_DOOR_FRONT
- k18_ElementTypeStairsSide = 18, // @ C18_ELEMENT_STAIRS_SIDE
- k19_ElementTypeStaisFront = 19 // @ C19_ELEMENT_STAIRS_FRONT
+ kDMElementTypeChampion = -2, // @ CM2_ELEMENT_CHAMPION /* Values -2 and -1 are only used as projectile impact types */
+ kDMElementTypeCreature = -1, // @ CM1_ELEMENT_CREATURE
+ kDMElementTypeWall = 0, // @ C00_ELEMENT_WALL /* Values 0-6 are used as square types and projectile impact types. Values 0-2 and 5-6 are also used for square aspect */
+ kDMElementTypeCorridor = 1, // @ C01_ELEMENT_CORRIDOR
+ kDMElementTypePit = 2, // @ C02_ELEMENT_PIT
+ kDMElementTypeStairs = 3, // @ C03_ELEMENT_STAIRS
+ kDMElementTypeDoor = 4, // @ C04_ELEMENT_DOOR
+ kDMElementTypeTeleporter = 5, // @ C05_ELEMENT_TELEPORTER
+ kDMElementTypeFakeWall = 6, // @ C06_ELEMENT_FAKEWALL
+ kDMElementTypeDoorSide = 16, // @ C16_ELEMENT_DOOR_SIDE /* Values 16-19 are only used for square aspect */
+ kDMElementTypeDoorFront = 17, // @ C17_ELEMENT_DOOR_FRONT
+ kDMElementTypeStairsSide = 18, // @ C18_ELEMENT_STAIRS_SIDE
+ kDMElementTypeStairsFront = 19 // @ C19_ELEMENT_STAIRS_FRONT
};
-
enum ObjectAllowedSlot {
- k0x0001_ObjectAllowedSlotMouth = 0x0001, // @ MASK0x0001_MOUTH
- k0x0002_ObjectAllowedSlotHead = 0x0002, // @ MASK0x0002_HEAD
- k0x0004_ObjectAllowedSlotNeck = 0x0004, // @ MASK0x0004_NECK
+ kDMMaskMouth = 0x0001, // @ MASK0x0001_MOUTH
+ kDMMaskHead = 0x0002, // @ MASK0x0002_HEAD
+ kDMMaskNeck = 0x0004, // @ MASK0x0004_NECK
k0x0008_ObjectAllowedSlotTorso = 0x0008, // @ MASK0x0008_TORSO
k0x0010_ObjectAllowedSlotLegs = 0x0010, // @ MASK0x0010_LEGS
k0x0020_ObjectAllowedSlotFeet = 0x0020, // @ MASK0x0020_FEET
@@ -75,15 +75,15 @@ enum ObjectAllowedSlot {
k0x0400_ObjectAllowedSlotContainer = 0x0400 // @ MASK0x0400_CONTAINER
};
-class ObjectInfo {
+class ObjectInfoIndex {
public:
int16 _type;
uint16 _objectAspectIndex;
uint16 _actionSetIndex;
uint16 _allowedSlots;
- ObjectInfo(int16 type, uint16 objectAspectIndex, uint16 actionSetIndex, uint16 allowedSlots)
+ ObjectInfoIndex(int16 type, uint16 objectAspectIndex, uint16 actionSetIndex, uint16 allowedSlots)
: _type(type), _objectAspectIndex(objectAspectIndex), _actionSetIndex(actionSetIndex), _allowedSlots(allowedSlots) {}
- ObjectInfo() : _type(0), _objectAspectIndex(0), _actionSetIndex(0), _allowedSlots(0) {}
+ ObjectInfoIndex() : _type(0), _objectAspectIndex(0), _actionSetIndex(0), _allowedSlots(0) {}
bool getAllowedSlot(ObjectAllowedSlot slot) { return _allowedSlots & slot; }
uint16 getAllowedSlots() { return _allowedSlots; }
void setAllowedSlot(ObjectAllowedSlot slot, bool val) {
@@ -726,7 +726,7 @@ public:
Thing _pileTopObject[5]; // @ G0292_aT_PileTopObject
DoorInfo _currMapDoorInfo[2]; // @ G0275_as_CurrentMapDoorInfo
- ObjectInfo _objectInfos[180]; // @ G0237_as_Graphic559_ObjectInfo
+ ObjectInfoIndex _objectInfos[180]; // @ G0237_as_Graphic559_ObjectInfo
ArmourInfo _armourInfos[58]; // @ G0239_as_Graphic559_ArmourInfo
WeaponInfo _weaponInfos[46]; // @ G0238_as_Graphic559_WeaponInfo
CreatureInfo _creatureInfos[k27_CreatureTypeCount]; // @ G0243_as_Graphic559_CreatureInfo
diff --git a/engines/dm/eventman.cpp b/engines/dm/eventman.cpp
index 19db589aaa..56b66eeeea 100644
--- a/engines/dm/eventman.cpp
+++ b/engines/dm/eventman.cpp
@@ -993,11 +993,11 @@ void EventManager::commandMoveParty(CommandType cmdType) {
bool isMovementBlocked = false;
SquareType partySquareType = curSquare.getType();
switch (partySquareType){
- case k0_ElementTypeWall:
+ case kDMElementTypeWall:
isMovementBlocked = true;
break;
- case k3_ElementTypeStairs: {
- _vm->_moveSens->getMoveResult(Thing::_party, _vm->_dungeonMan->_partyMapX, _vm->_dungeonMan->_partyMapY, kM1_MapXNotOnASquare, 0);
+ case kDMElementTypeStairs: {
+ _vm->_moveSens->getMoveResult(Thing::_party, _vm->_dungeonMan->_partyMapX, _vm->_dungeonMan->_partyMapY, kDMMapXNotOnASquare, 0);
_vm->_dungeonMan->_partyMapX = partyMapX;
_vm->_dungeonMan->_partyMapY = partyMapY;
byte stairState = curSquare.toByte();
@@ -1009,7 +1009,7 @@ void EventManager::commandMoveParty(CommandType cmdType) {
isMovementBlocked = (doorState != k0_doorState_OPEN) && (doorState != k1_doorState_FOURTH) && (doorState != k5_doorState_DESTROYED);
}
break;
- case k6_ElementTypeFakeWall: {
+ case kDMElementTypeFakeWall: {
byte wallState = curSquare.toByte();
isMovementBlocked = (!getFlag(wallState, k0x0004_FakeWallOpen) && !getFlag(wallState, k0x0001_FakeWallImaginary));
}
@@ -1044,7 +1044,7 @@ void EventManager::commandMoveParty(CommandType cmdType) {
}
if (isStairsSquare)
- _vm->_moveSens->getMoveResult(Thing::_party, kM1_MapXNotOnASquare, 0, partyMapX, partyMapY);
+ _vm->_moveSens->getMoveResult(Thing::_party, kDMMapXNotOnASquare, 0, partyMapX, partyMapY);
else
_vm->_moveSens->getMoveResult(Thing::_party, _vm->_dungeonMan->_partyMapX, _vm->_dungeonMan->_partyMapY, partyMapX, partyMapY);
@@ -1069,7 +1069,7 @@ bool EventManager::isLeaderHandObjThrown(int16 posX, int16 posY) {
bool objectThrownFl;
if (posX <= 111) {
- if (_vm->_dungeonMan->_squareAheadElement == k17_ElementTypeDoorFront) {
+ if (_vm->_dungeonMan->_squareAheadElement == kDMElementTypeDoorFront) {
if (posX < 64)
return false;
} else if (posX < 32)
@@ -1078,7 +1078,7 @@ bool EventManager::isLeaderHandObjThrown(int16 posX, int16 posY) {
// Strangerke: Only present in CSB2.1... But it fixes a bug so we keep it
objectThrownFl = _vm->_championMan->isLeaderHandObjectThrown(k0_sideLeft);
} else {
- if (_vm->_dungeonMan->_squareAheadElement == k17_ElementTypeDoorFront) {
+ if (_vm->_dungeonMan->_squareAheadElement == kDMElementTypeDoorFront) {
if (posX > 163)
return false;
} else if (posX > 191)
@@ -1163,7 +1163,7 @@ void EventManager::commandProcessType80ClickInDungeonView(int16 posX, int16 posY
Box(40, 111, 122, 147) /* Back left */
};
- if (_vm->_dungeonMan->_squareAheadElement == k17_ElementTypeDoorFront) {
+ if (_vm->_dungeonMan->_squareAheadElement == kDMElementTypeDoorFront) {
if (_vm->_championMan->_leaderIndex == kDMChampionNone)
return;
@@ -1197,7 +1197,7 @@ void EventManager::commandProcessType80ClickInDungeonView(int16 posX, int16 posY
} else {
Thing thingHandObject = _vm->_championMan->_leaderHandObject;
Junk *junkPtr = (Junk*)_vm->_dungeonMan->getThingData(thingHandObject);
- if (_vm->_dungeonMan->_squareAheadElement == k0_ElementTypeWall) {
+ if (_vm->_dungeonMan->_squareAheadElement == kDMElementTypeWall) {
for (uint16 currViewCell = k0_ViewCellFronLeft; currViewCell < k1_ViewCellFrontRight + 1; currViewCell++) {
if (boxObjectPiles[currViewCell].isPointInside(posX, posY)) {
processType80_clickInDungeonViewDropLeaderHandObject(currViewCell);
@@ -1371,7 +1371,7 @@ void EventManager::processType80_clickInDungeonView_grabLeaderHandObject(uint16
Thing topPileThing = _vm->_dungeonMan->_pileTopObject[viewCell];
if (_vm->_objectMan->getIconIndex(topPileThing) != kDMIconIndiceNone) {
- _vm->_moveSens->getMoveResult(topPileThing, mapX, mapY, kM1_MapXNotOnASquare, 0);
+ _vm->_moveSens->getMoveResult(topPileThing, mapX, mapY, kDMMapXNotOnASquare, 0);
_vm->_championMan->putObjectInLeaderHand(topPileThing, true);
}
@@ -1393,7 +1393,7 @@ void EventManager::processType80_clickInDungeonViewDropLeaderHandObject(uint16 v
uint16 currCell = _vm->normalizeModulo4(_vm->_dungeonMan->_partyDir + viewCell);
Thing removedThing = _vm->_championMan->getObjectRemovedFromLeaderHand();
- _vm->_moveSens->getMoveResult(_vm->thingWithNewCell(removedThing, currCell), kM1_MapXNotOnASquare, 0, mapX, mapY);
+ _vm->_moveSens->getMoveResult(_vm->thingWithNewCell(removedThing, currCell), kDMMapXNotOnASquare, 0, mapX, mapY);
if (droppingIntoAnAlcove && _vm->_dungeonMan->_isFacingViAltar && (_vm->_objectMan->getIconIndex(removedThing) == kDMIconIndiceJunkChampionBones)) {
Junk *removedJunk = (Junk*)_vm->_dungeonMan->getThingData(removedThing);
TimelineEvent newEvent;
@@ -1442,7 +1442,7 @@ void EventManager::discardAllInput() {
}
void EventManager::commandTakeStairs(bool stairsGoDown) {
- _vm->_moveSens->getMoveResult(Thing::_party, _vm->_dungeonMan->_partyMapX, _vm->_dungeonMan->_partyMapY, kM1_MapXNotOnASquare, 0);
+ _vm->_moveSens->getMoveResult(Thing::_party, _vm->_dungeonMan->_partyMapX, _vm->_dungeonMan->_partyMapY, kDMMapXNotOnASquare, 0);
_vm->_newPartyMapIndex = _vm->_dungeonMan->getLocationAfterLevelChange(_vm->_dungeonMan->_partyMapIndex, stairsGoDown ? -1 : 1, &_vm->_dungeonMan->_partyMapX, &_vm->_dungeonMan->_partyMapY);
_vm->_dungeonMan->setCurrentMap(_vm->_newPartyMapIndex);
_vm->_championMan->setPartyDirection(_vm->_dungeonMan->getStairsExitDirection(_vm->_dungeonMan->_partyMapX, _vm->_dungeonMan->_partyMapY));
diff --git a/engines/dm/gfx.cpp b/engines/dm/gfx.cpp
index 13dd79d7a0..be0a95a3e9 100644
--- a/engines/dm/gfx.cpp
+++ b/engines/dm/gfx.cpp
@@ -1242,13 +1242,13 @@ void DisplayMan::drawSquareD3L(Direction dir, int16 posX, int16 posY) {
else
return;
break;
- case k16_ElementTypeDoorSide:
- case k18_ElementTypeStairsSide:
+ case kDMElementTypeDoorSide:
+ case kDMElementTypeStairsSide:
order = k0x0321_CellOrder_BackLeft_BackRight_FrontRight;
/* BUG0_64 Floor ornaments are drawn over open pits. There is no check to prevent drawing floor ornaments over open pits */
drawFloorOrnament(squareAspect[k4_FloorOrnOrdAspect], k0_viewFloor_D3L);
break;
- case k17_ElementTypeDoorFront:
+ case kDMElementTypeDoorFront:
drawFloorOrnament(squareAspect[k4_FloorOrnOrdAspect], k0_viewFloor_D3L);
drawObjectsCreaturesProjectilesExplosions(Thing(squareAspect[k1_FirstGroupOrObjectAspect]), dir, posX, posY, k1_ViewSquare_D3L, k0x0218_CellOrder_DoorPass1_BackLeft_BackRight);
drawWallSetBitmap(_bitmapWallSetDoorFrameLeftD3L, doorFrameLeftD3L);
@@ -1256,12 +1256,12 @@ void DisplayMan::drawSquareD3L(Direction dir, int16 posX, int16 posY) {
_doorNativeBitmapIndexFrontD3LCR, bitmapByteCount(48, 41), k0_ViewDoorOrnament_D3LCR, &doorFrameD3L);
order = k0x0349_CellOrder_DoorPass2_FrontLeft_FrontRight;
break;
- case k2_ElementTypePit:
+ case kDMElementTypePit:
if (!squareAspect[k2_PitInvisibleAspect])
drawFloorPitOrStairsBitmap(k49_FloorPit_D3L_GraphicIndice, frameFloorPitD3L);
// no break on purpose
- case k5_ElementTypeTeleporter:
- case k1_ElementTypeCorridor:
+ case kDMElementTypeTeleporter:
+ case kDMElementTypeCorridor:
order = k0x3421_CellOrder_BackLeft_BackRight_FrontLeft_FrontRight;
/* BUG0_64 Floor ornaments are drawn over open pits. There is no check to prevent drawing floor ornaments over open pits */
drawFloorOrnament(squareAspect[k4_FloorOrnOrdAspect], k0_viewFloor_D3L);
@@ -1274,7 +1274,7 @@ void DisplayMan::drawSquareD3L(Direction dir, int16 posX, int16 posY) {
if (!skip)
drawObjectsCreaturesProjectilesExplosions(Thing(squareAspect[k1_FirstGroupOrObjectAspect]), dir, posX, posY, k1_ViewSquare_D3L, order);
- if ((squareAspect[k0_ElementAspect] == k5_ElementTypeTeleporter) && squareAspect[k2_TeleporterVisibleAspect])
+ if ((squareAspect[k0_ElementAspect] == kDMElementTypeTeleporter) && squareAspect[k2_TeleporterVisibleAspect])
drawField(&_fieldAspects188[k1_ViewSquare_D3L], _frameWalls163[k1_ViewSquare_D3L]._box);
}
@@ -1303,7 +1303,7 @@ void DisplayMan::drawSquareD3R(Direction dir, int16 posX, int16 posY) {
_vm->_dungeonMan->setSquareAspect(squareAspect, dir, posX, posY);
switch (squareAspect[k0_ElementAspect]) {
- case k19_ElementTypeStaisFront:
+ case kDMElementTypeStairsFront:
if (squareAspect[k2_StairsUpAspect])
drawFloorPitOrStairsBitmapFlippedHorizontally(_stairsNativeBitmapIndexUpFrontD3L, frameStairsUpFrontD3R);
else
@@ -1313,7 +1313,7 @@ void DisplayMan::drawSquareD3R(Direction dir, int16 posX, int16 posY) {
/* BUG0_64 Floor ornaments are drawn over open pits. There is no check to prevent drawing floor ornaments over open pits */
drawFloorOrnament(squareAspect[k4_FloorOrnOrdAspect], k2_viewFloor_D3R);
break;
- case k0_ElementTypeWall:
+ case kDMElementTypeWall:
drawWallSetBitmap(_bitmapWallSetD3LCR, _frameWalls163[k2_ViewSquare_D3R]);
isDrawnWallOrnAnAlcove(squareAspect[k4_LeftWallOrnOrdAspect], k1_ViewWall_D3R_LEFT);
if (isDrawnWallOrnAnAlcove(squareAspect[k3_FrontWallOrnOrdAspect], k4_ViewWall_D3R_FRONT))
@@ -1321,13 +1321,13 @@ void DisplayMan::drawSquareD3R(Direction dir, int16 posX, int16 posY) {
else
return;
break;
- case k16_ElementTypeDoorSide:
- case k18_ElementTypeStairsSide:
+ case kDMElementTypeDoorSide:
+ case kDMElementTypeStairsSide:
order = k0x0412_CellOrder_BackRight_BackLeft_FrontLeft;
/* BUG0_64 Floor ornaments are drawn over open pits. There is no check to prevent drawing floor ornaments over open pits */
drawFloorOrnament(squareAspect[k4_FloorOrnOrdAspect], k2_viewFloor_D3R);
break;
- case k17_ElementTypeDoorFront:
+ case kDMElementTypeDoorFront:
drawFloorOrnament(squareAspect[k4_FloorOrnOrdAspect], k2_viewFloor_D3R);
drawObjectsCreaturesProjectilesExplosions(Thing(squareAspect[k1_FirstGroupOrObjectAspect]), dir, posX, posY, k2_ViewSquare_D3R, k0x0128_CellOrder_DoorPass1_BackRight_BackLeft);
memmove(_tmpBitmap, _bitmapWallSetDoorFrameLeftD3L, 32 * 44);
@@ -1339,12 +1339,12 @@ void DisplayMan::drawSquareD3R(Direction dir, int16 posX, int16 posY) {
squareAspect[k2_DoorStateAspect], _doorNativeBitmapIndexFrontD3LCR,
bitmapByteCount(48, 41), k0_ViewDoorOrnament_D3LCR, &doorFrameD3R);
break;;
- case k2_ElementTypePit:
+ case kDMElementTypePit:
if (!squareAspect[k2_PitInvisibleAspect])
drawFloorPitOrStairsBitmapFlippedHorizontally(k49_FloorPit_D3L_GraphicIndice, frameFloorPitD3R);
// No break on purpose
- case k5_ElementTypeTeleporter:
- case k1_ElementTypeCorridor:
+ case kDMElementTypeTeleporter:
+ case kDMElementTypeCorridor:
order = k0x4312_CellOrder_BackRight_BackLeft_FrontRight_FrontLeft;
/* BUG0_64 Floor ornaments are drawn over open pits. There is no check to prevent drawing floor ornaments over open pits */
drawFloorOrnament(squareAspect[k4_FloorOrnOrdAspect], k2_viewFloor_D3R);
@@ -1357,7 +1357,7 @@ void DisplayMan::drawSquareD3R(Direction dir, int16 posX, int16 posY) {
if (!skip)
drawObjectsCreaturesProjectilesExplosions(Thing(squareAspect[k1_FirstGroupOrObjectAspect]), dir, posX, posY, k2_ViewSquare_D3R, order);
- if ((squareAspect[k0_ElementAspect] == k5_ElementTypeTeleporter) && squareAspect[k2_TeleporterVisibleAspect])
+ if ((squareAspect[k0_ElementAspect] == kDMElementTypeTeleporter) && squareAspect[k2_TeleporterVisibleAspect])
drawField(&_fieldAspects188[k2_ViewSquare_D3R], _frameWalls163[k2_ViewSquare_D3R]._box);
}
@@ -1387,7 +1387,7 @@ void DisplayMan::drawSquareD3C(Direction dir, int16 posX, int16 posY) {
_vm->_dungeonMan->setSquareAspect(squareAspect, dir, posX, posY);
switch (squareAspect[k0_ElementAspect]) {
- case k19_ElementTypeStaisFront:
+ case kDMElementTypeStairsFront:
if (squareAspect[k2_StairsUpAspect])
drawFloorPitOrStairsBitmap(_stairsNativeBitmapIndexUpFrontD3C, frameStairsUpFrontD3C);
else
@@ -1396,7 +1396,7 @@ void DisplayMan::drawSquareD3C(Direction dir, int16 posX, int16 posY) {
order = k0x3421_CellOrder_BackLeft_BackRight_FrontLeft_FrontRight;
drawFloorOrnament(squareAspect[k4_FloorOrnOrdAspect], k1_viewFloor_D3C); /* BUG0_64 Floor ornaments are drawn over open pits. There is no check to prevent drawing floor ornaments over open pits */
break;
- case k0_ElementTypeWall:
+ case kDMElementTypeWall:
drawWallSetBitmapWithoutTransparency(_bitmapWallSetD3LCR, _frameWalls163[k0_ViewSquare_D3C]);
if (isDrawnWallOrnAnAlcove(squareAspect[k3_FrontWallOrnOrdAspect], k3_ViewWall_D3C_FRONT))
order = k0x0000_CellOrder_Alcove;
@@ -1417,11 +1417,11 @@ void DisplayMan::drawSquareD3C(Direction dir, int16 posX, int16 posY) {
_doorNativeBitmapIndexFrontD3LCR, bitmapByteCount(48, 41), k0_ViewDoorOrnament_D3LCR, &doorFrameD3C);
order = k0x0349_CellOrder_DoorPass2_FrontLeft_FrontRight;
break;
- case k2_ElementTypePit:
+ case kDMElementTypePit:
if (!squareAspect[k2_PitInvisibleAspect])
drawFloorPitOrStairsBitmap(k50_FloorPit_D3C_GraphicIndice, frameFloorPitD3C);
// No break on purpose
- case k5_ElementTypeTeleporter:
+ case kDMElementTypeTeleporter:
case k1_CorridorElemType:
order = k0x3421_CellOrder_BackLeft_BackRight_FrontLeft_FrontRight;
drawFloorOrnament(squareAspect[k4_FloorOrnOrdAspect], k1_viewFloor_D3C); /* BUG0_64 Floor ornaments are drawn over open pits. There is no check to prevent drawing floor ornaments over open pits */
@@ -1434,7 +1434,7 @@ void DisplayMan::drawSquareD3C(Direction dir, int16 posX, int16 posY) {
if (!skip)
drawObjectsCreaturesProjectilesExplosions(Thing(squareAspect[k1_FirstGroupOrObjectAspect]), dir, posX, posY, k0_ViewSquare_D3C, order);
- if ((squareAspect[k0_ElementAspect] == k5_ElementTypeTeleporter) && squareAspect[k2_TeleporterVisibleAspect])
+ if ((squareAspect[k0_ElementAspect] == kDMElementTypeTeleporter) && squareAspect[k2_TeleporterVisibleAspect])
drawField(&_fieldAspects188[k0_ViewSquare_D3C], _frameWalls163[k0_ViewSquare_D3C]._box);
}
@@ -1465,7 +1465,7 @@ void DisplayMan::drawSquareD2L(Direction dir, int16 posX, int16 posY) {
_vm->_dungeonMan->setSquareAspect(squareAspect, dir, posX, posY);
switch (squareAspect[k0_ElementAspect]) {
- case k19_ElementTypeStaisFront:
+ case kDMElementTypeStairsFront:
if (squareAspect[k2_StairsUpAspect])
drawFloorPitOrStairsBitmap(_stairsNativeBitmapIndexUpFrontD2L, frameStairsUpFrontD2L);
else
@@ -1474,7 +1474,7 @@ void DisplayMan::drawSquareD2L(Direction dir, int16 posX, int16 posY) {
order = k0x3421_CellOrder_BackLeft_BackRight_FrontLeft_FrontRight;
drawFloorOrnament(squareAspect[k4_FloorOrnOrdAspect], k3_viewFloor_D2L); /* BUG0_64 Floor ornaments are drawn over open pits. There is no check to prevent drawing floor ornaments over open pits */
break;
- case k0_ElementTypeWall:
+ case kDMElementTypeWall:
drawWallSetBitmap(_bitmapWallSetD2LCR, _frameWalls163[k4_ViewSquare_D2L]);
isDrawnWallOrnAnAlcove(squareAspect[k2_RightWallOrnOrdAspect], k5_ViewWall_D2L_RIGHT);
if (isDrawnWallOrnAnAlcove(squareAspect[k3_FrontWallOrnOrdAspect], k7_ViewWall_D2L_FRONT))
@@ -1482,7 +1482,7 @@ void DisplayMan::drawSquareD2L(Direction dir, int16 posX, int16 posY) {
else
return;
break;
- case k18_ElementTypeStairsSide:
+ case kDMElementTypeStairsSide:
drawFloorPitOrStairsBitmap(_stairsNativeBitmapIndexSideD2L, frameStairsSideD2L);
// No break on purpose
case k16_DoorSideElemType:
@@ -1497,11 +1497,11 @@ void DisplayMan::drawSquareD2L(Direction dir, int16 posX, int16 posY) {
bitmapByteCount(64, 61), k1_ViewDoorOrnament_D2LCR, &doorFrameD2L);
order = k0x0349_CellOrder_DoorPass2_FrontLeft_FrontRight;
break;
- case k2_ElementTypePit:
+ case kDMElementTypePit:
drawFloorPitOrStairsBitmap(squareAspect[k2_PitInvisibleAspect] ? k57_FloorPir_Invisible_D2L_GraphicIndice : k51_FloorPit_D2L_GraphicIndice,
frameFloorPitD2L);
// No break on purpose
- case k5_ElementTypeTeleporter:
+ case kDMElementTypeTeleporter:
case k1_CorridorElemType:
order = k0x3421_CellOrder_BackLeft_BackRight_FrontLeft_FrontRight;
drawFloorOrnament(squareAspect[k4_FloorOrnOrdAspect], k3_viewFloor_D2L); /* BUG0_64 Floor ornaments are drawn over open pits. There is no check to prevent drawing floor ornaments over open pits */
@@ -1517,7 +1517,7 @@ void DisplayMan::drawSquareD2L(Direction dir, int16 posX, int16 posY) {
drawObjectsCreaturesProjectilesExplosions(Thing(squareAspect[k1_FirstGroupOrObjectAspect]), dir, posX, posY, k4_ViewSquare_D2L, order);
}
- if ((squareAspect[k0_ElementAspect] == k5_ElementTypeTeleporter) && squareAspect[k2_TeleporterVisibleAspect])
+ if ((squareAspect[k0_ElementAspect] == kDMElementTypeTeleporter) && squareAspect[k2_TeleporterVisibleAspect])
drawField(&_fieldAspects188[k4_ViewSquare_D2L], _frameWalls163[k4_ViewSquare_D2L]._box);
}
@@ -1548,7 +1548,7 @@ void DisplayMan::drawSquareD2R(Direction dir, int16 posX, int16 posY) {
_vm->_dungeonMan->setSquareAspect(squareAspect, dir, posX, posY);
switch (squareAspect[k0_ElementAspect]) {
- case k19_ElementTypeStaisFront:
+ case kDMElementTypeStairsFront:
if (squareAspect[k2_StairsUpAspect])
drawFloorPitOrStairsBitmapFlippedHorizontally(_stairsNativeBitmapIndexUpFrontD2L, frameStairsUpFrontD2R);
else
@@ -1559,7 +1559,7 @@ void DisplayMan::drawSquareD2R(Direction dir, int16 posX, int16 posY) {
drawFloorOrnament(squareAspect[k4_FloorOrnOrdAspect], k5_viewFloor_D2R);
drawCeilingPit(k63_ceilingPit_D2L_GraphicIndice, &frameCeilingPitD2R, posX, posY, true);
break;
- case k0_ElementTypeWall:
+ case kDMElementTypeWall:
drawWallSetBitmap(_bitmapWallSetD2LCR, _frameWalls163[k5_ViewSquare_D2R]);
isDrawnWallOrnAnAlcove(squareAspect[k4_LeftWallOrnOrdAspect], k6_ViewWall_D2R_LEFT);
if (isDrawnWallOrnAnAlcove(squareAspect[k3_FrontWallOrnOrdAspect], k9_ViewWall_D2R_FRONT))
@@ -1567,7 +1567,7 @@ void DisplayMan::drawSquareD2R(Direction dir, int16 posX, int16 posY) {
else
return;
break;
- case k18_ElementTypeStairsSide:
+ case kDMElementTypeStairsSide:
drawFloorPitOrStairsBitmapFlippedHorizontally(_stairsNativeBitmapIndexSideD2L, frameStairsSideD2R);
// No break on purpose
case k16_DoorSideElemType:
@@ -1584,11 +1584,11 @@ void DisplayMan::drawSquareD2R(Direction dir, int16 posX, int16 posY) {
_doorNativeBitmapIndexFrontD2LCR, bitmapByteCount(64, 61), k1_ViewDoorOrnament_D2LCR, &doorFrameD2R);
order = k0x0439_CellOrder_DoorPass2_FrontRight_FrontLeft;
break;
- case k2_ElementTypePit:
+ case kDMElementTypePit:
drawFloorPitOrStairsBitmapFlippedHorizontally(
squareAspect[k2_PitInvisibleAspect] ? k57_FloorPir_Invisible_D2L_GraphicIndice : k51_FloorPit_D2L_GraphicIndice, frameFloorPitD2R);
// No break on purpose
- case k5_ElementTypeTeleporter:
+ case kDMElementTypeTeleporter:
case k1_CorridorElemType:
order = k0x4312_CellOrder_BackRight_BackLeft_FrontRight_FrontLeft;
/* BUG0_64 Floor ornaments are drawn over open pits. There is no check to prevent drawing floor ornaments over open pits */
@@ -1603,7 +1603,7 @@ void DisplayMan::drawSquareD2R(Direction dir, int16 posX, int16 posY) {
if (!skip)
drawObjectsCreaturesProjectilesExplosions(Thing(squareAspect[k1_FirstGroupOrObjectAspect]), dir, posX, posY, k5_ViewSquare_D2R, order);
- if ((squareAspect[k0_ElementAspect] == k5_ElementTypeTeleporter) && squareAspect[k2_TeleporterVisibleAspect])
+ if ((squareAspect[k0_ElementAspect] == kDMElementTypeTeleporter) && squareAspect[k2_TeleporterVisibleAspect])
drawField(&_fieldAspects188[k5_ViewSquare_D2R], _frameWalls163[k5_ViewSquare_D2R]._box);
}
@@ -1635,7 +1635,7 @@ void DisplayMan::drawSquareD2C(Direction dir, int16 posX, int16 posY) {
_vm->_dungeonMan->setSquareAspect(squareAspect, dir, posX, posY);
switch (squareAspect[k0_ElementAspect]) {
- case k19_ElementTypeStaisFront:
+ case kDMElementTypeStairsFront:
if (squareAspect[k2_StairsUpAspect])
drawFloorPitOrStairsBitmap(_stairsNativeBitmapIndexUpFrontD2C, frameStairsUpFrontD2C);
else
@@ -1646,7 +1646,7 @@ void DisplayMan::drawSquareD2C(Direction dir, int16 posX, int16 posY) {
drawFloorOrnament(squareAspect[k4_FloorOrnOrdAspect], k4_viewFloor_D2C);
drawCeilingPit(k64_ceilingPitD2C_GraphicIndice, &frameCeilingPitD2C, posX, posY, false);
break;
- case k0_ElementTypeWall:
+ case kDMElementTypeWall:
drawWallSetBitmapWithoutTransparency(_bitmapWallSetD2LCR, _frameWalls163[k3_ViewSquare_D2C]);
if (isDrawnWallOrnAnAlcove(squareAspect[k3_FrontWallOrnOrdAspect], k8_ViewWall_D2C_FRONT))
order = k0x0000_CellOrder_Alcove;
@@ -1667,10 +1667,10 @@ void DisplayMan::drawSquareD2C(Direction dir, int16 posX, int16 posY) {
_doorNativeBitmapIndexFrontD2LCR, bitmapByteCount(64, 61), k1_ViewDoorOrnament_D2LCR, &doorFrameD2C);
order = k0x0349_CellOrder_DoorPass2_FrontLeft_FrontRight;
break;
- case k2_ElementTypePit:
+ case kDMElementTypePit:
drawFloorPitOrStairsBitmap(squareAspect[k2_PitInvisibleAspect] ? k58_FloorPit_invisible_D2C_GraphicIndice : k52_FloorPit_D2C_GraphicIndice, frameFloorPitD2C);
// No break on purpose
- case k5_ElementTypeTeleporter:
+ case kDMElementTypeTeleporter:
case k1_CorridorElemType:
order = k0x3421_CellOrder_BackLeft_BackRight_FrontLeft_FrontRight;
/* BUG0_64 Floor ornaments are drawn over open pits. There is no check to prevent drawing floor ornaments over open pits */
@@ -1685,7 +1685,7 @@ void DisplayMan::drawSquareD2C(Direction dir, int16 posX, int16 posY) {
if (!skip)
drawObjectsCreaturesProjectilesExplosions(Thing(squareAspect[k1_FirstGroupOrObjectAspect]), dir, posX, posY, k3_ViewSquare_D2C, order);
- if ((squareAspect[k0_ElementAspect] == k5_ElementTypeTeleporter) && squareAspect[k2_TeleporterVisibleAspect])
+ if ((squareAspect[k0_ElementAspect] == kDMElementTypeTeleporter) && squareAspect[k2_TeleporterVisibleAspect])
drawField(&_fieldAspects188[k3_ViewSquare_D2C], _frameWalls163[k3_ViewSquare_D2C]._box);
}
@@ -1717,7 +1717,7 @@ void DisplayMan::drawSquareD1L(Direction dir, int16 posX, int16 posY) {
_vm->_dungeonMan->setSquareAspect(squareAspect, dir, posX, posY);
switch (squareAspect[k0_ElementAspect]) {
- case k19_ElementTypeStaisFront:
+ case kDMElementTypeStairsFront:
if (squareAspect[k2_StairsUpAspect])
drawFloorPitOrStairsBitmap(_stairsNativeBitmapIndexUpFrontD1L, frameStairsUpFrontD1L);
else
@@ -1728,11 +1728,11 @@ void DisplayMan::drawSquareD1L(Direction dir, int16 posX, int16 posY) {
drawFloorOrnament(squareAspect[k4_FloorOrnOrdAspect], k6_viewFloor_D1L);
drawCeilingPit(k65_ceilingPitD1L_GraphicIndice, &frameCeilingPitD1L, posX, posY, false);
break;
- case k0_ElementTypeWall:
+ case kDMElementTypeWall:
drawWallSetBitmap(_bitmapWallSetD1LCR, _frameWalls163[k7_ViewSquare_D1L]);
isDrawnWallOrnAnAlcove(squareAspect[k2_RightWallOrnOrdAspect], k10_ViewWall_D1L_RIGHT);
return;
- case k18_ElementTypeStairsSide:
+ case kDMElementTypeStairsSide:
if (squareAspect[k2_StairsUpAspect])
drawFloorPitOrStairsBitmap(_stairsNativeBitmapIndexUpSideD1L, frameStairsUpSideD1L);
else
@@ -1752,10 +1752,10 @@ void DisplayMan::drawSquareD1L(Direction dir, int16 posX, int16 posY) {
_doorNativeBitmapIndexFrontD1LCR, bitmapByteCount(96, 88), k2_ViewDoorOrnament_D1LCR, &doorFrameD1L);
order = k0x0039_CellOrder_DoorPass2_FrontRight;
break;
- case k2_ElementTypePit:
+ case kDMElementTypePit:
drawFloorPitOrStairsBitmap(squareAspect[k2_PitInvisibleAspect] ? k59_floorPit_invisible_D1L_GraphicIndice : k53_FloorPit_D1L_GraphicIndice, frameFloorPitD1L);
// No break on purpose
- case k5_ElementTypeTeleporter:
+ case kDMElementTypeTeleporter:
case k1_CorridorElemType:
order = k0x0032_CellOrder_BackRight_FrontRight;
/* BUG0_64 Floor ornaments are drawn over open pits. There is no check to prevent drawing floor ornaments over open pits */
@@ -1770,7 +1770,7 @@ void DisplayMan::drawSquareD1L(Direction dir, int16 posX, int16 posY) {
if (!skip)
drawObjectsCreaturesProjectilesExplosions(Thing(squareAspect[k1_FirstGroupOrObjectAspect]), dir, posX, posY, k7_ViewSquare_D1L, order);
- if ((squareAspect[k0_ElementAspect] == k5_ElementTypeTeleporter) && squareAspect[k2_TeleporterVisibleAspect])
+ if ((squareAspect[k0_ElementAspect] == kDMElementTypeTeleporter) && squareAspect[k2_TeleporterVisibleAspect])
drawField(&_fieldAspects188[k7_ViewSquare_D1L], _frameWalls163[k7_ViewSquare_D1L]._box);
}
@@ -1802,7 +1802,7 @@ void DisplayMan::drawSquareD1R(Direction dir, int16 posX, int16 posY) {
_vm->_dungeonMan->setSquareAspect(squareAspect, dir, posX, posY);
switch (squareAspect[k0_ElementAspect]) {
- case k19_ElementTypeStaisFront:
+ case kDMElementTypeStairsFront:
if (squareAspect[k2_StairsUpAspect])
drawFloorPitOrStairsBitmapFlippedHorizontally(_stairsNativeBitmapIndexUpFrontD1L, frameStairsUpFrontD1R);
else
@@ -1812,11 +1812,11 @@ void DisplayMan::drawSquareD1R(Direction dir, int16 posX, int16 posY) {
drawFloorOrnament(squareAspect[k4_FloorOrnOrdAspect], k8_viewFloor_D1R); /* BUG0_64 Floor ornaments are drawn over open pits. There is no check to prevent drawing floor ornaments over open pits */
drawCeilingPit(k65_ceilingPitD1L_GraphicIndice, &frameCeilingPitD1R, posX, posY, true);
break;
- case k0_ElementTypeWall:
+ case kDMElementTypeWall:
drawWallSetBitmap(_bitmapWallSetD1LCR, _frameWalls163[k8_ViewSquare_D1R]);
isDrawnWallOrnAnAlcove(squareAspect[k4_LeftWallOrnOrdAspect], k11_ViewWall_D1R_LEFT);
return;
- case k18_ElementTypeStairsSide:
+ case kDMElementTypeStairsSide:
if (squareAspect[k2_StairsUpAspect])
drawFloorPitOrStairsBitmapFlippedHorizontally(_stairsNativeBitmapIndexUpSideD1L, frameStairsUpSideD1R);
else
@@ -1836,11 +1836,11 @@ void DisplayMan::drawSquareD1R(Direction dir, int16 posX, int16 posY) {
_doorNativeBitmapIndexFrontD1LCR, bitmapByteCount(96, 88), k2_ViewDoorOrnament_D1LCR, &doorFrameD1R);
order = k0x0049_CellOrder_DoorPass2_FrontLeft;
break;
- case k2_ElementTypePit:
+ case kDMElementTypePit:
drawFloorPitOrStairsBitmapFlippedHorizontally(squareAspect[k2_PitInvisibleAspect] ? k59_floorPit_invisible_D1L_GraphicIndice
: k53_FloorPit_D1L_GraphicIndice, frameFloorPitD1R);
// No break on purpose
- case k5_ElementTypeTeleporter:
+ case kDMElementTypeTeleporter:
case k1_CorridorElemType:
order = k0x0041_CellOrder_BackLeft_FrontLeft;
drawFloorOrnament(squareAspect[k4_FloorOrnOrdAspect], k8_viewFloor_D1R); /* BUG0_64 Floor ornaments are drawn over open pits. There is no check to prevent drawing floor ornaments over open pits */
@@ -1854,7 +1854,7 @@ void DisplayMan::drawSquareD1R(Direction dir, int16 posX, int16 posY) {
if (!skip)
drawObjectsCreaturesProjectilesExplosions(Thing(squareAspect[k1_FirstGroupOrObjectAspect]), dir, posX, posY, k8_ViewSquare_D1R, order);
- if ((squareAspect[k0_ElementAspect] == k5_ElementTypeTeleporter) && squareAspect[k2_TeleporterVisibleAspect])
+ if ((squareAspect[k0_ElementAspect] == kDMElementTypeTeleporter) && squareAspect[k2_TeleporterVisibleAspect])
drawField(&_fieldAspects188[k8_ViewSquare_D1R], _frameWalls163[k8_ViewSquare_D1R]._box);
}
@@ -1872,7 +1872,7 @@ void DisplayMan::drawSquareD1C(Direction dir, int16 posX, int16 posY) {
_vm->_dungeonMan->setSquareAspect(squareAspect, dir, posX, posY);
switch (_vm->_dungeonMan->_squareAheadElement = (ElementType)squareAspect[k0_ElementAspect]) {
- case k19_ElementTypeStaisFront:
+ case kDMElementTypeStairsFront:
if (squareAspect[k2_StairsUpAspect])
drawFloorPitOrStairsBitmap(_stairsNativeBitmapIndexUpFrontD1C, frameStairsUpFrontD1C);
else
@@ -1883,7 +1883,7 @@ void DisplayMan::drawSquareD1C(Direction dir, int16 posX, int16 posY) {
drawFloorOrnament(squareAspect[k4_FloorOrnOrdAspect], k7_viewFloor_D1C);
drawCeilingPit(k66_ceilingPitD1C_GraphicIndice, &frameCeilingPitD1C, posX, posY, false);
break;
- case k0_ElementTypeWall:
+ case kDMElementTypeWall:
_vm->_dungeonMan->_isFacingAlcove = false;
_vm->_dungeonMan->_isFacingViAltar = false;
_vm->_dungeonMan->_isFacingFountain = false;
@@ -1921,10 +1921,10 @@ void DisplayMan::drawSquareD1C(Direction dir, int16 posX, int16 posY) {
_doorNativeBitmapIndexFrontD1LCR, bitmapByteCount(96, 88), k2_ViewDoorOrnament_D1LCR, _doorFrameD1C);
order = k0x0349_CellOrder_DoorPass2_FrontLeft_FrontRight;
break;
- case k2_ElementTypePit:
+ case kDMElementTypePit:
drawFloorPitOrStairsBitmap(squareAspect[k2_PitInvisibleAspect] ? k60_floorPitInvisibleD1C_GraphicIndice : k54_FloorPit_D1C_GraphicIndice, frameFloorPitD1C);
// No break on purpose
- case k5_ElementTypeTeleporter:
+ case kDMElementTypeTeleporter:
case k1_CorridorElemType:
order = k0x3421_CellOrder_BackLeft_BackRight_FrontLeft_FrontRight;
/* BUG0_64 Floor ornaments are drawn over open pits. There is no check to prevent drawing floor ornaments over open pits */
@@ -1939,7 +1939,7 @@ void DisplayMan::drawSquareD1C(Direction dir, int16 posX, int16 posY) {
if (!skip)
drawObjectsCreaturesProjectilesExplosions(Thing(squareAspect[k1_FirstGroupOrObjectAspect]), dir, posX, posY, k6_ViewSquare_D1C, order);
- if ((squareAspect[k0_ElementAspect] == k5_ElementTypeTeleporter) && squareAspect[k2_TeleporterVisibleAspect])
+ if ((squareAspect[k0_ElementAspect] == kDMElementTypeTeleporter) && squareAspect[k2_TeleporterVisibleAspect])
drawField(&_fieldAspects188[k6_ViewSquare_D1C], _frameWalls163[k6_ViewSquare_D1C]._box);
}
@@ -1970,7 +1970,7 @@ void DisplayMan::drawSquareD0L(Direction dir, int16 posX, int16 posY) {
}
drawCeilingPit(k67_ceilingPitD0L_grahicIndice, &frameCeilingPitD0L, posX, posY, false);
- if ((squareAspect[k0_ElementAspect] == k5_ElementTypeTeleporter) && squareAspect[k2_TeleporterVisibleAspect])
+ if ((squareAspect[k0_ElementAspect] == kDMElementTypeTeleporter) && squareAspect[k2_TeleporterVisibleAspect])
drawField(&_fieldAspects188[k10_ViewSquare_D0L], _frameWalls163[k10_ViewSquare_D0L]._box);
}
@@ -1983,23 +1983,23 @@ void DisplayMan::drawSquareD0R(Direction dir, int16 posX, int16 posY) {
_vm->_dungeonMan->setSquareAspect(squareAspect, dir, posX, posY);
switch (squareAspect[k0_ElementAspect]) {
- case k18_ElementTypeStairsSide:
+ case kDMElementTypeStairsSide:
drawFloorPitOrStairsBitmapFlippedHorizontally(_stairsNativeBitmapIndexSideD0L, frameStairsSideD0R);
return;
- case k2_ElementTypePit:
+ case kDMElementTypePit:
drawFloorPitOrStairsBitmapFlippedHorizontally(squareAspect[k2_PitInvisibleAspect] ? k61_floorPitInvisibleD0L_GraphicIndice
: k55_FloorPit_D0L_GraphicIndice, frameFloorPitD0R);
case k1_CorridorElemType:
case k16_DoorSideElemType:
- case k5_ElementTypeTeleporter:
+ case kDMElementTypeTeleporter:
drawCeilingPit(k67_ceilingPitD0L_grahicIndice, &frameCeilingPitD0R, posX, posY, true);
drawObjectsCreaturesProjectilesExplosions(Thing(squareAspect[k1_FirstGroupOrObjectAspect]), dir, posX, posY, k11_ViewSquare_D0R, k0x0001_CellOrder_BackLeft);
break;
- case k0_ElementTypeWall:
+ case kDMElementTypeWall:
drawWallSetBitmap(_bitmapWallSetWallD0R, _frameWalls163[k11_ViewSquare_D0R]);
return;
}
- if ((squareAspect[k0_ElementAspect] == k5_ElementTypeTeleporter) && squareAspect[k2_TeleporterVisibleAspect])
+ if ((squareAspect[k0_ElementAspect] == kDMElementTypeTeleporter) && squareAspect[k2_TeleporterVisibleAspect])
drawField(&_fieldAspects188[k11_ViewSquare_D0R], _frameWalls163[k11_ViewSquare_D0R]._box);
}
@@ -2027,7 +2027,7 @@ void DisplayMan::drawSquareD0C(Direction dir, int16 posX, int16 posY) {
} else
drawWallSetBitmap(_bitmapWallSetDoorFrameFront, doorFrameD0C);
break;
- case k19_ElementTypeStaisFront:
+ case kDMElementTypeStairsFront:
if (squareAspect[k2_StairsUpAspect]) {
drawFloorPitOrStairsBitmap(_stairsNativeBitmapIndexUpFrontD0CLeft, frameStairsUpFrontD0L);
drawFloorPitOrStairsBitmapFlippedHorizontally(_stairsNativeBitmapIndexUpFrontD0CLeft, frameStairsUpFrontD0R);
@@ -2036,13 +2036,13 @@ void DisplayMan::drawSquareD0C(Direction dir, int16 posX, int16 posY) {
drawFloorPitOrStairsBitmapFlippedHorizontally(_stairsNativeBitmapIndexDownFrontD0CLeft, frameStairsDownFrontD0R);
}
break;
- case k2_ElementTypePit:
+ case kDMElementTypePit:
drawFloorPitOrStairsBitmap(squareAspect[k2_PitInvisibleAspect] ? k62_flootPitInvisibleD0C_graphicIndice : k56_FloorPit_D0C_GraphicIndice, frameFloorPitD0C);
break;
}
drawCeilingPit(k68_ceilingPitD0C_graphicIndice, &frameCeilingPitD0C, posX, posY, false);
drawObjectsCreaturesProjectilesExplosions(Thing(squareAspect[k1_FirstGroupOrObjectAspect]), dir, posX, posY, k9_ViewSquare_D0C, k0x0021_CellOrder_BackLeft_BackRight);
- if ((squareAspect[k0_ElementAspect] == k5_ElementTypeTeleporter) && squareAspect[k2_TeleporterVisibleAspect])
+ if ((squareAspect[k0_ElementAspect] == kDMElementTypeTeleporter) && squareAspect[k2_TeleporterVisibleAspect])
drawField(&_fieldAspects188[k9_ViewSquare_D0C], _frameWalls163[k9_ViewSquare_D0C]._box);
}
diff --git a/engines/dm/group.cpp b/engines/dm/group.cpp
index 6679599e8e..e2d5fa36d3 100644
--- a/engines/dm/group.cpp
+++ b/engines/dm/group.cpp
@@ -159,7 +159,7 @@ void GroupMan::dropGroupPossessions(int16 mapX, int16 mapY, Thing groupThing, in
if ((currentThing).getType() == kDMThingTypeWeapon) {
L0371_B_WeaponDropped = true;
}
- _vm->_moveSens->getMoveResult(currentThing, kM1_MapXNotOnASquare, 0, mapX, mapY);
+ _vm->_moveSens->getMoveResult(currentThing, kDMMapXNotOnASquare, 0, mapX, mapY);
} while ((currentThing = nextThing) != Thing::_endOfList);
if (mode >= k0_soundModePlayImmediately)
@@ -169,61 +169,61 @@ void GroupMan::dropGroupPossessions(int16 mapX, int16 mapY, Thing groupThing, in
void GroupMan::dropCreatureFixedPossessions(uint16 creatureType, int16 mapX, int16 mapY, uint16 cell, int16 mode) {
static uint16 fixedPossessionCreature12Skeleton[3] = { // @ G0245_aui_Graphic559_FixedPossessionsCreature12Skeleton
- k23_ObjectInfoIndexFirstWeapon + k9_WeaponTypeFalchion,
- k69_ObjectInfoIndexFirstArmour + k30_ArmourTypeWoodenShield,
+ kDMObjectInfoIndexFirstWeapon + k9_WeaponTypeFalchion,
+ kDMObjectInfoIndexFirstArmour + k30_ArmourTypeWoodenShield,
0}
;
static uint16 fixedPossessionCreature9StoneGolem[2] = { // @ G0246_aui_Graphic559_FixedPossessionsCreature09StoneGolem
- k23_ObjectInfoIndexFirstWeapon + k24_WeaponTypeStoneClub,
+ kDMObjectInfoIndexFirstWeapon + k24_WeaponTypeStoneClub,
0
};
static uint16 fixedPossessionCreatur16TrolinAntman[2] = { // @ G0247_aui_Graphic559_FixedPossessionsCreature16Trolin_Antman
- k23_ObjectInfoIndexFirstWeapon + k23_WeaponTypeClub,
+ kDMObjectInfoIndexFirstWeapon + k23_WeaponTypeClub,
0
};
static uint16 fixedPossessionCreature18AnimatedArmourDethKnight[7] = { // @ G0248_aui_Graphic559_FixedPossessionsCreature18AnimatedArmour_DethKnight
- k69_ObjectInfoIndexFirstArmour + k41_ArmourTypeFootPlate,
- k69_ObjectInfoIndexFirstArmour + k40_ArmourTypeLegPlate,
- k69_ObjectInfoIndexFirstArmour + k39_ArmourTypeTorsoPlate,
- k23_ObjectInfoIndexFirstWeapon + k10_WeaponTypeSword,
- k69_ObjectInfoIndexFirstArmour + k38_ArmourTypeArmet,
- k23_ObjectInfoIndexFirstWeapon + k10_WeaponTypeSword,
+ kDMObjectInfoIndexFirstArmour + k41_ArmourTypeFootPlate,
+ kDMObjectInfoIndexFirstArmour + k40_ArmourTypeLegPlate,
+ kDMObjectInfoIndexFirstArmour + k39_ArmourTypeTorsoPlate,
+ kDMObjectInfoIndexFirstWeapon + k10_WeaponTypeSword,
+ kDMObjectInfoIndexFirstArmour + k38_ArmourTypeArmet,
+ kDMObjectInfoIndexFirstWeapon + k10_WeaponTypeSword,
0
};
static uint16 fixedPossessionCreature7rockRockPile[5] = { // @ G0249_aui_Graphic559_FixedPossessionsCreature07Rock_RockPile
- k127_ObjectInfoIndexFirstJunk + k25_JunkTypeBoulder,
- k127_ObjectInfoIndexFirstJunk + k25_JunkTypeBoulder | k0x8000_randomDrop,
- k23_ObjectInfoIndexFirstWeapon + k30_WeaponTypeRock | k0x8000_randomDrop,
- k23_ObjectInfoIndexFirstWeapon + k30_WeaponTypeRock | k0x8000_randomDrop,
+ kDMObjectInfoIndexFirstJunk + k25_JunkTypeBoulder,
+ kDMObjectInfoIndexFirstJunk + k25_JunkTypeBoulder | k0x8000_randomDrop,
+ kDMObjectInfoIndexFirstWeapon + k30_WeaponTypeRock | k0x8000_randomDrop,
+ kDMObjectInfoIndexFirstWeapon + k30_WeaponTypeRock | k0x8000_randomDrop,
0
};
static uint16 fixedPossessionCreature4PainRatHellHound[3] = { // @ G0250_aui_Graphic559_FixedPossessionsCreature04PainRat_Hellhound
- k127_ObjectInfoIndexFirstJunk + k35_JunkTypeDrumstickShank,
- k127_ObjectInfoIndexFirstJunk + k35_JunkTypeDrumstickShank | k0x8000_randomDrop,
+ kDMObjectInfoIndexFirstJunk + k35_JunkTypeDrumstickShank,
+ kDMObjectInfoIndexFirstJunk + k35_JunkTypeDrumstickShank | k0x8000_randomDrop,
0
};
static uint16 fixedPossessionCreature6screamer[3] = { // @ G0251_aui_Graphic559_FixedPossessionsCreature06Screamer
- k127_ObjectInfoIndexFirstJunk + k33_JunkTypeScreamerSlice,
- k127_ObjectInfoIndexFirstJunk + k33_JunkTypeScreamerSlice | k0x8000_randomDrop,
+ kDMObjectInfoIndexFirstJunk + k33_JunkTypeScreamerSlice,
+ kDMObjectInfoIndexFirstJunk + k33_JunkTypeScreamerSlice | k0x8000_randomDrop,
0
};
static uint16 fixedPossessionCreature15MagnetaWormWorm[4] = { // @ G0252_aui_Graphic559_FixedPossessionsCreature15MagentaWorm_Worm
- k127_ObjectInfoIndexFirstJunk + k34_JunkTypeWormRound,
- k127_ObjectInfoIndexFirstJunk + k34_JunkTypeWormRound | k0x8000_randomDrop,
- k127_ObjectInfoIndexFirstJunk + k34_JunkTypeWormRound | k0x8000_randomDrop,
+ kDMObjectInfoIndexFirstJunk + k34_JunkTypeWormRound,
+ kDMObjectInfoIndexFirstJunk + k34_JunkTypeWormRound | k0x8000_randomDrop,
+ kDMObjectInfoIndexFirstJunk + k34_JunkTypeWormRound | k0x8000_randomDrop,
0
};
static uint16 fixedPossessionCreature24RedDragon[11] = { // @ G0253_aui_Graphic559_FixedPossessionsCreature24RedDragon
- k127_ObjectInfoIndexFirstJunk + k36_JunkTypeDragonSteak,
- k127_ObjectInfoIndexFirstJunk + k36_JunkTypeDragonSteak,
- k127_ObjectInfoIndexFirstJunk + k36_JunkTypeDragonSteak,
- k127_ObjectInfoIndexFirstJunk + k36_JunkTypeDragonSteak,
- k127_ObjectInfoIndexFirstJunk + k36_JunkTypeDragonSteak,
- k127_ObjectInfoIndexFirstJunk + k36_JunkTypeDragonSteak,
- k127_ObjectInfoIndexFirstJunk + k36_JunkTypeDragonSteak,
- k127_ObjectInfoIndexFirstJunk + k36_JunkTypeDragonSteak,
- k127_ObjectInfoIndexFirstJunk + k36_JunkTypeDragonSteak | k0x8000_randomDrop,
- k127_ObjectInfoIndexFirstJunk + k36_JunkTypeDragonSteak | k0x8000_randomDrop, 0};
+ kDMObjectInfoIndexFirstJunk + k36_JunkTypeDragonSteak,
+ kDMObjectInfoIndexFirstJunk + k36_JunkTypeDragonSteak,
+ kDMObjectInfoIndexFirstJunk + k36_JunkTypeDragonSteak,
+ kDMObjectInfoIndexFirstJunk + k36_JunkTypeDragonSteak,
+ kDMObjectInfoIndexFirstJunk + k36_JunkTypeDragonSteak,
+ kDMObjectInfoIndexFirstJunk + k36_JunkTypeDragonSteak,
+ kDMObjectInfoIndexFirstJunk + k36_JunkTypeDragonSteak,
+ kDMObjectInfoIndexFirstJunk + k36_JunkTypeDragonSteak,
+ kDMObjectInfoIndexFirstJunk + k36_JunkTypeDragonSteak | k0x8000_randomDrop,
+ kDMObjectInfoIndexFirstJunk + k36_JunkTypeDragonSteak | k0x8000_randomDrop, 0};
uint16 *fixedPossessions;
bool cursedPossessions = false;
@@ -267,16 +267,16 @@ void GroupMan::dropCreatureFixedPossessions(uint16 creatureType, int16 mapX, int
continue;
int16 currThingType;
- if (clearFlag(currFixedPossession, k0x8000_randomDrop) >= k127_ObjectInfoIndexFirstJunk) {
+ if (clearFlag(currFixedPossession, k0x8000_randomDrop) >= kDMObjectInfoIndexFirstJunk) {
currThingType = kDMThingTypeJunk;
- currFixedPossession -= k127_ObjectInfoIndexFirstJunk;
- } else if (currFixedPossession >= k69_ObjectInfoIndexFirstArmour) {
+ currFixedPossession -= kDMObjectInfoIndexFirstJunk;
+ } else if (currFixedPossession >= kDMObjectInfoIndexFirstArmour) {
currThingType = kDMThingTypeArmour;
- currFixedPossession -= k69_ObjectInfoIndexFirstArmour;
+ currFixedPossession -= kDMObjectInfoIndexFirstArmour;
} else {
weaponDropped = true;
currThingType = kDMThingTypeWeapon;
- currFixedPossession -= k23_ObjectInfoIndexFirstWeapon;
+ currFixedPossession -= kDMObjectInfoIndexFirstWeapon;
}
Thing nextUnusedThing = _vm->_dungeonMan->getUnusedThing(currThingType);
@@ -288,7 +288,7 @@ void GroupMan::dropCreatureFixedPossessions(uint16 creatureType, int16 mapX, int
currWeapon->setType(currFixedPossession);
currWeapon->setCursed(cursedPossessions);
nextUnusedThing = _vm->thingWithNewCell(nextUnusedThing, ((cell == k255_CreatureTypeSingleCenteredCreature) || !_vm->getRandomNumber(4)) ? _vm->getRandomNumber(4) : cell);
- _vm->_moveSens->getMoveResult(nextUnusedThing, kM1_MapXNotOnASquare, 0, mapX, mapY);
+ _vm->_moveSens->getMoveResult(nextUnusedThing, kDMMapXNotOnASquare, 0, mapX, mapY);
currFixedPossession = *fixedPossessions++;
}
_vm->_sound->requestPlay(weaponDropped ? k00_soundMETALLIC_THUD : k04_soundWOODEN_THUD_ATTACK_TROLIN_ANTMAN_STONE_GOLEM, mapX, mapY, mode);
@@ -491,7 +491,7 @@ void GroupMan::groupDelete(int16 mapX, int16 mapY) {
Group *group = (Group *)_vm->_dungeonMan->getThingData(groupThing);
for (uint16 i = 0; i < 4; ++i)
group->_health[i] = 0;
- _vm->_moveSens->getMoveResult(groupThing, mapX, mapY, kM1_MapXNotOnASquare, 0);
+ _vm->_moveSens->getMoveResult(groupThing, mapX, mapY, kDMMapXNotOnASquare, 0);
group->_nextThing = Thing::_none;
if (_vm->_dungeonMan->_currMapIndex == _vm->_dungeonMan->_partyMapIndex) {
_activeGroups[group->getActiveGroupIndex()]._groupThingIndex = -1;
@@ -1069,10 +1069,10 @@ bool GroupMan::isMovementPossible(CreatureInfo *creatureInfo, int16 mapX, int16
_groupMovBlockedByWallStairsPitFakeWalFluxCageTeleporter =
!(((mapX >= 0) && (mapX < _vm->_dungeonMan->_currMapWidth)) &&
((mapY >= 0) && (mapY < _vm->_dungeonMan->_currMapHeight)) &&
- (curSquareType != k0_ElementTypeWall) &&
- (curSquareType != k3_ElementTypeStairs) &&
- ((curSquareType != k2_ElementTypePit) || (getFlag(curSquare, k0x0001_PitImaginary) && allowMovementOverImaginaryPitsAndFakeWalls) || !getFlag(curSquare, k0x0008_PitOpen) || getFlag(creatureInfo->_attributes, k0x0020_MaskCreatureInfo_levitation)) &&
- ((curSquareType != k6_ElementTypeFakeWall) || getFlag(curSquare, k0x0004_FakeWallOpen) || (getFlag(curSquare, k0x0001_FakeWallImaginary) && allowMovementOverImaginaryPitsAndFakeWalls)));
+ (curSquareType != kDMElementTypeWall) &&
+ (curSquareType != kDMElementTypeStairs) &&
+ ((curSquareType != kDMElementTypePit) || (getFlag(curSquare, k0x0001_PitImaginary) && allowMovementOverImaginaryPitsAndFakeWalls) || !getFlag(curSquare, k0x0008_PitOpen) || getFlag(creatureInfo->_attributes, k0x0020_MaskCreatureInfo_levitation)) &&
+ ((curSquareType != kDMElementTypeFakeWall) || getFlag(curSquare, k0x0004_FakeWallOpen) || (getFlag(curSquare, k0x0001_FakeWallImaginary) && allowMovementOverImaginaryPitsAndFakeWalls)));
if (_groupMovBlockedByWallStairsPitFakeWalFluxCageTeleporter)
return false;
@@ -1092,7 +1092,7 @@ bool GroupMan::isMovementPossible(CreatureInfo *creatureInfo, int16 mapX, int16
curThing = _vm->_dungeonMan->getNextThing(curThing);
}
}
- if ((curSquareType == k5_ElementTypeTeleporter) && getFlag(curSquare, k0x0008_TeleporterOpen) && (creatureInfo->getWariness() >= 10)) {
+ if ((curSquareType == kDMElementTypeTeleporter) && getFlag(curSquare, k0x0008_TeleporterOpen) && (creatureInfo->getWariness() >= 10)) {
Teleporter *curTeleporter = (Teleporter *)_vm->_dungeonMan->getSquareFirstThingData(mapX, mapY);
if (getFlag(curTeleporter->getScope(), k0x0001_TelepScopeCreatures) && !_vm->_dungeonMan->isCreatureAllowedOnMap(_currGroupThing, curTeleporter->getTargetMapIndex())) {
_groupMovBlockedByWallStairsPitFakeWalFluxCageTeleporter = true;
@@ -1239,7 +1239,7 @@ bool GroupMan::isViewPartyBlocked(uint16 mapX, uint16 mapY) {
int16 curDoorState = Square(curSquare).getDoorState();
return ((curDoorState == k3_doorState_FOURTH) || (curDoorState == k4_doorState_CLOSED)) && !getFlag(_vm->_dungeonMan->_currMapDoorInfo[curDoor->getType()]._attributes, k0x0001_MaskDoorInfo_CraturesCanSeeThrough);
}
- return (curSquareType == k0_ElementTypeWall) || ((curSquareType == k6_ElementTypeFakeWall) && !getFlag(curSquare, k0x0004_FakeWallOpen));
+ return (curSquareType == kDMElementTypeWall) || ((curSquareType == kDMElementTypeFakeWall) && !getFlag(curSquare, k0x0004_FakeWallOpen));
}
int32 GroupMan::getCreatureAspectUpdateTime(ActiveGroup *activeGroup, int16 creatureIndex, bool isAttacking) {
@@ -1368,7 +1368,7 @@ bool GroupMan::isSmellPartyBlocked(uint16 mapX, uint16 mapY) {
uint16 square = _vm->_dungeonMan->_currMapData[mapX][mapY];
int16 squareType = Square(square).getType();
- return ( (squareType) == k0_ElementTypeWall) || ((squareType == k6_ElementTypeFakeWall)
+ return ( (squareType) == kDMElementTypeWall) || ((squareType == kDMElementTypeFakeWall)
&& !getFlag(square, k0x0004_FakeWallOpen));
}
@@ -1551,7 +1551,7 @@ void GroupMan::stealFromChampion(Group *group, uint16 championIndex) {
The following statement is missing: L0394_T_Thing->Next = Thing::_endOfList;
This creates cloned things if L0394_T_Thing->Next is not Thing::_endOfList which is the case when the object comes from a chest in which it was not the last object */
} else {
- _vm->_dungeonMan->linkThingToList(slotThing, group->_slot, kM1_MapXNotOnASquare, 0);
+ _vm->_dungeonMan->linkThingToList(slotThing, group->_slot, kDMMapXNotOnASquare, 0);
}
_vm->_championMan->drawChampionState((ChampionIndex)championIndex);
}
@@ -1756,7 +1756,7 @@ Thing GroupMan::groupGetGenerated(int16 creatureType, int16 healthMultiplier, ui
}
} while (creatureCount--);
group->_cells = groupCells;
- if (_vm->_moveSens->getMoveResult(groupThing, kM1_MapXNotOnASquare, 0, mapX, mapY)) {
+ if (_vm->_moveSens->getMoveResult(groupThing, kDMMapXNotOnASquare, 0, mapX, mapY)) {
/* If F0267_MOVE_GetMoveResult_CPSCE returns true then the group was either killed by a projectile
impact (in which case the thing data was marked as unused) or the party is on the destination
square and an event is created to move the creature into the dungeon later
@@ -1770,8 +1770,8 @@ Thing GroupMan::groupGetGenerated(int16 creatureType, int16 healthMultiplier, ui
bool GroupMan::isSquareACorridorTeleporterPitOrDoor(int16 mapX, int16 mapY) {
int16 squareType = Square(_vm->_dungeonMan->getSquare(mapX, mapY)).getType();
- return ((squareType == k1_CorridorElemType) || (squareType == k5_ElementTypeTeleporter)
- || (squareType == k2_ElementTypePit) || (squareType == k4_DoorElemType));
+ return ((squareType == k1_CorridorElemType) || (squareType == kDMElementTypeTeleporter)
+ || (squareType == kDMElementTypePit) || (squareType == k4_DoorElemType));
}
int16 GroupMan::getMeleeTargetCreatureOrdinal(int16 groupX, int16 groupY, int16 partyX, int16 partyY, uint16 champCell) {
diff --git a/engines/dm/inventory.cpp b/engines/dm/inventory.cpp
index ba9aa7ef44..1424fd8ebd 100644
--- a/engines/dm/inventory.cpp
+++ b/engines/dm/inventory.cpp
@@ -287,7 +287,7 @@ void InventoryMan::closeChest() {
*dunMan.getThingData(thing) = Thing::_endOfList.toUint16();
container->getSlot() = prevThing = thing;
} else {
- dunMan.linkThingToList(thing, prevThing, kM1_MapXNotOnASquare, 0);
+ dunMan.linkThingToList(thing, prevThing, kDMMapXNotOnASquare, 0);
prevThing = thing;
}
}
@@ -565,7 +565,7 @@ void InventoryMan::drawPanelObject(Thing thingToDraw, bool pressingEye) {
case kDMThingTypePotion: {
potentialAttribMask = k0x0001_DescriptionMaskConsumable;
Potion *potion = (Potion *)rawThingPtr;
- actualAttribMask = _vm->_dungeonMan->_objectInfos[k2_ObjectInfoIndexFirstPotion + potion->getType()].getAllowedSlots();
+ actualAttribMask = _vm->_dungeonMan->_objectInfos[kDMObjectInfoIndexFirstPotion + potion->getType()].getAllowedSlots();
break;
}
case kDMThingTypeJunk: {
@@ -615,7 +615,7 @@ void InventoryMan::drawPanelObject(Thing thingToDraw, bool pressingEye) {
} else {
Junk *junk = (Junk *)rawThingPtr;
potentialAttribMask = k0x0001_DescriptionMaskConsumable;
- actualAttribMask = _vm->_dungeonMan->_objectInfos[k127_ObjectInfoIndexFirstJunk + junk->getType()].getAllowedSlots();
+ actualAttribMask = _vm->_dungeonMan->_objectInfos[kDMObjectInfoIndexFirstJunk + junk->getType()].getAllowedSlots();
}
break;
}
@@ -898,7 +898,7 @@ void InventoryMan::clickOnMouth() {
return;
Thing handThing = _vm->_championMan->_leaderHandObject;
- if (!getFlag(_vm->_dungeonMan->_objectInfos[_vm->_dungeonMan->getObjectInfoIndex(handThing)]._allowedSlots, k0x0001_ObjectAllowedSlotMouth))
+ if (!getFlag(_vm->_dungeonMan->_objectInfos[_vm->_dungeonMan->getObjectInfoIndex(handThing)]._allowedSlots, kDMMaskMouth))
return;
uint16 iconIndex = _vm->_objectMan->getIconIndex(handThing);
diff --git a/engines/dm/menus.cpp b/engines/dm/menus.cpp
index 5edbeb3db7..57617c57d7 100644
--- a/engines/dm/menus.cpp
+++ b/engines/dm/menus.cpp
@@ -668,7 +668,7 @@ int16 MenuMan::getChampionSpellCastResult(uint16 champIndex) {
_vm->_championMan->addObjectInSlot((ChampionIndex)champIndex, unusedObject, slotIndex);
_vm->_championMan->drawChampionState((ChampionIndex)champIndex);
} else
- _vm->_moveSens->getMoveResult(unusedObject, kM1_MapXNotOnASquare, 0, _vm->_dungeonMan->_partyMapX, _vm->_dungeonMan->_partyMapY);
+ _vm->_moveSens->getMoveResult(unusedObject, kDMMapXNotOnASquare, 0, _vm->_dungeonMan->_partyMapX, _vm->_dungeonMan->_partyMapY);
}
break;
diff --git a/engines/dm/movesens.cpp b/engines/dm/movesens.cpp
index 64e3e5e657..3339eb67a2 100644
--- a/engines/dm/movesens.cpp
+++ b/engines/dm/movesens.cpp
@@ -264,7 +264,7 @@ bool MovesensMan::getMoveResult(Thing thing, int16 mapX, int16 mapY, int16 destM
for (int16 chainedMoveCount = 1000; --chainedMoveCount; ) {
destinationSquareData = _vm->_dungeonMan->_currMapData[destMapX][destMapY];
SquareType destinationSquareType = Square(destinationSquareData).getType();
- if (destinationSquareType == k5_ElementTypeTeleporter) {
+ if (destinationSquareType == kDMElementTypeTeleporter) {
if (!getFlag(destinationSquareData, k0x0008_TeleporterOpen))
break;
@@ -307,7 +307,7 @@ bool MovesensMan::getMoveResult(Thing thing, int16 mapX, int16 mapY, int16 destM
if (destinationIsTeleporterTarget)
break;
} else {
- if ((destinationSquareType == k2_ElementTypePit) && !thingLevitates && getFlag(destinationSquareData, k0x0008_PitOpen) && !getFlag(destinationSquareData, k0x0001_PitImaginary)) {
+ if ((destinationSquareType == kDMElementTypePit) && !thingLevitates && getFlag(destinationSquareData, k0x0008_PitOpen) && !getFlag(destinationSquareData, k0x0001_PitImaginary)) {
if (drawDungeonViewWhileFalling && !_useRopeToClimbDownPit) {
drawDungeonViewWhileFalling = true;
if (traversedPitCount) {
@@ -346,7 +346,7 @@ bool MovesensMan::getMoveResult(Thing thing, int16 mapX, int16 mapY, int16 destM
if (outcome == k1_outcomeKilledSomeCreaturesInGroup)
_vm->_groupMan->dropMovingCreatureFixedPossession(thing, destMapX, destMapY);
}
- } else if ((destinationSquareType == k3_ElementTypeStairs) && (thing != Thing::_party) && (thingType != kDMThingTypeProjectile)) {
+ } else if ((destinationSquareType == kDMElementTypeStairs) && (thing != Thing::_party) && (thingType != kDMThingTypeProjectile)) {
if (!getFlag(destinationSquareData, k0x0004_StairsUp)) {
mapIndexDestination = _vm->_dungeonMan->getLocationAfterLevelChange(mapIndexDestination, 1, &destMapX, &destMapY);
_vm->_dungeonMan->setCurrentMap(mapIndexDestination);
@@ -916,7 +916,7 @@ void MovesensMan::triggerEffect(Sensor *sensor, int16 effect, int16 mapX, int16
int16 targetMapY = sensor->getActionTargetMapY();
SquareType curSquareType = Square(_vm->_dungeonMan->_currMapData[targetMapX][targetMapY]).getType();
uint16 targetCell;
- if (curSquareType == k0_ElementTypeWall)
+ if (curSquareType == kDMElementTypeWall)
targetCell = sensor->getActionTargetCell();
else
targetCell = kDMCellNorthWest;
diff --git a/engines/dm/projexpl.cpp b/engines/dm/projexpl.cpp
index e3ee666046..211c671076 100644
--- a/engines/dm/projexpl.cpp
+++ b/engines/dm/projexpl.cpp
@@ -382,7 +382,7 @@ void ProjExpl::projectileDelete(Thing projectileThing, Thing *groupSlot, int16 m
*genericThing = Thing::_endOfList;
*groupSlot = projectileSlotThing;
} else
- _vm->_dungeonMan->linkThingToList(projectileSlotThing, previousThing, kM1_MapXNotOnASquare, 0);
+ _vm->_dungeonMan->linkThingToList(projectileSlotThing, previousThing, kDMMapXNotOnASquare, 0);
} else
_vm->_moveSens->getMoveResult(Thing((projectileSlotThing).getTypeAndIndex() | getFlag(projectileThing.toUint16(), 0xC)), -2, 0, mapX, mapY);
}
diff --git a/engines/dm/timeline.cpp b/engines/dm/timeline.cpp
index 1b375bc3d0..c9e26ce046 100644
--- a/engines/dm/timeline.cpp
+++ b/engines/dm/timeline.cpp
@@ -770,7 +770,7 @@ T0252001:
if (event->_type == k61_TMEventTypeMoveGroupAudible)
_vm->_sound->requestPlay(k17_soundBUZZ, mapX, mapY, k1_soundModePlayIfPrioritized);
- _vm->_moveSens->getMoveResult(Thing(event->_Cu._slot), kM1_MapXNotOnASquare, 0, mapX, mapY);
+ _vm->_moveSens->getMoveResult(Thing(event->_Cu._slot), kDMMapXNotOnASquare, 0, mapX, mapY);
} else {
if (!randomDirectionMoveRetried) {
randomDirectionMoveRetried = true;