diff options
Diffstat (limited to 'engines/dm/projexpl.cpp')
-rw-r--r-- | engines/dm/projexpl.cpp | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/engines/dm/projexpl.cpp b/engines/dm/projexpl.cpp index b30fb72dde..dc08ee7f89 100644 --- a/engines/dm/projexpl.cpp +++ b/engines/dm/projexpl.cpp @@ -163,14 +163,14 @@ bool ProjExpl::hasProjectileImpactOccurred(int16 impactType, int16 mapXCombo, in return false; curCreatureIndex--; - uint16 curCreatureType = curGroup->_type; + CreatureType 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; } - if (getFlag(curCreatureInfo->_attributes, k0x0040_MaskCreatureInfo_nonMaterial) && (projectileAssociatedThing != Thing::_explHarmNonMaterial)) + if (getFlag(curCreatureInfo->_attributes, kDMCreatureMaskNonMaterial) && (projectileAssociatedThing != Thing::_explHarmNonMaterial)) return false; attack = (uint16)((unsigned long)getProjectileImpactAttack(projectileThingData, projectileAssociatedThing) << 6) / curCreatureInfo->_defense; @@ -182,7 +182,7 @@ bool ProjExpl::hasProjectileImpactOccurred(int16 impactType, int16 mapXCombo, in _creatureDamageOutcome = outcome; if (!createExplosionOnImpact && (outcome == k0_outcomeKilledNoCreaturesInGroup) && (projectileAssociatedThingType == kDMThingTypeWeapon) - && getFlag(curCreatureInfo->_attributes, k0x0400_MaskCreatureInfo_keepThrownSharpWeapon)) { + && getFlag(curCreatureInfo->_attributes, kDMCreatureMaskKeepThrownSharpWeapon)) { Weapon *weapon = (Weapon *)_vm->_dungeonMan->getThingData(projectileAssociatedThing); WeaponType weaponType = weapon->getType(); if ((weaponType == kDMWeaponDagger) || (weaponType == kDMWeaponArrow) @@ -208,7 +208,7 @@ bool ProjExpl::hasProjectileImpactOccurred(int16 impactType, int16 mapXCombo, in } if ((projectileAssociatedThing == Thing::_explLightningBolt) && !(explosionAttack >>= 1)) goto T0217044; - createExplosion(projectileAssociatedThing, explosionAttack, mapXCombo, mapYCombo, (projectileAssociatedThing == Thing::_explPoisonCloud) ? (uint16)k255_CreatureTypeSingleCenteredCreature : cell); + createExplosion(projectileAssociatedThing, explosionAttack, mapXCombo, mapYCombo, (projectileAssociatedThing == Thing::_explPoisonCloud) ? (uint16)kDMCreatureTypeSingleCenteredCreature : cell); } else { uint16 soundIndex; if ((projectileAssociatedThing).getType() == kDMThingTypeWeapon) @@ -294,7 +294,7 @@ void ProjExpl::createExplosion(Thing explThing, uint16 attack, uint16 mapXCombo, projectileMapY >>= 8; } - if (cell == k255_CreatureTypeSingleCenteredCreature) + if (cell == kDMCreatureTypeSingleCenteredCreature) explosion->setCentered(true); else { explosion->setCentered(false); @@ -334,7 +334,7 @@ void ProjExpl::createExplosion(Thing explThing, uint16 attack, uint16 mapXCombo, CreatureInfo *creatureInfo = &_vm->_dungeonMan->_creatureInfos[creatureGroup->_type]; int16 creatureFireResistance = creatureInfo->getFireResistance(); if (creatureFireResistance != kDMImmuneToFire) { - if (getFlag(creatureInfo->_attributes, k0x0040_MaskCreatureInfo_nonMaterial)) + if (getFlag(creatureInfo->_attributes, kDMCreatureMaskNonMaterial)) attack >>= 2; if ((attack -= _vm->getRandomNumber((creatureFireResistance << 1) + 1)) > 0) @@ -480,7 +480,7 @@ void ProjExpl::processEvent25(TimelineEvent *event) { Group *group = nullptr; CreatureInfo *creatureInfo = nullptr; - uint16 creatureType = 0; + CreatureType creatureType; if (groupThing != Thing::_endOfList) { group = (Group *)_vm->_dungeonMan->getThingData(groupThing); creatureType = group->_type; @@ -508,15 +508,15 @@ 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 ((groupThing != Thing::_endOfList) && getFlag(creatureInfo->_attributes, kDMCreatureMaskNonMaterial)) { + if ((creatureType == kDMCreatureTypeMaterializerZytaz) && (_vm->_dungeonMan->_currMapIndex == _vm->_dungeonMan->_partyMapIndex)) { int16 nonMaterialAdditionalAttack = attack >> 3; attack -= nonMaterialAdditionalAttack; nonMaterialAdditionalAttack <<= 1; nonMaterialAdditionalAttack++; int16 creatureCount = group->getCount(); do { - if (getFlag(_vm->_groupMan->_activeGroups[group->getActiveGroupIndex()]._aspect[creatureCount], k0x0080_MaskActiveGroupIsAttacking)) /* Materializer / Zytaz can only be damaged while they are attacking */ + if (getFlag(_vm->_groupMan->_activeGroups[group->getActiveGroupIndex()]._aspect[creatureCount], kDMAspectMaskActiveGroupIsAttacking)) /* Materializer / Zytaz can only be damaged while they are attacking */ _vm->_groupMan->groupGetDamageCreatureOutcome(group, creatureCount, mapX, mapY, attack + _vm->getRandomNumber(nonMaterialAdditionalAttack) + _vm->getRandomNumber(4), true); } while (--creatureCount >= 0); } else |