From 94f1c71c08ce060bee1869552f6b219ad83fa477 Mon Sep 17 00:00:00 2001 From: Strangerke Date: Sat, 17 Sep 2016 15:13:20 +0200 Subject: DM: Some renaming in group --- engines/dm/dm.cpp | 6 ++--- engines/dm/gfx.cpp | 2 +- engines/dm/group.cpp | 48 ++++++++++++++++++------------------ engines/dm/group.h | 65 +++++++++++++++++++++++++------------------------ engines/dm/movesens.cpp | 61 +++++++++++++++++++++++----------------------- engines/dm/movesens.h | 4 +-- engines/dm/projexpl.cpp | 4 +-- engines/dm/timeline.cpp | 2 +- 8 files changed, 97 insertions(+), 95 deletions(-) (limited to 'engines/dm') diff --git a/engines/dm/dm.cpp b/engines/dm/dm.cpp index 32ee941b93..0079850df4 100644 --- a/engines/dm/dm.cpp +++ b/engines/dm/dm.cpp @@ -940,7 +940,7 @@ void DMEngine::fuseSequence() { fuseSequenceUpdate(); } _sound->requestPlay(k17_soundBUZZ, lordChaosMapX, lordChaosMapY, kDMSoundModePlayIfPrioritized); - lordGroup->_type = k25_CreatureTypeLordOrder; + lordGroup->_type = kDMCreatureTypeLordOrder; fuseSequenceUpdate(); for (int16 attackId = 55; attackId <= 255; attackId += 40) { _projexpl->createExplosion(Thing::_explHarmNonMaterial, attackId, lordChaosMapX, lordChaosMapY, k255_CreatureTypeSingleCenteredCreature); @@ -949,7 +949,7 @@ void DMEngine::fuseSequence() { for (int16 cycleCount = 3; cycleCount > 0; cycleCount--) { for (int16 switchCount = 4; switchCount > 0; switchCount--) { _sound->requestPlay(k17_soundBUZZ, lordChaosMapX, lordChaosMapY, kDMSoundModePlayIfPrioritized); - lordGroup->_type = (switchCount & 0x0001) ? k25_CreatureTypeLordOrder : k23_CreatureTypeLordChaos; + lordGroup->_type = (switchCount & 0x0001) ? kDMCreatureTypeLordOrder : kDMCreatureTypeLordChaos; for (int16 fuseSequenceUpdateCount = cycleCount - 1; fuseSequenceUpdateCount >= 0; fuseSequenceUpdateCount--) fuseSequenceUpdate(); } @@ -957,7 +957,7 @@ void DMEngine::fuseSequence() { _projexpl->createExplosion(Thing::_explFireBall, 255, lordChaosMapX, lordChaosMapY, k255_CreatureTypeSingleCenteredCreature); _projexpl->createExplosion(Thing::_explHarmNonMaterial, 255, lordChaosMapX, lordChaosMapY, k255_CreatureTypeSingleCenteredCreature); fuseSequenceUpdate(); - lordGroup->_type = k26_CreatureTypeGreyLord; + lordGroup->_type = kDMCreatureTypeGreyLord; fuseSequenceUpdate(); _displayMan->_doNotDrawFluxcagesDuringEndgame = true; fuseSequenceUpdate(); diff --git a/engines/dm/gfx.cpp b/engines/dm/gfx.cpp index 3ae5638b4b..974e949df3 100644 --- a/engines/dm/gfx.cpp +++ b/engines/dm/gfx.cpp @@ -3336,7 +3336,7 @@ T0115015_DrawProjectileAsObject: } } else goto T0115129_DrawProjectiles; - } else if (creatureSize != k0_MaskCreatureSizeQuarter) + } else if (creatureSize != kDMCreatureSizeQuarter) goto T0115129_DrawProjectiles; creatureAspectInt = activeGroup->_aspect[creatureIndexGreen]; diff --git a/engines/dm/group.cpp b/engines/dm/group.cpp index 39b54e1f3b..ab5883d492 100644 --- a/engines/dm/group.cpp +++ b/engines/dm/group.cpp @@ -230,32 +230,32 @@ void GroupMan::dropCreatureFixedPossessions(uint16 creatureType, int16 mapX, int uint16 *fixedPossessions; bool cursedPossessions = false; switch (creatureType) { - case k4_CreatureTypePainRatHellHound: + case kDMCreatureTypePainRat: fixedPossessions = fixedPossessionCreature4PainRatHellHound; break; - case k6_CreatureTypeScreamer: + case kDMCreatureTypeScreamer: fixedPossessions = fixedPossessionCreature6screamer; break; - case k7_CreatureTypeRockpile: + case kDMCreatureTypeRockpile: fixedPossessions = fixedPossessionCreature7rockRockPile; break; - case k9_CreatureTypeStoneGolem: + case kDMCreatureTypeStoneGolem: fixedPossessions = fixedPossessionCreature9StoneGolem; break; - case k12_CreatureTypeSkeleton: + case kDMCreatureTypeSkeleton: fixedPossessions = fixedPossessionCreature12Skeleton; break; - case k16_CreatureTypeTrolinAntman: + case kDMCreatureTypeAntman: fixedPossessions = fixedPossessionCreatur16TrolinAntman; break; - case k15_CreatureTypeMagnetaWormWorm: + case kCreatureTypeMagentaWorm: fixedPossessions = fixedPossessionCreature15MagnetaWormWorm; break; - case k18_CreatureTypeAnimatedArmourDethKnight: + case kDMCreatureTypeAnimatedArmour: cursedPossessions = true; fixedPossessions = fixedPossessionCreature18AnimatedArmourDethKnight; break; - case k24_CreatureTypeRedDragon: + case kDMCreatureTypeRedDragon: fixedPossessions = fixedPossessionCreature24RedDragon; break; default: @@ -468,7 +468,7 @@ int16 GroupMan::groupGetDamageCreatureOutcome(Group *group, uint16 creatureIndex uint16 creatureSize = getFlag(creatureInfo->_attributes, k0x0003_MaskCreatureInfo_size); uint16 attack; - if (creatureSize == k0_MaskCreatureSizeQuarter) + if (creatureSize == kDMCreatureSizeQuarter) attack = 110; else if (creatureSize == k1_MaskCreatureSizeHalf) attack = 190; @@ -969,7 +969,7 @@ T0209096_SetBehavior0_Wander: AL0446_i_GroupCellsCriteria = _vm->normalizeModulo4(_vm->normalizeModulo4(activeGroup->_cells) + ((AL0446_i_GroupCellsCriteria & 0x0001) ? 1 : -1)); } /* If 1/8 chance and the creature is not adjacent to the party and is a quarter square sized creature then process projectile impacts and update the creature cell if still alive. When the creature is not in front of the party, it has 7/8 chances of dodging a projectile by moving to another cell or staying in the center of the square */ - if (!(AL0446_i_GroupCellsCriteria & 0x0038) && (distanceToVisibleParty != 1) && (creatureSize == k0_MaskCreatureSizeQuarter)) { + if (!(AL0446_i_GroupCellsCriteria & 0x0038) && (distanceToVisibleParty != 1) && (creatureSize == kDMCreatureSizeQuarter)) { if (_vm->_projexpl->projectileGetImpactCount(kDMElementTypeCreature, eventMapX, eventMapY, activeGroup->_cells) && (_vm->_projexpl->_creatureDamageOutcome == k2_outcomeKilledAllCreaturesInGroup)) /* This call to F0218_PROJECTILE_GetImpactCount works fine because there is a single creature in the group so L0445_ps_ActiveGroup->Cells contains only one cell index */ return; activeGroup->_cells = _vm->normalizeModulo4(AL0446_i_GroupCellsCriteria); @@ -985,7 +985,7 @@ T0209096_SetBehavior0_Wander: (AL0446_i_Range <= (_vm->getRandomNumber(16) + 1))) { if ((AL0446_i_Range == 1) && (!getFlag(AL0446_i_CreatureAttributes = creatureInfo._attributes, k0x0008_MaskCreatureInfo_preferBackRow) || !_vm->getRandomNumber(4) || !getFlag(AL0446_i_CreatureAttributes, k0x0010_MaskCreatureInfo_attackAnyChamp)) && - (creatureSize == k0_MaskCreatureSizeQuarter) && + (creatureSize == kDMCreatureSizeQuarter) && (activeGroup->_cells != k255_CreatureTypeSingleCenteredCreature) && ((AL0446_i_Cell = getCreatureValue(activeGroup->_cells, AL0447_i_CreatureIndex)) != primaryDirectionToOrFromParty) && (AL0446_i_Cell != _vm->turnDirRight(primaryDirectionToOrFromParty))) { /* If the creature cannot cast spells (range = 1) and is not on a cell where it can attack the party directly and is a quarter square sized creature not in the center of the square then the creature moves to another cell and attack does not occur immediately */ @@ -1274,7 +1274,7 @@ int32 GroupMan::getCreatureAspectUpdateTime(ActiveGroup *activeGroup, int16 crea } if (isAttacking) { if (getFlag(creatureGraphicInfo, kDMCreatureMaskFlipAttack)) { - if (getFlag(aspect, k0x0080_MaskActiveGroupIsAttacking) && (creatureType == k18_CreatureTypeAnimatedArmourDethKnight)) { + if (getFlag(aspect, k0x0080_MaskActiveGroupIsAttacking) && (creatureType == kDMCreatureTypeAnimatedArmour)) { if (_vm->getRandomNumber(2)) { toggleFlag(aspect, k0x0040_MaskActiveGroupFlipBitmap); _vm->_sound->requestPlay(k16_soundCOMBAT_ATTACK_SKELETON_ANIMATED_ARMOUR_DETH_KNIGHT, _currentGroupMapX, _currentGroupMapY, kDMSoundModePlayIfPrioritized); @@ -1291,10 +1291,10 @@ int32 GroupMan::getCreatureAspectUpdateTime(ActiveGroup *activeGroup, int16 crea setFlag(aspect, k0x0080_MaskActiveGroupIsAttacking); } else { if (getFlag(creatureGraphicInfo, kDMCreatureMaskFlipNonAttack)) { - if (creatureType == k13_CreatureTypeCouatl) { + if (creatureType == kDMCreatureTypeCouatl) { if (_vm->getRandomNumber(2)) { toggleFlag(aspect, k0x0040_MaskActiveGroupFlipBitmap); - uint16 soundIndex = _vm->_moveSens->getSound(k13_CreatureTypeCouatl); + uint16 soundIndex = _vm->_moveSens->getSound(kDMCreatureTypeCouatl); if (soundIndex <= k34_D13_soundCount) _vm->_sound->requestPlay(soundIndex, _currentGroupMapX, _currentGroupMapY, kDMSoundModePlayIfPrioritized); } @@ -1432,8 +1432,8 @@ bool GroupMan::isCreatureAttacking(Group *group, int16 mapX, int16 mapY, uint16 Thing projectileThing = Thing::_none; switch (creatureType) { - case k14_CreatureTypeVexirk: - case k23_CreatureTypeLordChaos: + case kDMCreatureTypeVexirk: + case kDMCreatureTypeLordChaos: if (_vm->getRandomNumber(2)) { projectileThing = Thing::_explFireBall; } else { @@ -1452,23 +1452,23 @@ bool GroupMan::isCreatureAttacking(Group *group, int16 mapX, int16 mapY, uint16 } } break; - case k1_CreatureTypeSwampSlimeSlime: + case kDMCreatureTypeSwampSlime: projectileThing = Thing::_explSlime; break; - case k3_CreatureTypeWizardEyeFlyingEye: + case kDMCreatureTypeWizardEye: if (_vm->getRandomNumber(8)) { projectileThing = Thing::_explLightningBolt; } else { projectileThing = Thing::_explOpenDoor; } break; - case k19_CreatureTypeMaterializerZytaz: + case kDMCreatureTypeMaterializerZytaz: if (_vm->getRandomNumber(2)) { projectileThing = Thing::_explPoisonCloud; break; } - case k22_CreatureTypeDemon: - case k24_CreatureTypeRedDragon: + case kDMCreatureTypeDemon: + case kDMCreatureTypeRedDragon: projectileThing = Thing::_explFireBall; } /* BUG0_13 The game may crash when 'Lord Order' or 'Grey Lord' cast spells. This cannot happen with the original dungeons as they do not contain any groups of these types. 'Lord Order' and 'Grey Lord' creatures can cast spells (attack range > 1) but no projectile type is defined for them in the code. If these creatures are present in a dungeon they will cast projectiles containing undefined things because the variable is not initialized */ int16 kineticEnergy = (creatureInfo->_attack >> 2) + 1; @@ -1492,7 +1492,7 @@ bool GroupMan::isCreatureAttacking(Group *group, int16 mapX, int16 mapY, uint16 return false; } - if (creatureType == k2_CreatureTypeGiggler) + if (creatureType == kDMCreatureTypeGiggler) stealFromChampion(group, championIndex); else { int16 damage = getChampionDamage(group, championIndex) + 1; @@ -1927,7 +1927,7 @@ uint16 GroupMan::isLordChaosOnSquare(int16 mapX, int16 mapY) { return 0; Group *group = (Group *)_vm->_dungeonMan->getThingData(thing); - if (group->_type == k23_CreatureTypeLordChaos) + if (group->_type == kDMCreatureTypeLordChaos) return thing.toUint16(); return 0; diff --git a/engines/dm/group.h b/engines/dm/group.h index ad68a03216..0b750462c4 100644 --- a/engines/dm/group.h +++ b/engines/dm/group.h @@ -35,42 +35,43 @@ namespace DM { class TimelineEvent; class CreatureInfo; - // this doesn't seem to be used anywhere at all /* Creature types */ enum CreatureType { - k0_CreatureTypeGiantScorpionScorpion = 0, // @ C00_CREATURE_GIANT_SCORPION_SCORPION - k1_CreatureTypeSwampSlimeSlime = 1, // @ C01_CREATURE_SWAMP_SLIME_SLIME_DEVIL - k2_CreatureTypeGiggler = 2, // @ C02_CREATURE_GIGGLER - k3_CreatureTypeWizardEyeFlyingEye = 3, // @ C03_CREATURE_WIZARD_EYE_FLYING_EYE - k4_CreatureTypePainRatHellHound = 4, // @ C04_CREATURE_PAIN_RAT_HELLHOUND - k5_CreatureTypeRuster = 5, // @ C05_CREATURE_RUSTER - k6_CreatureTypeScreamer = 6, // @ C06_CREATURE_SCREAMER - k7_CreatureTypeRockpile = 7, // @ C07_CREATURE_ROCK_ROCKPILE - k8_CreatureTypeGhostRive = 8, // @ C08_CREATURE_GHOST_RIVE - k9_CreatureTypeStoneGolem = 9, // @ C09_CREATURE_STONE_GOLEM - k10_CreatureTypeMummy = 10, // @ C10_CREATURE_MUMMY - k11_CreatureTypeBlackFlame = 11, // @ C11_CREATURE_BLACK_FLAME - k12_CreatureTypeSkeleton = 12, // @ C12_CREATURE_SKELETON - k13_CreatureTypeCouatl = 13, // @ C13_CREATURE_COUATL - k14_CreatureTypeVexirk = 14, // @ C14_CREATURE_VEXIRK - k15_CreatureTypeMagnetaWormWorm = 15, // @ C15_CREATURE_MAGENTA_WORM_WORM - k16_CreatureTypeTrolinAntman = 16, // @ C16_CREATURE_TROLIN_ANTMAN - k17_CreatureTypeGiantWaspMuncher = 17, // @ C17_CREATURE_GIANT_WASP_MUNCHER - k18_CreatureTypeAnimatedArmourDethKnight = 18, // @ C18_CREATURE_ANIMATED_ARMOUR_DETH_KNIGHT - k19_CreatureTypeMaterializerZytaz = 19, // @ C19_CREATURE_MATERIALIZER_ZYTAZ - k20_CreatureTypeWaterElemental = 20, // @ C20_CREATURE_WATER_ELEMENTAL - k21_CreatureTypeOitu = 21, // @ C21_CREATURE_OITU - k22_CreatureTypeDemon = 22, // @ C22_CREATURE_DEMON - k23_CreatureTypeLordChaos = 23, // @ C23_CREATURE_LORD_CHAOS - k24_CreatureTypeRedDragon = 24, // @ C24_CREATURE_RED_DRAGON - k25_CreatureTypeLordOrder = 25, // @ C25_CREATURE_LORD_ORDER - k26_CreatureTypeGreyLord = 26, // @ C26_CREATURE_GREY_LORD - k255_CreatureTypeSingleCenteredCreature = 255 // @ C255_SINGLE_CENTERED_CREATURE + kDMCreatureTypeGiantScorpion = 0, // @ C00_CREATURE_GIANT_SCORPION_SCORPION + kDMCreatureTypeSwampSlime = 1, // @ C01_CREATURE_SWAMP_SLIME_SLIME_DEVIL + kDMCreatureTypeGiggler = 2, // @ C02_CREATURE_GIGGLER + kDMCreatureTypeWizardEye = 3, // @ C03_CREATURE_WIZARD_EYE_FLYING_EYE + kDMCreatureTypePainRat = 4, // @ C04_CREATURE_PAIN_RAT_HELLHOUND + kDMCreatureTypeRuster = 5, // @ C05_CREATURE_RUSTER + kDMCreatureTypeScreamer = 6, // @ C06_CREATURE_SCREAMER + kDMCreatureTypeRockpile = 7, // @ C07_CREATURE_ROCK_ROCKPILE + kDMCreatureTypeGhostRive = 8, // @ C08_CREATURE_GHOST_RIVE + kDMCreatureTypeStoneGolem = 9, // @ C09_CREATURE_STONE_GOLEM + kDMCreatureTypeMummy = 10, // @ C10_CREATURE_MUMMY + kDMCreatureTypeBlackFlame = 11, // @ C11_CREATURE_BLACK_FLAME + kDMCreatureTypeSkeleton = 12, // @ C12_CREATURE_SKELETON + kDMCreatureTypeCouatl = 13, // @ C13_CREATURE_COUATL + kDMCreatureTypeVexirk = 14, // @ C14_CREATURE_VEXIRK + kCreatureTypeMagentaWorm = 15, // @ C15_CREATURE_MAGENTA_WORM_WORM + kDMCreatureTypeAntman = 16, // @ C16_CREATURE_TROLIN_ANTMAN + kDMCreatureTypeGiantWasp = 17, // @ C17_CREATURE_GIANT_WASP_MUNCHER + kDMCreatureTypeAnimatedArmour = 18, // @ C18_CREATURE_ANIMATED_ARMOUR_DETH_KNIGHT + kDMCreatureTypeMaterializerZytaz = 19, // @ C19_CREATURE_MATERIALIZER_ZYTAZ + kDMCreatureTypeWaterElemental = 20, // @ C20_CREATURE_WATER_ELEMENTAL + kDMCreatureTypeOitu = 21, // @ C21_CREATURE_OITU + kDMCreatureTypeDemon = 22, // @ C22_CREATURE_DEMON + kDMCreatureTypeLordChaos = 23, // @ C23_CREATURE_LORD_CHAOS + kDMCreatureTypeRedDragon = 24, // @ C24_CREATURE_RED_DRAGON + kDMCreatureTypeLordOrder = 25, // @ C25_CREATURE_LORD_ORDER + kDMCreatureTypeGreyLord = 26 // @ C26_CREATURE_GREY_LORD }; +#define k255_CreatureTypeSingleCenteredCreature 255 // @ C255_SINGLE_CENTERED_CREATURE -#define k0_MaskCreatureSizeQuarter 0 // @ C0_SIZE_QUARTER_SQUARE -#define k1_MaskCreatureSizeHalf 1 // @ C1_SIZE_HALF_SQUARE -#define k2_MaskCreatureSizeFull 2 // @ C2_SIZE_FULL_SQUARE +enum CreatureSize { + kDMCreatureSizeQuarter = 0, // @ C0_SIZE_QUARTER_SQUARE + k1_MaskCreatureSizeHalf = 1, // @ C1_SIZE_HALF_SQUARE + k2_MaskCreatureSizeFull = 2 // @ C2_SIZE_FULL_SQUARE +}; #define k0x0003_MaskCreatureInfo_size 0x0003 // @ MASK0x0003_SIZE #define k0x0004_MaskCreatureInfo_sideAttack 0x0004 // @ MASK0x0004_SIDE_ATTACK diff --git a/engines/dm/movesens.cpp b/engines/dm/movesens.cpp index 0e9ded4671..ee9b9e9788 100644 --- a/engines/dm/movesens.cpp +++ b/engines/dm/movesens.cpp @@ -442,7 +442,8 @@ bool MovesensMan::getMoveResult(Thing thing, int16 mapX, int16 mapY, int16 destM createEventMoveGroup(thing, destMapX, destMapY, mapIndexDestination, audibleTeleporter); return true; /* The specified group thing cannot be moved because the party or another group is on the destination square */ } - uint16 movementSoundIndex = getSound(((Group *)_vm->_dungeonMan->_thingData[kDMThingTypeGroup])[thing.getIndex()]._type); + Group *tmpGroup = (Group *)_vm->_dungeonMan->_thingData[kDMThingTypeGroup]; + uint16 movementSoundIndex = getSound((CreatureType)tmpGroup[thing.getIndex()]._type); if (movementSoundIndex < k34_D13_soundCount) _vm->_sound->requestPlay(movementSoundIndex, destMapX, destMapY, kDMSoundModePlayIfPrioritized); @@ -594,45 +595,45 @@ void MovesensMan::addEvent(byte type, byte mapX, byte mapY, Cell cell, SensorEff _vm->_timeline->addEventGetEventIndex(&newEvent); } -int16 MovesensMan::getSound(byte creatureType) { +int16 MovesensMan::getSound(CreatureType creatureType) { if (_vm->_championMan->_partyIsSleeping) return 35; switch (creatureType) { - case k3_CreatureTypeWizardEyeFlyingEye: - case k8_CreatureTypeGhostRive: - case k11_CreatureTypeBlackFlame: - case k19_CreatureTypeMaterializerZytaz: - case k23_CreatureTypeLordChaos: - case k25_CreatureTypeLordOrder: - case k26_CreatureTypeGreyLord: + case kDMCreatureTypeWizardEye: + case kDMCreatureTypeGhostRive: + case kDMCreatureTypeBlackFlame: + case kDMCreatureTypeMaterializerZytaz: + case kDMCreatureTypeLordChaos: + case kDMCreatureTypeLordOrder: + case kDMCreatureTypeGreyLord: return 35; - case k2_CreatureTypeGiggler: - case k9_CreatureTypeStoneGolem: - case k10_CreatureTypeMummy: - case k14_CreatureTypeVexirk: - case k16_CreatureTypeTrolinAntman: - case k22_CreatureTypeDemon: + case kDMCreatureTypeGiggler: + case kDMCreatureTypeStoneGolem: + case kDMCreatureTypeMummy: + case kDMCreatureTypeVexirk: + case kDMCreatureTypeAntman: + case kDMCreatureTypeDemon: return k24_soundMOVE_MUMMY_TROLIN_ANTMAN_STONE_GOLEM_GIGGLER_VEXIRK_DEMON; - case k0_CreatureTypeGiantScorpionScorpion: - case k4_CreatureTypePainRatHellHound: - case k5_CreatureTypeRuster: - case k6_CreatureTypeScreamer: - case k7_CreatureTypeRockpile: - case k15_CreatureTypeMagnetaWormWorm: - case k21_CreatureTypeOitu: + case kDMCreatureTypeGiantScorpion: + case kDMCreatureTypePainRat: + case kDMCreatureTypeRuster: + case kDMCreatureTypeScreamer: + case kDMCreatureTypeRockpile: + case kCreatureTypeMagentaWorm: + case kDMCreatureTypeOitu: return k26_soundMOVE_SCREAMER_ROCK_ROCKPILE_MAGENTA_WORM_WORM_PAIN_RAT_HELLHOUND_RUSTER_GIANT_SCORPION_SCORPION_OITU; - case k24_CreatureTypeRedDragon: + case kDMCreatureTypeRedDragon: return k32_soundMOVE_RED_DRAGON; - case k12_CreatureTypeSkeleton: + case kDMCreatureTypeSkeleton: return k33_soundMOVE_SKELETON; - case k18_CreatureTypeAnimatedArmourDethKnight: + case kDMCreatureTypeAnimatedArmour: return k22_soundMOVE_ANIMATED_ARMOUR_DETH_KNIGHT; - case k1_CreatureTypeSwampSlimeSlime: - case k20_CreatureTypeWaterElemental: + case kDMCreatureTypeSwampSlime: + case kDMCreatureTypeWaterElemental: return k27_soundMOVE_SWAMP_SLIME_SLIME_DEVIL_WATER_ELEMENTAL; - case k13_CreatureTypeCouatl: - case k17_CreatureTypeGiantWaspMuncher: + case kDMCreatureTypeCouatl: + case kDMCreatureTypeGiantWasp: return k23_soundMOVE_COUATL_GIANT_WASP_MUNCHER; } @@ -658,7 +659,7 @@ int16 MovesensMan::getTeleporterRotatedGroupResult(Teleporter *teleporter, Thing int16 relativeRotation = _vm->normalizeModulo4(4 + updatedGroupDirections - groupDirections); for (int16 creatureIdx = 0; creatureIdx <= group->getCount(); creatureIdx++) { updatedGroupDirections = _vm->_groupMan->getGroupValueUpdatedWithCreatureValue(updatedGroupDirections, creatureIdx, absoluteRotation ? (uint16)rotation : _vm->normalizeModulo4(groupDirections + rotation)); - if (creatureSize == k0_MaskCreatureSizeQuarter) { + if (creatureSize == kDMCreatureSizeQuarter) { relativeRotation = absoluteRotation ? 1 : 0; if (relativeRotation) relativeRotation = rotation; diff --git a/engines/dm/movesens.h b/engines/dm/movesens.h index f82ad186a3..5d2787fc0b 100644 --- a/engines/dm/movesens.h +++ b/engines/dm/movesens.h @@ -30,7 +30,7 @@ #define DM_MOVESENS_H #include "dm/dm.h" - +#include "dm/group.h" enum SensorEffect { kDMSensorEffectNone = -1, // @ CM1_EFFECT_NONE kDMSensorEffectSet = 0, // @ C00_EFFECT_SET @@ -65,7 +65,7 @@ public: bool isLevitating(Thing thing); // @ F0264_MOVE_IsLevitating bool moveIsKilledByProjectileImpact(int16 srcMapX, int16 srcMapY, int16 destMapX, int16 destMapY, Thing thing); // @ F0266_MOVE_IsKilledByProjectileImpact void addEvent(byte type, byte mapX, byte mapY, Cell cell, SensorEffect effect, int32 time); // @ F0268_SENSOR_AddEvent - int16 getSound(byte creatureType); // @ F0514_MOVE_GetSound + int16 getSound(CreatureType creatureType); // @ F0514_MOVE_GetSound int16 getTeleporterRotatedGroupResult(Teleporter *teleporter, Thing thing, uint16 mapIndex);// @ F0262_MOVE_GetTeleporterRotatedGroupResult Thing getTeleporterRotatedProjectileThing(Teleporter *teleporter, Thing projectileThing); // @ F0263_MOVE_GetTeleporterRotatedProjectileThing void processThingAdditionOrRemoval(uint16 mapX, uint16 mapY, Thing thing, bool partySquare, bool addThing);// @ F0276_SENSOR_ProcessThingAdditionOrRemoval diff --git a/engines/dm/projexpl.cpp b/engines/dm/projexpl.cpp index b30fb72dde..74b26e7e6a 100644 --- a/engines/dm/projexpl.cpp +++ b/engines/dm/projexpl.cpp @@ -165,7 +165,7 @@ bool ProjExpl::hasProjectileImpactOccurred(int16 impactType, int16 mapXCombo, in curCreatureIndex--; uint16 curCreatureType = curGroup->_type; CreatureInfo *curCreatureInfo = &_vm->_dungeonMan->_creatureInfos[curCreatureType]; - if ((projectileAssociatedThing == Thing::_explFireBall) && (curCreatureType == k11_CreatureTypeBlackFlame)) { + if ((projectileAssociatedThing == Thing::_explFireBall) && (curCreatureType == kDMCreatureTypeBlackFlame)) { uint16 *curCreatureHealth = &curGroup->_health[curCreatureIndex]; *curCreatureHealth = MIN(1000, *curCreatureHealth + getProjectileImpactAttack(projectileThingData, projectileAssociatedThing)); goto T0217044; @@ -509,7 +509,7 @@ void ProjExpl::processEvent25(TimelineEvent *event) { break; case 0xFF83: if ((groupThing != Thing::_endOfList) && getFlag(creatureInfo->_attributes, k0x0040_MaskCreatureInfo_nonMaterial)) { - if ((creatureType == k19_CreatureTypeMaterializerZytaz) && (_vm->_dungeonMan->_currMapIndex == _vm->_dungeonMan->_partyMapIndex)) { + if ((creatureType == kDMCreatureTypeMaterializerZytaz) && (_vm->_dungeonMan->_currMapIndex == _vm->_dungeonMan->_partyMapIndex)) { int16 nonMaterialAdditionalAttack = attack >> 3; attack -= nonMaterialAdditionalAttack; nonMaterialAdditionalAttack <<= 1; diff --git a/engines/dm/timeline.cpp b/engines/dm/timeline.cpp index a922a8f331..dd9b745d3d 100644 --- a/engines/dm/timeline.cpp +++ b/engines/dm/timeline.cpp @@ -778,7 +778,7 @@ T0252001: if (!randomDirectionMoveRetried) { randomDirectionMoveRetried = true; Group *group = (Group *)_vm->_dungeonMan->getThingData(Thing(event->_Cu._slot)); - if ((group->_type == k23_CreatureTypeLordChaos) && !_vm->getRandomNumber(4)) { + if ((group->_type == kDMCreatureTypeLordChaos) && !_vm->getRandomNumber(4)) { switch (_vm->getRandomNumber(4)) { case 0: mapX--; -- cgit v1.2.3