aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--engines/dm/TODOs/methodtree.txt6
-rw-r--r--engines/dm/champion.cpp22
-rw-r--r--engines/dm/champion.h2
-rw-r--r--engines/dm/dm.h17
-rw-r--r--engines/dm/dungeonman.cpp71
-rw-r--r--engines/dm/dungeonman.h2
-rw-r--r--engines/dm/eventman.cpp2
-rw-r--r--engines/dm/gfx.cpp2
-rw-r--r--engines/dm/inventory.cpp28
-rw-r--r--engines/dm/loadsave.cpp2
-rw-r--r--engines/dm/menus.cpp2
-rw-r--r--engines/dm/movesens.cpp16
-rw-r--r--engines/dm/objectman.cpp2
13 files changed, 117 insertions, 57 deletions
diff --git a/engines/dm/TODOs/methodtree.txt b/engines/dm/TODOs/methodtree.txt
index da5e0ccca9..9f09e9dd8c 100644
--- a/engines/dm/TODOs/methodtree.txt
+++ b/engines/dm/TODOs/methodtree.txt
@@ -4,8 +4,10 @@ F0115_DUNGEONVIEW_DrawObjectsCreaturesProjectilesExplosions_CPSEF
FIELD_ASPECT // done
F0114_DUNGEONVIEW_GetExplosionBitmap // done
F0133_VIDEO_BlitBoxFilledWithMaskedBitmap // dummy
- F0141_DUNGEON_GetObjectInfoIndex
- F0142_DUNGEON_GetProjectileAspect
+ F0141_DUNGEON_GetObjectInfoIndex // done
+ F0142_DUNGEON_GetProjectileAspect // done
+ F0158_DUNGEON_GetWeaponInfo // done
+ M66_PROJECTILE_ASPECT_ORDINAL // done
F0176_GROUP_GetCreatureOrdinalInCell
G0017_auc_Graphic562_PaletteChanges_NoChanges
G0075_apuc_PaletteChanges_Projectile
diff --git a/engines/dm/champion.cpp b/engines/dm/champion.cpp
index 88e03a52d5..730eaa2985 100644
--- a/engines/dm/champion.cpp
+++ b/engines/dm/champion.cpp
@@ -368,7 +368,7 @@ void ChampionMan::addObjectInSlot(ChampionIndex champIndex, Thing thing, Champio
ObjectMan &objMan = *_vm->_objectMan;
MenuMan &menuMan = *_vm->_menuMan;
- if (thing == Thing::_thingNone)
+ if (thing == Thing::_none)
return;
Champion *champ = &_champions[champIndex];
@@ -442,7 +442,7 @@ void ChampionMan::resetDataToStartGame() {
assert(false);
}
- _leaderHandObject = Thing::_thingNone;
+ _leaderHandObject = Thing::_none;
_leaderHandObjectIconIndex = kIconIndiceNone;
_leaderEmptyHanded = true;
}
@@ -479,7 +479,7 @@ void ChampionMan::addCandidateChampionToParty(uint16 championPortraitIndex) {
champ->_water = 1500 + _vm->_rnd->getRandomNumber(256);
int16 AL_0_slotIndex_Red;
for (AL_0_slotIndex_Red = kChampionSlotReadyHand; AL_0_slotIndex_Red < kChampionSlotChest_1; ++AL_0_slotIndex_Red) {
- champ->setSlot((ChampionSlot)AL_0_slotIndex_Red, Thing::_thingNone);
+ champ->setSlot((ChampionSlot)AL_0_slotIndex_Red, Thing::_none);
}
Thing thing = dunMan.getSquareFirstThing(dunMan._currMap._partyPosX, dunMan._currMap._partyPosY);
while (thing.getType() != kTextstringType) {
@@ -566,7 +566,7 @@ void ChampionMan::addCandidateChampionToParty(uint16 championPortraitIndex) {
thing = dunMan.getSquareFirstThing(mapX, mapY);
AL_0_slotIndex_Red = kChampionSlotBackpackLine_1_1;
uint16 slotIndex_Green;
- while (thing != Thing::_thingEndOfList) {
+ while (thing != Thing::_endOfList) {
ThingType AL_2_thingType = thing.getType();
if ((AL_2_thingType > kSensorThingType) && (thing.getCell() == championObjectsCell)) {
int16 objectAllowedSlots = gObjectInfo[dunMan.getObjectInfoIndex(thing)].getAllowedSlots();
@@ -576,14 +576,14 @@ void ChampionMan::addCandidateChampionToParty(uint16 championPortraitIndex) {
if (objectAllowedSlots & gSlotMasks[slotIndex_Green])
goto T0280048;
}
- if ((objectAllowedSlots & gSlotMasks[kChampionSlotNeck]) && (champ->getSlot(kChampionSlotNeck) == Thing::_thingNone)) {
+ if ((objectAllowedSlots & gSlotMasks[kChampionSlotNeck]) && (champ->getSlot(kChampionSlotNeck) == Thing::_none)) {
slotIndex_Green = kChampionSlotNeck;
} else {
goto T0280046;
}
break;
case kWeaponThingType:
- if (champ->getSlot(kChampionSlotActionHand) == Thing::_thingNone) {
+ if (champ->getSlot(kChampionSlotActionHand) == Thing::_none) {
slotIndex_Green = kChampionSlotActionHand;
} else {
goto T0280046;
@@ -591,9 +591,9 @@ void ChampionMan::addCandidateChampionToParty(uint16 championPortraitIndex) {
break;
case kScrollThingType:
case kPotionThingType:
- if (champ->getSlot(kChampionSlotPouch_1) == Thing::_thingNone) {
+ if (champ->getSlot(kChampionSlotPouch_1) == Thing::_none) {
slotIndex_Green = kChampionSlotPouch_1;
- } else if (champ->getSlot(kChampionSlotPouch_2) == Thing::_thingNone) {
+ } else if (champ->getSlot(kChampionSlotPouch_2) == Thing::_none) {
slotIndex_Green = kChampionSlotPouch_2;
} else {
goto T0280046;
@@ -602,7 +602,7 @@ void ChampionMan::addCandidateChampionToParty(uint16 championPortraitIndex) {
case kContainerThingType:
case kJunkThingType:
T0280046:
- if ((objectAllowedSlots & gSlotMasks[kChampionSlotNeck]) && (champ->getSlot(kChampionSlotNeck) == Thing::_thingNone)) {
+ if ((objectAllowedSlots & gSlotMasks[kChampionSlotNeck]) && (champ->getSlot(kChampionSlotNeck) == Thing::_none)) {
slotIndex_Green = kChampionSlotNeck;
} else {
slotIndex_Green = AL_0_slotIndex_Red++;
@@ -613,7 +613,7 @@ T0280046:
break;
}
T0280048:
- if (champ->getSlot((ChampionSlot)slotIndex_Green) != Thing::_thingNone) {
+ if (champ->getSlot((ChampionSlot)slotIndex_Green) != Thing::_none) {
goto T0280046;
}
addObjectInSlot((ChampionIndex)prevChampCount, thing, (ChampionSlot)slotIndex_Green);
@@ -937,7 +937,7 @@ void ChampionMan::drawSlot(uint16 champIndex, ChampionSlot slotIndex) {
}
int16 iconIndex;
- if (thing == Thing::_thingNone) {
+ if (thing == Thing::_none) {
if (slotIndex <= kChampionSlotFeet) {
iconIndex = kIconIndiceReadyHand + (slotIndex << 1);
if (champ->getWoundsFlag((ChampionWound)(1 << slotIndex))) {
diff --git a/engines/dm/champion.h b/engines/dm/champion.h
index d712e6b6c2..e0390a4937 100644
--- a/engines/dm/champion.h
+++ b/engines/dm/champion.h
@@ -400,7 +400,7 @@ public:
void clearWounds() { _wounds = kChampionWoundNone; }
void resetToZero() { // oh boy > . <
for (int16 i = 0; i < 30; ++i)
- _slots[i] = Thing::_thingNone;
+ _slots[i] = Thing::_none;
for (int16 i = 0; i < 20; ++i)
_skills[i].resetToZero();
_attributes = _wounds = 0;
diff --git a/engines/dm/dm.h b/engines/dm/dm.h
index 4bf858422c..251a0af680 100644
--- a/engines/dm/dm.h
+++ b/engines/dm/dm.h
@@ -95,8 +95,21 @@ enum Cell {
class Thing {
uint16 _data;
public:
- static const Thing _thingNone;
- static const Thing _thingEndOfList;
+ static const Thing _none; // @ C0xFFFF_THING_NONE
+ static const Thing _endOfList; // @ C0xFFFE_THING_ENDOFLIST
+ static const Thing _firstExplosion; // @ C0xFF80_THING_FIRST_EXPLOSION
+ static const Thing _explFireBall; // @ C0xFF80_THING_EXPLOSION_FIREBALL
+ static const Thing _explSlime; // @ C0xFF81_THING_EXPLOSION_SLIME
+ static const Thing _explLightningBolt; // @ C0xFF82_THING_EXPLOSION_LIGHTNING_BOLT
+ static const Thing _explHarmNonMaterial; // @ C0xFF83_THING_EXPLOSION_HARM_NON_MATERIAL
+ static const Thing _explOpenDoor; // @ C0xFF84_THING_EXPLOSION_OPEN_DOOR
+ static const Thing _explPoisonBolt; // @ C0xFF86_THING_EXPLOSION_POISON_BOLT
+ static const Thing _explPoisonCloud; // @ C0xFF87_THING_EXPLOSION_POISON_CLOUD
+ static const Thing _explSmoke; // @ C0xFFA8_THING_EXPLOSION_SMOKE
+ static const Thing _explFluxcage; // @ C0xFFB2_THING_EXPLOSION_FLUXCAGE
+ static const Thing _explRebirthStep1; // @ C0xFFE4_THING_EXPLOSION_REBIRTH_STEP1
+ static const Thing _explRebirthStep2; // @ C0xFFE5_THING_EXPLOSION_REBIRTH_STEP2
+ static const Thing _party; // @ C0xFFFF_THING_PARTY
Thing() : _data(0) {}
explicit Thing(uint16 d) { set(d); }
diff --git a/engines/dm/dungeonman.cpp b/engines/dm/dungeonman.cpp
index 83c43aac3d..12531b66ea 100644
--- a/engines/dm/dungeonman.cpp
+++ b/engines/dm/dungeonman.cpp
@@ -534,8 +534,21 @@ unsigned char gThingDataWordCount[16] = {
2 /* Explosion */
}; // @ G0235_auc_Graphic559_ThingDataByteCount
-const Thing Thing::_thingNone(0);
-const Thing Thing::_thingEndOfList(0xFFFE);
+const Thing Thing::_none(0); // @ C0xFFFF_THING_NONE
+const Thing Thing::_endOfList(0xFFFE); // @ C0xFFFE_THING_ENDOFLIST
+const Thing Thing::_firstExplosion(0xFF80); // @ C0xFF80_THING_FIRST_EXPLOSION
+const Thing Thing::_explFireBall(0xFF80); // @ C0xFF80_THING_EXPLOSION_FIREBALL
+const Thing Thing::_explSlime(0xFF81); // @ C0xFF81_THING_EXPLOSION_SLIME
+const Thing Thing::_explLightningBolt(0xFF82); // @ C0xFF82_THING_EXPLOSION_LIGHTNING_BOLT
+const Thing Thing::_explHarmNonMaterial(0xFF83); // @ C0xFF83_THING_EXPLOSION_HARM_NON_MATERIAL
+const Thing Thing::_explOpenDoor(0xFF84); // @ C0xFF84_THING_EXPLOSION_OPEN_DOOR
+const Thing Thing::_explPoisonBolt(0xFF86); // @ C0xFF86_THING_EXPLOSION_POISON_BOLT
+const Thing Thing::_explPoisonCloud(0xFF87); // @ C0xFF87_THING_EXPLOSION_POISON_CLOUD
+const Thing Thing::_explSmoke(0xFFA8); // @ C0xFFA8_THING_EXPLOSION_SMOKE
+const Thing Thing::_explFluxcage(0xFFB2); // @ C0xFFB2_THING_EXPLOSION_FLUXCAGE
+const Thing Thing::_explRebirthStep1(0xFFE4); // @ C0xFFE4_THING_EXPLOSION_REBIRTH_STEP1
+const Thing Thing::_explRebirthStep2(0xFFE5); // @ C0xFFE5_THING_EXPLOSION_REBIRTH_STEP2
+const Thing Thing::_party(0xFFFF); // @ C0xFFFF_THING_PARTY
void DungeonMan::loadDungeonFile() {
if (_messages._newGame)
@@ -627,7 +640,7 @@ void DungeonMan::loadDungeonFile() {
_dunData._squareFirstThings[i].set(dunDataStream.readUint16BE());
if (_messages._newGame)
for (uint16 i = 0; i < 300; ++i)
- _dunData._squareFirstThings[actualSquareFirstThingCount + i] = Thing::_thingNone;
+ _dunData._squareFirstThings[actualSquareFirstThingCount + i] = Thing::_none;
// TODO: ??? is this - end
@@ -688,7 +701,7 @@ void DungeonMan::loadDungeonFile() {
if ((thingType == kGroupThingType) || thingType >= kProjectileThingType)
_dunData._eventMaximumCount += _fileHeader._thingCounts[thingType];
for (uint16 i = 0; i < gAdditionalThingCounts[thingType]; ++i) {
- _dunData._thingsData[thingType][thingCount + i][0] = Thing::_thingNone.toUint16();
+ _dunData._thingsData[thingType][thingCount + i][0] = Thing::_none.toUint16();
}
}
}
@@ -797,7 +810,7 @@ int16 DungeonMan::getSquareFirstThingIndex(int16 mapX, int16 mapY) {
Thing DungeonMan::getSquareFirstThing(int16 mapX, int16 mapY) {
int16 index = getSquareFirstThingIndex(mapX, mapY);
if (index == -1)
- return Thing::_thingEndOfList;
+ return Thing::_endOfList;
return _dunData._squareFirstThings[index];
}
@@ -849,7 +862,7 @@ void DungeonMan::setSquareAspect(uint16 *aspectArray, direction dir, int16 mapX,
T0172010_ClosedFakeWall:
setSquareAspectOrnOrdinals(aspectArray, leftOrnAllowed, frontOrnAllowed, rightOrnAllowed, dir, mapX, mapY, squareIsFakeWall);
- while ((thing != Thing::_thingEndOfList) && (thing.getType() <= kSensorThingType)) {
+ while ((thing != Thing::_endOfList) && (thing.getType() <= kSensorThingType)) {
int16 sideIndex = (thing.getCell() - dir) & 3;
if (sideIndex) {
if (thing.getType() == kTextstringType) {
@@ -868,7 +881,7 @@ T0172010_ClosedFakeWall:
thing = getNextThing(thing);
}
if (squareIsFakeWall && (_currMap._partyPosX != mapX) && (_currMap._partyPosY != mapY)) {
- aspectArray[kFirstGroupOrObjectAspect] = Thing::_thingEndOfList.toUint16();
+ aspectArray[kFirstGroupOrObjectAspect] = Thing::_endOfList.toUint16();
return;
}
break;
@@ -897,7 +910,7 @@ T0172010_ClosedFakeWall:
T0172029_Teleporter:
footPrintsAllowed = true;
T0172030_Pit:
- while ((thing != Thing::_thingEndOfList) && (thing.getType() <= kSensorThingType)) {
+ while ((thing != Thing::_endOfList) && (thing.getType() <= kSensorThingType)) {
if (thing.getType() == kSensorThingType)
aspectArray[kFloorOrnOrdAspect] = Sensor(getThingData(thing)).getOrnOrdinal();
thing = getNextThing(thing);
@@ -921,7 +934,7 @@ T0172030_Pit:
}
footPrintsAllowed = true;
T0172046_Stairs:
- while ((thing != Thing::_thingEndOfList) && (thing.getType() <= kSensorThingType))
+ while ((thing != Thing::_endOfList) && (thing.getType() <= kSensorThingType))
thing = getNextThing(thing);
T0172049_Footprints:
unsigned char scentOrdinal; // see next line comment
@@ -1178,7 +1191,7 @@ uint16 DungeonMan::getObjectWeight(Thing thing) {
2, 0, 8
};
- if (thing == Thing::_thingNone)
+ if (thing == Thing::_none)
return 0;
switch (thing.getType()) {
case kWeaponThingType:
@@ -1196,7 +1209,7 @@ uint16 DungeonMan::getObjectWeight(Thing thing) {
uint16 weight = 50;
Container container(getThingData(thing));
Thing slotThing = container.getSlot();
- while (slotThing != Thing::_thingEndOfList) {
+ while (slotThing != Thing::_endOfList) {
weight += getObjectWeight(slotThing);
slotThing = getNextThing(slotThing);
}
@@ -1240,11 +1253,11 @@ int16 DungeonMan::getObjectInfoIndex(Thing thing) {
}
void DungeonMan::linkThingToList(Thing thingToLink, Thing thingInList, int16 mapX, int16 mapY) {
- if (thingToLink == Thing::_thingEndOfList)
+ if (thingToLink == Thing::_endOfList)
return;
uint16 *rawObjPtr = getThingData(thingToLink);
- *rawObjPtr = Thing::_thingEndOfList.toUint16();
+ *rawObjPtr = Thing::_endOfList.toUint16();
if (mapX >= 0) {
Square *squarePtr = (Square*)&_currMap._data[mapX][mapY];
@@ -1274,7 +1287,7 @@ void DungeonMan::linkThingToList(Thing thingToLink, Thing thingInList, int16 map
}
Thing thing = getNextThing(thingInList);
- while (thing != Thing::_thingEndOfList) {
+ while (thing != Thing::_endOfList) {
thing = getNextThing(thing);
thingInList = thing;
}
@@ -1282,4 +1295,34 @@ void DungeonMan::linkThingToList(Thing thingToLink, Thing thingInList, int16 map
*rawObjPtr = thingToLink.toUint16();
}
+WeaponInfo* DungeonMan::getWeaponInfo(Thing thing) {
+ Weapon* weapon = (Weapon*)getThingData(thing);
+ return &gWeaponInfo[weapon->getType()];
+}
+
+int16 DungeonMan::getProjectileAspect(Thing thing) {
+ ThingType thingType;
+ int16 projAspOrd;
+ WeaponInfo *weaponInfo;
+
+ if ((thingType == thing.getType()) == kExplosionThingType) {
+ if (thing == Thing::_explFireBall)
+ return -_vm->indexToOrdinal(kProjectileAspectExplosionFireBall);
+ if (thing == Thing::_explSlime)
+ return -_vm->indexToOrdinal(kProjectileAspectExplosionSlime);
+ if (thing == Thing::_explLightningBolt)
+ return -_vm->indexToOrdinal(kProjectileAspectExplosionLightningBolt);
+ if ((thing == Thing::_explPoisonBolt) || (thing == Thing::_explPoisonCloud))
+ return -_vm->indexToOrdinal(kProjectileAspectExplosionPoisonBoltCloud);
+
+ return -_vm->indexToOrdinal(kProjectileAspectExplosionDefault);
+ } else if (thingType == kWeaponThingType) {
+ weaponInfo = getWeaponInfo(thing);
+ if (projAspOrd = weaponInfo->getProjectileAspectOrdinal())
+ return -projAspOrd;
+ }
+
+ return gObjectInfo[getObjectInfoIndex(thing)]._objectAspectIndex;
+}
+
}
diff --git a/engines/dm/dungeonman.h b/engines/dm/dungeonman.h
index 9a49fe9e7b..0e17f629d1 100644
--- a/engines/dm/dungeonman.h
+++ b/engines/dm/dungeonman.h
@@ -671,6 +671,8 @@ public:
uint16 getObjectWeight(Thing thing); // @ F0140_DUNGEON_GetObjectWeight
int16 getObjectInfoIndex(Thing thing); // @ F0141_DUNGEON_GetObjectInfoIndex
void linkThingToList(Thing thingToLink, Thing thingInList, int16 mapX, int16 mapY); // @ F0163_DUNGEON_LinkThingToList
+ WeaponInfo *getWeaponInfo(Thing thing); // @ F0158_DUNGEON_GetWeaponInfo
+ int16 getProjectileAspect(Thing thing); // @ F0142_DUNGEON_GetProjectileAspect
uint32 _rawDunFileDataSize; // @ probably NONE
byte *_rawDunFileData; // @ ???
diff --git a/engines/dm/eventman.cpp b/engines/dm/eventman.cpp
index f26930c542..e9abf94809 100644
--- a/engines/dm/eventman.cpp
+++ b/engines/dm/eventman.cpp
@@ -632,7 +632,7 @@ void EventManager::commandProcessCommands160To162ClickInResurrectReincarnatePane
for (uint16 slotIndex = kChampionSlotReadyHand; slotIndex < kChampionSlotChest_1; slotIndex++) {
Thing thing = champ->getSlot((ChampionSlot)slotIndex);
- if (thing != Thing::_thingNone) {
+ if (thing != Thing::_none) {
warning("MISSING CODE: F0164_DUNGEON_UnlinkThingFromList");
}
}
diff --git a/engines/dm/gfx.cpp b/engines/dm/gfx.cpp
index 81b53d4ba6..177f9aec8f 100644
--- a/engines/dm/gfx.cpp
+++ b/engines/dm/gfx.cpp
@@ -658,7 +658,7 @@ DisplayMan::DisplayMan(DMEngine *dmEngine) : _vm(dmEngine) {
for (int i = 0; i < 18; i++)
_currMapDoorOrnIndices[i] = 0;
- _inscriptionThing = Thing::_thingNone;
+ _inscriptionThing = Thing::_none;
_useByteBoxCoordinates = false;
}
diff --git a/engines/dm/inventory.cpp b/engines/dm/inventory.cpp
index 4e3d0d31bc..b3c3a900d2 100644
--- a/engines/dm/inventory.cpp
+++ b/engines/dm/inventory.cpp
@@ -45,9 +45,9 @@ Box gBoxPoisoned = Box(112, 207, 105, 119); // @ G0037_s_Graphic562_Box_Poisoned
InventoryMan::InventoryMan(DMEngine *vm) : _vm(vm) {
_panelContent = kPanelContentFoodWaterPoisoned;
for (uint16 i = 0; i < 8; ++i)
- _chestSlots[i] = Thing::_thingNone;
- _openChest = Thing::_thingNone;
- _openChest = Thing::_thingNone;
+ _chestSlots[i] = Thing::_none;
+ _openChest = Thing::_none;
+ _openChest = Thing::_none;
}
void InventoryMan::toggleInventory(ChampionIndex championIndex) {
@@ -199,10 +199,10 @@ void InventoryMan::drawPanel() {
_panelContent = kPanelContentScroll;
break;
default:
- thing = Thing::_thingNone;
+ thing = Thing::_none;
break;
}
- if (thing == Thing::_thingNone) {
+ if (thing == Thing::_none) {
drawPanelFoodWaterPoisoned();
} else {
drawPanelObject(thing, false);
@@ -213,20 +213,20 @@ void InventoryMan::closeChest() {
DungeonMan &dunMan = *_vm->_dungeonMan;
bool processFirstChestSlot = true;
- if (_openChest == Thing::_thingNone)
+ if (_openChest == Thing::_none)
return;
Container *container = (Container*)dunMan.getThingData(_openChest);
- _openChest = Thing::_thingNone;
- container->getSlot() = Thing::_thingEndOfList;
+ _openChest = Thing::_none;
+ container->getSlot() = Thing::_endOfList;
Thing prevThing;
for (int16 chestSlotIndex = 0; chestSlotIndex < 8; ++chestSlotIndex) {
Thing thing = _chestSlots[chestSlotIndex];
- if (thing != Thing::_thingNone) {
- _chestSlots[chestSlotIndex] = Thing::_thingNone; // CHANGE8_09_FIX
+ if (thing != Thing::_none) {
+ _chestSlots[chestSlotIndex] = Thing::_none; // CHANGE8_09_FIX
if (processFirstChestSlot) {
processFirstChestSlot = false;
- *dunMan.getThingData(thing) = Thing::_thingEndOfList.toUint16();
+ *dunMan.getThingData(thing) = Thing::_endOfList.toUint16();
container->getSlot() = prevThing = thing;
} else {
dunMan.linkThingToList(thing, prevThing, kMapXNotOnASquare, 0);
@@ -303,7 +303,7 @@ void InventoryMan::openAndDrawChest(Thing thingToOpen, Container* chest, bool is
return;
warning("CHANGE8_09_FIX");
- if (_openChest != Thing::_thingNone)
+ if (_openChest != Thing::_none)
closeChest(); // CHANGE8_09_FIX
_openChest = thingToOpen;
@@ -315,7 +315,7 @@ void InventoryMan::openAndDrawChest(Thing thingToOpen, Container* chest, bool is
int16 chestSlotIndex = 0;
Thing thing = chest->getSlot();
int16 thingCount = 0;
- while (thing != Thing::_thingEndOfList) {
+ while (thing != Thing::_endOfList) {
warning("CHANGE8_08_FIX");
if (++thingCount > 8)
break; // CHANGE8_08_FIX, make sure that no more than the first 8 objects in a chest are drawn
@@ -326,7 +326,7 @@ void InventoryMan::openAndDrawChest(Thing thingToOpen, Container* chest, bool is
}
while (chestSlotIndex < 8) {
objMan.drawIconInSlotBox(chestSlotIndex + kSlotBoxChestFirstSlot, kIconIndiceNone);
- _chestSlots[chestSlotIndex++] = Thing::_thingNone;
+ _chestSlots[chestSlotIndex++] = Thing::_none;
}
}
diff --git a/engines/dm/loadsave.cpp b/engines/dm/loadsave.cpp
index 7ac9283a17..7da701b6c3 100644
--- a/engines/dm/loadsave.cpp
+++ b/engines/dm/loadsave.cpp
@@ -43,7 +43,7 @@ LoadgameResponse LoadsaveMan::loadgame() {
if (newGame) {
_vm->_restartGameAllowed = false;
cm._partyChampionCount = 0;
- cm._leaderHandObject = Thing::_thingNone;
+ cm._leaderHandObject = Thing::_none;
_vm->_gameId = _vm->_rnd->getRandomNumber(65536) * _vm->_rnd->getRandomNumber(65536);
} else {
assert(false);
diff --git a/engines/dm/menus.cpp b/engines/dm/menus.cpp
index d6c09d85e6..a09a33dbf1 100644
--- a/engines/dm/menus.cpp
+++ b/engines/dm/menus.cpp
@@ -96,7 +96,7 @@ void MenuMan::drawActionIcon(ChampionIndex championIndex) {
byte *bitmapIcon = dm._tmpBitmap;
Thing thing = champion.getSlot(kChampionSlotActionHand);
IconIndice iconIndex;
- if (thing == Thing::_thingNone) {
+ if (thing == Thing::_none) {
iconIndex = kIconIndiceActionEmptyHand;
} else if (gObjectInfo[_vm->_dungeonMan->getObjectInfoIndex(thing)]._actionSetIndex) {
iconIndex = _vm->_objectMan->getIconIndex(thing);
diff --git a/engines/dm/movesens.cpp b/engines/dm/movesens.cpp
index 8a833a37c3..1511146d69 100644
--- a/engines/dm/movesens.cpp
+++ b/engines/dm/movesens.cpp
@@ -53,7 +53,7 @@ bool MovesensMan::sensorIsTriggeredByClickOnWall(int16 mapX, int16 mapY, uint16
Thing squareFirstThing;
Thing thingBeingProcessed = squareFirstThing = dunMan.getSquareFirstThing(mapX, mapY);
ThingType thingType;
- while (thingBeingProcessed != Thing::_thingEndOfList) {
+ while (thingBeingProcessed != Thing::_endOfList) {
thingType = thingBeingProcessed.getType();
if (thingType == kSensorThingType) {
sensorCountToProcessPerCell[thingBeingProcessed.getCell()]++;
@@ -64,7 +64,7 @@ bool MovesensMan::sensorIsTriggeredByClickOnWall(int16 mapX, int16 mapY, uint16
}
Thing lastProcessedThing = thingBeingProcessed = squareFirstThing;
- while (thingBeingProcessed != Thing::_thingEndOfList) {
+ while (thingBeingProcessed != Thing::_endOfList) {
thingType = thingBeingProcessed.getType();
if (thingType == kSensorThingType) {
cell = thingBeingProcessed.getCell();
@@ -101,7 +101,7 @@ bool MovesensMan::sensorIsTriggeredByClickOnWall(int16 mapX, int16 mapY, uint16
if (lastProcessedThing == thingBeingProcessed)
break;
((Sensor*)dunMan.getThingData(lastProcessedThing))->setNextThing(sensor->getNextThing());
- sensor->setNextThing(Thing::_thingNone);
+ sensor->setNextThing(Thing::_none);
thingBeingProcessed = lastProcessedThing;
}
if (!doNotTriggerSensor && (sensorType == kSensorWallOrnClickWithSpecObjRemovedRotateSensors)) {
@@ -125,7 +125,7 @@ bool MovesensMan::sensorIsTriggeredByClickOnWall(int16 mapX, int16 mapY, uint16
warning("MISSING CODE: F0273_SENSOR_GetObjectOfTypeInCell");
warning(("MISSING CODE: F0298_CHAMPION_GetObjectRemovedFromLeaderHand"));
warning("MISSING CODE: F0163_DUNGEON_LinkThingToList");
- leaderHandObject = Thing::_thingNone;
+ leaderHandObject = Thing::_none;
}
warning("MISSING CODE: F0270_SENSOR_TriggerLocalEffect");
if ((sensorEffect == kSensorEffHold) && !champMan._leaderEmptyHanded) {
@@ -138,7 +138,7 @@ bool MovesensMan::sensorIsTriggeredByClickOnWall(int16 mapX, int16 mapY, uint16
if (sensorCountToProcessPerCell[cell])
goto T0275058_ProceedToNextThing;
Thing thingOnSquare = dunMan.getSquareFirstThing(mapX, mapY);
- if ((objMan.getObjectType(leaderHandObject) != sensorData) || (thingOnSquare == Thing::_thingNone))
+ if ((objMan.getObjectType(leaderHandObject) != sensorData) || (thingOnSquare == Thing::_none))
goto T0275058_ProceedToNextThing;
warning("MISSING CODE: F0164_DUNGEON_UnlinkThingFromList");
warning("MISSING CODE: F0298_CHAMPION_GetObjectRemovedFromLeaderHand");
@@ -169,12 +169,12 @@ bool MovesensMan::sensorIsTriggeredByClickOnWall(int16 mapX, int16 mapY, uint16
(sensorType == kSensorWallOrnClickWithSpecObjRemovedRotateSensors) ||
(sensorType == kSensorWallOrnClickWithSpecObjRemovedSensor))) {
- *((Thing*)dunMan.getThingData(leaderHandObject)) = Thing::_thingNone;
+ *((Thing*)dunMan.getThingData(leaderHandObject)) = Thing::_none;
warning("MISSING CODE: F0298_CHAMPION_GetObjectRemovedFromLeaderHand");
- leaderHandObject = Thing::_thingNone;
+ leaderHandObject = Thing::_none;
} else {
warning("MISSING CODE: (leaderHandObject = F0167_DUNGEON_GetObjectForProjectileLauncherOrObjectGenerator(sensorData)");
- if (champMan._leaderEmptyHanded && (sensorType == kSensorWallObjGeneratorRotateSensors) && (leaderHandObject != Thing::_thingNone)) {
+ if (champMan._leaderEmptyHanded && (sensorType == kSensorWallObjGeneratorRotateSensors) && (leaderHandObject != Thing::_none)) {
warning("MISSING CODE: F0297_CHAMPION_PutObjectInLeaderHand");
}
}
diff --git a/engines/dm/objectman.cpp b/engines/dm/objectman.cpp
index aed1c13a1d..458f3fd2b3 100644
--- a/engines/dm/objectman.cpp
+++ b/engines/dm/objectman.cpp
@@ -122,7 +122,7 @@ void ObjectMan::loadObjectNames() {
}
IconIndice ObjectMan::getObjectType(Thing thing) {
- if (thing == Thing::_thingNone)
+ if (thing == Thing::_none)
return kIconIndiceNone;
int16 objectInfoIndex = _vm->_dungeonMan->getObjectInfoIndex(thing);