aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStrangerke2016-09-12 22:46:38 +0200
committerStrangerke2016-09-12 22:46:38 +0200
commited9b88354313bf19f867be098b06354c4c1682b3 (patch)
treebda9d81d2e0435f391dce0f1cc3f0a4ac50c756d
parentedf6e4f2d97794adf2af246c5577d46b1055472d (diff)
downloadscummvm-rg350-ed9b88354313bf19f867be098b06354c4c1682b3.tar.gz
scummvm-rg350-ed9b88354313bf19f867be098b06354c4c1682b3.tar.bz2
scummvm-rg350-ed9b88354313bf19f867be098b06354c4c1682b3.zip
DM: more renaming in DungeonMan
-rw-r--r--engines/dm/dm.cpp2
-rw-r--r--engines/dm/dungeonman.h24
-rw-r--r--engines/dm/gfx.cpp12
-rw-r--r--engines/dm/group.cpp6
4 files changed, 23 insertions, 21 deletions
diff --git a/engines/dm/dm.cpp b/engines/dm/dm.cpp
index 2eed7b842e..1eefd01399 100644
--- a/engines/dm/dm.cpp
+++ b/engines/dm/dm.cpp
@@ -920,7 +920,7 @@ void DMEngine::fuseSequence() {
while (curThing != Thing::_endOfList) {
if (curThing.getType() == kDMThingTypeExplosion) {
Explosion *curExplosion = (Explosion*)_dungeonMan->getThingData(curThing);
- if (curExplosion->getType() == k50_ExplosionType_Fluxcage) {
+ if (curExplosion->getType() == kDMExplosionTypeFluxcage) {
_dungeonMan->unlinkThingFromList(curThing, Thing(0), fluxCageMapX, fluxcageMapY);
curExplosion->setNextThing(Thing::_none);
continue;
diff --git a/engines/dm/dungeonman.h b/engines/dm/dungeonman.h
index 471a3b8d64..985897a8bb 100644
--- a/engines/dm/dungeonman.h
+++ b/engines/dm/dungeonman.h
@@ -214,17 +214,19 @@ enum JunkType {
kDMJunkTypeZokathra = 51 // @ C51_JUNK_ZOKATHRA,
};
-#define k0_ExplosionType_Fireball 0 // @ C000_EXPLOSION_FIREBALL
-#define k1_ExplosionType_Slime 1 // @ C001_EXPLOSION_SLIME
-#define k2_ExplosionType_LightningBolt 2 // @ C002_EXPLOSION_LIGHTNING_BOLT
-#define k3_ExplosionType_HarmNonMaterial 3 // @ C003_EXPLOSION_HARM_NON_MATERIAL
-#define k4_ExplosionType_OpenDoor 4 // @ C004_EXPLOSION_OPEN_DOOR
-#define k6_ExplosionType_PoisonBolt 6 // @ C006_EXPLOSION_POISON_BOLT
-#define k7_ExplosionType_PoisonCloud 7 // @ C007_EXPLOSION_POISON_CLOUD
-#define k40_ExplosionType_Smoke 40 // @ C040_EXPLOSION_SMOKE
-#define k50_ExplosionType_Fluxcage 50 // @ C050_EXPLOSION_FLUXCAGE
-#define k100_ExplosionType_RebirthStep1 100 // @ C100_EXPLOSION_REBIRTH_STEP1
-#define k101_ExplosionType_RebirthStep2 101 // @ C101_EXPLOSION_REBIRTH_STEP2
+enum ExplosionType {
+ kDMExplosionTypeFireball = 0, // @ C000_EXPLOSION_FIREBALL
+ kDMExplosionTypeSlime = 1, // @ C001_EXPLOSION_SLIME
+ kDMExplosionTypeLightningBolt = 2, // @ C002_EXPLOSION_LIGHTNING_BOLT
+ kDMExplosionTypeHarmNonMaterial = 3, // @ C003_EXPLOSION_HARM_NON_MATERIAL
+ kDMExplosionTypeOpenDoor = 4, // @ C004_EXPLOSION_OPEN_DOOR
+ kDMExplosionTypePoisonBolt = 6, // @ C006_EXPLOSION_POISON_BOLT
+ kDMExplosionTypePoisonCloud = 7, // @ C007_EXPLOSION_POISON_CLOUD
+ kDMExplosionTypeSmoke = 40, // @ C040_EXPLOSION_SMOKE
+ kDMExplosionTypeFluxcage = 50, // @ C050_EXPLOSION_FLUXCAGE
+ kDMExplosionTypeRebirthStep1 = 100, // @ C100_EXPLOSION_REBIRTH_STEP1
+ kDMExplosionTypeRebirthStep2 = 101 // @ C101_EXPLOSION_REBIRTH_STEP2
+};
enum SquareMask {
k0x0001_WallWestRandOrnAllowed = 0x1, // @ MASK0x0001_WALL_WEST_RANDOM_ORNAMENT_ALLOWED
diff --git a/engines/dm/gfx.cpp b/engines/dm/gfx.cpp
index 2ad9a6076f..800ab41030 100644
--- a/engines/dm/gfx.cpp
+++ b/engines/dm/gfx.cpp
@@ -3633,21 +3633,21 @@ T0115171_BackFromT0115015_DrawProjectileAsObject:;
if (thingParam.getType() == kDMThingTypeExplosion) {
AL_2_cellPurpleMan = thingParam.getCell();
Explosion *explosion = (Explosion *)_vm->_dungeonMan->getThingData(thingParam);
- bool rebirthExplosion = ((uint16)(AL_4_explosionType = explosion->getType()) >= k100_ExplosionType_RebirthStep1);
+ bool rebirthExplosion = ((uint16)(AL_4_explosionType = explosion->getType()) >= kDMExplosionTypeRebirthStep1);
if (rebirthExplosion && ((AL_1_viewSquareExplosionIndex < k3_ViewSquare_D3C_Explosion) || (AL_1_viewSquareExplosionIndex > k9_ViewSquare_D1C_Explosion) || (AL_2_cellPurpleMan != cellYellowBear))) /* If explosion is rebirth and is not visible */
continue;
bool smoke = false;
- if ((AL_4_explosionType == k0_ExplosionType_Fireball) || (AL_4_explosionType == k2_ExplosionType_LightningBolt) || (AL_4_explosionType == k101_ExplosionType_RebirthStep2)) {
+ if ((AL_4_explosionType == kDMExplosionTypeFireball) || (AL_4_explosionType == kDMExplosionTypeLightningBolt) || (AL_4_explosionType == kDMExplosionTypeRebirthStep2)) {
AL_4_explosionAspectIndex = k0_ExplosionAspectFire;
} else {
- if ((AL_4_explosionType == k6_ExplosionType_PoisonBolt) || (AL_4_explosionType == k7_ExplosionType_PoisonCloud)) {
+ if ((AL_4_explosionType == kDMExplosionTypePoisonBolt) || (AL_4_explosionType == kDMExplosionTypePoisonCloud)) {
AL_4_explosionAspectIndex = k2_ExplosionAspectPoison;
} else {
- if (AL_4_explosionType == k40_ExplosionType_Smoke) {
+ if (AL_4_explosionType == kDMExplosionTypeSmoke) {
smoke = true;
AL_4_explosionAspectIndex = k3_ExplosionAspectSmoke;
} else {
- if (AL_4_explosionType == k100_ExplosionType_RebirthStep1) {
+ if (AL_4_explosionType == kDMExplosionTypeRebirthStep1) {
objectAspect = (ObjectAspect *)&_projectileAspect[_vm->ordinalToIndex(-_vm->_dungeonMan->getProjectileAspect(Thing::_explLightningBolt))];
bitmapRedBanana = getNativeBitmapOrGraphic(((ProjectileAspect *)objectAspect)->_firstNativeBitmapRelativeIndex + (k316_FirstProjectileGraphicIndice + 1));
explosionCoordinates = rebirthStep1ExplosionCoordinates[AL_1_viewSquareExplosionIndex - 3];
@@ -3659,7 +3659,7 @@ T0115171_BackFromT0115015_DrawProjectileAsObject:;
}
goto T0115200_DrawExplosion;
}
- if (AL_4_explosionType == k50_ExplosionType_Fluxcage) {
+ if (AL_4_explosionType == kDMExplosionTypeFluxcage) {
if (AL_1_viewSquareExplosionIndex >= k4_ViewSquare_D3L_Explosion) {
fluxcageExplosion = explosion;
}
diff --git a/engines/dm/group.cpp b/engines/dm/group.cpp
index 1503d48d73..5289caf301 100644
--- a/engines/dm/group.cpp
+++ b/engines/dm/group.cpp
@@ -1082,7 +1082,7 @@ bool GroupMan::isMovementPossible(CreatureInfo *creatureInfo, int16 mapX, int16
while (curThing != Thing::_endOfList) {
if ((curThing).getType() == kDMThingTypeExplosion) {
Teleporter *curTeleporter = (Teleporter *)_vm->_dungeonMan->getThingData(curThing);
- if (((Explosion *)curTeleporter)->setType(k50_ExplosionType_Fluxcage)) {
+ if (((Explosion *)curTeleporter)->setType(kDMExplosionTypeFluxcage)) {
_fluxCages[dir] = true;
_fluxCageCount++;
_groupMovBlockedByWallStairsPitFakeWalFluxCageTeleporter = true;
@@ -1885,7 +1885,7 @@ void GroupMan::fluxCageAction(int16 mapX, int16 mapY) {
return;
_vm->_dungeonMan->linkThingToList(unusedThing, Thing(0), mapX, mapY);
- (((Explosion *)_vm->_dungeonMan->_thingData[kDMThingTypeExplosion])[unusedThing.getIndex()]).setType(k50_ExplosionType_Fluxcage);
+ (((Explosion *)_vm->_dungeonMan->_thingData[kDMThingTypeExplosion])[unusedThing.getIndex()]).setType(kDMExplosionTypeFluxcage);
TimelineEvent newEvent;
_vm->setMapAndTime(newEvent._mapTime, _vm->_dungeonMan->_currMapIndex, _vm->_gameTime + 100);
newEvent._type = k24_TMEventTypeRemoveFluxcage;
@@ -1938,7 +1938,7 @@ bool GroupMan::isFluxcageOnSquare(int16 mapX, int16 mapY) {
Thing thing = _vm->_dungeonMan->getSquareFirstThing(mapX, mapY);
while (thing != Thing::_endOfList) {
- if ((thing.getType() == kDMThingTypeExplosion) && (((Explosion *)_vm->_dungeonMan->_thingData[kDMThingTypeExplosion])[thing.getIndex()].getType() == k50_ExplosionType_Fluxcage))
+ if ((thing.getType() == kDMThingTypeExplosion) && (((Explosion *)_vm->_dungeonMan->_thingData[kDMThingTypeExplosion])[thing.getIndex()].getType() == kDMExplosionTypeFluxcage))
return true;
thing = _vm->_dungeonMan->getNextThing(thing);