SAGA2: Rename more constants in idtypes.h

This commit is contained in:
a/ 2021-06-18 16:33:09 +09:00 committed by Eugene Sandulenko
parent 500a6ba468
commit 2ac1b6f55d
No known key found for this signature in database
GPG key ID: 014D387312D34F08
15 changed files with 128 additions and 128 deletions

View file

@ -419,9 +419,9 @@ bool ActorProto::acceptDamageAction(
return acceptHealing(dObj, enactor, -damage);
// Apply applicable armor adjustments
if (dType == damageImpact
|| dType == damageSlash
|| dType == damageProjectile) {
if (dType == kDamageImpact
|| dType == kDamageSlash
|| dType == kDamageProjectile) {
ArmorAttributes armorAttribs;
a->totalArmorAttributes(armorAttribs);

View file

@ -50,23 +50,23 @@ extern void updateIndicators(void); // Kludge, put in intrface.h later (go
int16 ProtoDamage::getRelevantStat(effectDamageTypes dt, Actor *a) {
switch (dt) {
case damageImpact :
case damageSlash :
case damageProjectile :
case kDamageImpact :
case kDamageSlash :
case kDamageProjectile :
return a->getStats()->getSkillLevel(skillIDBrawn);
case damageFire :
case damageAcid :
case damageHeat :
case damageCold :
case damageLightning :
case damagePoison :
case damageMental :
case damageToUndead :
case kDamageFire :
case kDamageAcid :
case kDamageHeat :
case kDamageCold :
case kDamageLightning :
case kDamagePoison :
case kDamageMental :
case kDamageToUndead :
return a->getStats()->getSkillLevel(skillIDSpellcraft);
case damageDirMagic :
case damageOther :
case damageStarve :
case damageEnergy :
case kDamageDirMagic :
case kDamageOther :
case kDamageStarve :
case kDamageEnergy :
return 0;
}
return 0;
@ -148,11 +148,11 @@ void ProtoDrainage::drainLevel(GameObject *cst, Actor *a, effectDrainsTypes edt,
{
int16 &maxVit = (a->getBaseStats())->vitality;
maxVit = clamp(0, maxVit - amt, absoluteMaximumVitality);
a->acceptDamage(cst->thisID(), amt > 0 ? 1 : -1, damageOther);
a->acceptDamage(cst->thisID(), amt > 0 ? 1 : -1, kDamageOther);
}
break;
case drainsVitality:
a->acceptDamage(cst->thisID(), amt, damageOther);
a->acceptDamage(cst->thisID(), amt, kDamageOther);
break;
default:
break;
@ -437,7 +437,7 @@ SPECIALSPELL(DeathSpell) {
if (!a->makeSavingThrow()) {
a->acceptDamage(cst->thisID(),
a->effectiveStats.vitality,
damageEnergy, 1, 2, 0);
kDamageEnergy, 1, 2, 0);
a->die();
}
}

View file

@ -83,26 +83,26 @@ enum effectTypes {
//
enum effectResistTypes {
resistOther = damageOther,
resistOther = kDamageOther,
// Combat resist
resistImpact = damageImpact,
resistSlash = damageSlash,
resistProjectile = damageProjectile,
resistImpact = kDamageImpact,
resistSlash = kDamageSlash,
resistProjectile = kDamageProjectile,
// Magic resist
resistFire = damageFire,
resistAcid = damageAcid,
resistHeat = damageHeat,
resistCold = damageCold,
resistLightning = damageLightning,
resistPoison = damagePoison,
resistFire = kDamageFire,
resistAcid = kDamageAcid,
resistHeat = kDamageHeat,
resistCold = kDamageCold,
resistLightning = kDamageLightning,
resistPoison = kDamagePoison,
// Other magic resist
resistMental = damageMental,
resistToUndead = damageToUndead,
resistDirMagic = damageDirMagic,
resistMental = kDamageMental,
resistToUndead = kDamageToUndead,
resistDirMagic = kDamageDirMagic,
// Physiological Damage
resistStarve = damageStarve,
resistStarve = kDamageStarve,
// other
resistEnergy = damageEnergy,
resistEnergy = kDamageEnergy,
};
//
@ -339,7 +339,7 @@ inline bool isSaveable(uint16 enchID) {
// Determine whether a damage type is magical
inline bool isMagicDamage(effectDamageTypes t) {
return t >= damageFire && t <= damageDirMagic;
return t >= kDamageFire && t <= kDamageDirMagic;
}
#define Forever (255)

View file

@ -241,26 +241,26 @@ enum {
//
enum effectDamageTypes {
// Generic
damageOther = 0, // Healing, cause wounds
kDamageOther = 0, // Healing, cause wounds
// Combat damage
damageImpact = 1, // hammers, maces
damageSlash = 2, // swords
damageProjectile = 3, // arrows, poin-ted sticks
kDamageImpact = 1, // hammers, maces
kDamageSlash = 2, // swords
kDamageProjectile = 3, // arrows, poin-ted sticks
// Magic damage
damageFire = 4, // Yellow
damageAcid = 5, // Violet
damageHeat = 6, // Red
damageCold = 7, // Blue
damageLightning = 8, // Orange
damagePoison = 9, // Green
kDamageFire = 4, // Yellow
kDamageAcid = 5, // Violet
kDamageHeat = 6, // Red
kDamageCold = 7, // Blue
kDamageLightning = 8, // Orange
kDamagePoison = 9, // Green
// Other magic damage
damageMental = 10, // dain bramage
damageToUndead = 11, // undead take this damage
damageDirMagic = 12, // the plusses on swords etc.
kDamageMental = 10, // dain bramage
kDamageToUndead = 11, // undead take this damage
kDamageDirMagic = 12, // the plusses on swords etc.
// Physiological Damage
damageStarve = 13, // You must eat!
kDamageStarve = 13, // You must eat!
// other
damageEnergy = 14 // Generally hard to resist - god damage
kDamageEnergy = 14 // Generally hard to resist - god damage
};
// Tile metrics
@ -336,10 +336,10 @@ enum {
// Maximum height that a character can climb w/o steps or ladders
enum {
maxStepHeight = 16, // highest climbable step
maxPickHeight = 64, // highest pickable step
maxSmoothStep = 8, // highest smoothly climbable
maxJumpStep = 64 // highest jump character likes
kMaxStepHeight = 16, // highest climbable step
kMaxPickHeight = 64, // highest pickable step
kMaxSmoothStep = 8, // highest smoothly climbable
kMaxJumpStep = 64 // highest jump character likes
};
} // end of namespace Saga2

View file

@ -2893,37 +2893,37 @@ void gEnchantmentDisplay::setValue(PlayerActorID pID) {
case effectResist:
switch (eSubType) {
case damageImpact:
case kDamageImpact:
newIconFlags[iconResistImpact] = duration;
break;
case damageSlash:
case kDamageSlash:
newIconFlags[iconResistSlash] = duration;
break;
case damageProjectile:
case kDamageProjectile:
newIconFlags[iconResistProjectile] = duration;
break;
case damageFire:
case kDamageFire:
newIconFlags[iconResistFire] = duration;
break;
case damageAcid:
case kDamageAcid:
newIconFlags[iconResistAcid] = duration;
break;
case damageHeat:
case kDamageHeat:
newIconFlags[iconResistHeat] = duration;
break;
case damageCold:
case kDamageCold:
newIconFlags[iconResistCold] = duration;
break;
case damageLightning:
case kDamageLightning:
newIconFlags[iconResistLightning] = duration;
break;
case damagePoison:
case kDamagePoison:
newIconFlags[iconResistPoison] = duration;
break;
case damageMental:
case kDamageMental:
newIconFlags[iconResistPsionic] = duration;
break;
case damageDirMagic:
case kDamageDirMagic:
newIconFlags[iconResistDirectMagic] = duration;
break;
}
@ -2931,31 +2931,31 @@ void gEnchantmentDisplay::setValue(PlayerActorID pID) {
case effectImmune:
switch (eSubType) {
case damageImpact:
case kDamageImpact:
newIconFlags[iconIronskin] = duration;
break;
case damageSlash:
case kDamageSlash:
newIconFlags[iconIronskin] = duration;
break;
case damageFire:
case kDamageFire:
newIconFlags[iconImmuneFire] = duration;
break;
case damageAcid:
case kDamageAcid:
newIconFlags[iconImmuneAcid] = duration;
break;
case damageHeat:
case kDamageHeat:
newIconFlags[iconImmuneHeat] = duration;
break;
case damageCold:
case kDamageCold:
newIconFlags[iconImmuneCold] = duration;
break;
case damageLightning:
case kDamageLightning:
newIconFlags[iconImmuneLightning] = duration;
break;
case damagePoison:
case kDamagePoison:
newIconFlags[iconImmunePoison] = duration;
break;
case damageMental:
case kDamageMental:
newIconFlags[iconImmunePsionic] = duration;
break;
}

View file

@ -268,8 +268,8 @@ bool unstickObject(GameObject *obj) {
// If the surface height is too far away from the sample
// height, then ignore it.
if (tHeight > pos.z + maxStepHeight
|| tHeight < pos.z - maxStepHeight * 4) continue;
if (tHeight > pos.z + kMaxStepHeight
|| tHeight < pos.z - kMaxStepHeight * 4) continue;
// Recompute the coordinate
dz = tHeight - objZ;
@ -324,8 +324,8 @@ bool unstickObject(GameObject *obj) {
int16 tHeight;
tHeight = tileSlopeHeight(pos, obj);
if (tHeight <= pos.z + maxStepHeight
&& tHeight >= pos.z - maxStepHeight * 4) {
if (tHeight <= pos.z + kMaxStepHeight
&& tHeight >= pos.z - kMaxStepHeight * 4) {
pos.z = tHeight;
obj->move(pos);
return true;
@ -2466,7 +2466,7 @@ bool MotionTask::nextWayPoint(void) {
// use dumb pathfinding until the pathfinder finishes it's task.
if ((finalTarget - object->location).quickHDistance() > 0
|| abs(finalTarget.z - object->location.z) > maxStepHeight) {
|| abs(finalTarget.z - object->location.z) > kMaxStepHeight) {
// If no pathfind in progress
if ((flags & pathFind)
&& !(flags & finalPath)
@ -2621,7 +2621,7 @@ void MotionTask::walkAction(void) {
// If we're not already there, then proceed towards
// the target.
if (targetDist > 0 || abs(targetVector.z) > maxStepHeight)
if (targetDist > 0 || abs(targetVector.z) > kMaxStepHeight)
break;
}
@ -2681,7 +2681,7 @@ void MotionTask::walkAction(void) {
if (moveTaskDone || moveTaskWaiting) {
movementDirection = a->currentFacing;
} else if (targetDist == 0 && abs(targetVector.z) > maxStepHeight) {
} else if (targetDist == 0 && abs(targetVector.z) > kMaxStepHeight) {
if (pathFindTask)
moveTaskWaiting = true;
else {
@ -2712,7 +2712,7 @@ void MotionTask::walkAction(void) {
// Test the terrain to see if we can go there.
if ((blockageType = checkWalkable(object, newPos)) != false) {
// Try stepping up to a higher terrain too.
newPos.z = object->location.z + maxStepHeight;
newPos.z = object->location.z + kMaxStepHeight;
if (checkWalkable(object, newPos) != blockageNone) {
// If there is a path find task pending, put the walk action
// on hold until it finishes, else, abort the walk action.
@ -2749,7 +2749,7 @@ void MotionTask::walkAction(void) {
// Check the terrain in various directions.
// Check in the forward direction first, at various heights
for (height = 0; height <= maxStepHeight; height += maxSmoothStep) {
for (height = 0; height <= kMaxStepHeight; height += kMaxSmoothStep) {
// This code has him move along the exact direction
// vector, even if it's not aligned with one of the
// cardinal directions.
@ -2771,7 +2771,7 @@ void MotionTask::walkAction(void) {
int16 leftDir = spinLeft(movementDirection),
rightDir = spinRight(movementDirection);
for (height = 0; height <= maxStepHeight; height += 8) {
for (height = 0; height <= kMaxStepHeight; height += 8) {
if (checkWalk(rightDir, speedScale, height, newPos)) {
movementDirection = rightDir;
foundPath = true;
@ -2887,7 +2887,7 @@ void MotionTask::walkAction(void) {
// This is a kludge to keep the character from
// "jumping" as he climbs up a small step.
if (tHeight >= object->location.z - maxSmoothStep
if (tHeight >= object->location.z - kMaxSmoothStep
* ((sti.surfaceTile != NULL
&& (sti.surfaceTile->combinedTerrainMask() & terrainStair))
? 4
@ -4719,7 +4719,7 @@ supported:
if (motionType != motionTypeWalk
|| tHeight <= newPos.z
|| !(flags & inWater)) {
if (tHeight > newPos.z + maxStepHeight) {
if (tHeight > newPos.z + kMaxStepHeight) {
unstickObject(object);
tHeight = tileSlopeHeight(newPos, object, &sti);
}
@ -4791,7 +4791,7 @@ falling:
tPos.u += objCrossSection;
tHeight = tileSlopeHeight(tPos, object, &sti);
if (tHeight <= tPos.z + maxStepHeight
if (tHeight <= tPos.z + kMaxStepHeight
&& tHeight >= tPos.z - gravity * 4) {
newPos = tPos;
goto supported;
@ -4799,7 +4799,7 @@ falling:
tPos.u -= objCrossSection * 2;
tHeight = tileSlopeHeight(tPos, object, &sti);
if (tHeight <= tPos.z + maxStepHeight
if (tHeight <= tPos.z + kMaxStepHeight
&& tHeight >= tPos.z - gravity * 4) {
newPos = tPos;
goto supported;
@ -4808,7 +4808,7 @@ falling:
tPos.u += objCrossSection;
tPos.v += objCrossSection;
tHeight = tileSlopeHeight(tPos, object, &sti);
if (tHeight <= tPos.z + maxStepHeight
if (tHeight <= tPos.z + kMaxStepHeight
&& tHeight >= tPos.z - gravity * 4) {
newPos = tPos;
goto supported;
@ -4816,7 +4816,7 @@ falling:
tPos.v -= objCrossSection * 2;
tHeight = tileSlopeHeight(tPos, object, &sti);
if (tHeight <= tPos.z + maxStepHeight
if (tHeight <= tPos.z + kMaxStepHeight
&& tHeight >= tPos.z - gravity * 4) {
newPos = tPos;
goto supported;
@ -4941,7 +4941,7 @@ bool checkLadder(Actor *a, const TilePoint &loc) {
}
if (loc.z
< tileSlopeHeight(a->getLocation(), a) + maxStepHeight)
< tileSlopeHeight(a->getLocation(), a) + kMaxStepHeight)
MotionTask::upLadder(*a);
else
MotionTask::downLadder(*a);

View file

@ -1442,7 +1442,7 @@ void GameObject::updateState(void) {
if (objectFlags & objectFloating) return;
if (tHeight > location.z + maxStepHeight) {
if (tHeight > location.z + kMaxStepHeight) {
unstickObject(this);
tHeight = tileSlopeHeight(location, this, &sti);
}
@ -4200,7 +4200,7 @@ GameObject *objectCollision(GameObject *obj, GameWorld *world, const TilePoint &
volume.max.z = loc.z + proto->height;
// Adjust MIN Z for the fact that they can step over obstacles.
if (isActor(obj)) volume.min.z += maxStepHeight / 2;
if (isActor(obj)) volume.min.z += kMaxStepHeight / 2;
// Constructor
CircularObjectIterator iter(world, loc, proto->crossSection + 32);

View file

@ -393,7 +393,7 @@ public:
bool acceptDamage(
ObjectID enactor,
int8 absDamage,
effectDamageTypes dType = damageOther,
effectDamageTypes dType = kDamageOther,
int8 dice = 0,
uint8 sides = 1,
int8 perDieMod = 0) {

View file

@ -2787,7 +2787,7 @@ void EnchantmentProto::doBackgroundUpdate(GameObject *obj) {
int16 damage = getEnchantmentAmount(flags);
// apply the damage
parentObj->acceptDamage(obj->thisID(), damage, damagePoison);
parentObj->acceptDamage(obj->thisID(), damage, kDamagePoison);
}
}

View file

@ -446,7 +446,7 @@ public:
ObjectID dObj,
ObjectID enactor,
int8 absDamage,
effectDamageTypes dType = damageOther,
effectDamageTypes dType = kDamageOther,
int8 dice = 0,
uint8 sides = 1,
int8 perDieMod = 0);

View file

@ -917,7 +917,7 @@ uint32 tileTerrain(
// If only checking the top of raised terrain treat it
// as if it were normal terrain.
if (minZ + maxStepHeight >= tileMaxZ) {
if (minZ + kMaxStepHeight >= tileMaxZ) {
if (tileFgdTerrain & terrainSupportingRaised)
tileFgdTerrain = terrainNormal;
if (tileBgdTerrain & terrainSupportingRaised)
@ -934,7 +934,7 @@ uint32 tileTerrain(
// catwalks and other surfaces which have no bottom.
if ((terrainResult & terrainSolidSurface)
&& height > minZ + maxStepHeight) {
&& height > minZ + kMaxStepHeight) {
terrainResult |= terrainStone;
}
@ -1594,7 +1594,7 @@ big_break:
// If the height difference is too great skip this tile
// position
if (abs(quantizedCoords.z - startingCoords.z) > maxStepHeight)
if (abs(quantizedCoords.z - startingCoords.z) > kMaxStepHeight)
continue;
// Compute initial cost based upon the distance from the
@ -1646,7 +1646,7 @@ void PathRequest::finish(void) {
if (cell->direction != dirInvalid) {
if (cell->direction != prevDir
|| abs(cell->height - prevHeight) > maxStepHeight) {
|| abs(cell->height - prevHeight) > kMaxStepHeight) {
if (res <= tempResult) break;
coords.u =
@ -1871,7 +1871,7 @@ PathResult PathRequest::findPath(void) {
&testPlatform);
// Determine if elevation change is too great
if (abs(testPt.z - prevZ) <= maxStepHeight)
if (abs(testPt.z - prevZ) <= kMaxStepHeight)
prevZ = testPt.z;
else
goto big_continue;
@ -1917,7 +1917,7 @@ PathResult PathRequest::findPath(void) {
&& trv->min.v < actorVolume.max.v
&& actorVolume.min.v < trv->max.v
&& trv->min.z < actorVolume.max.z
&& actorVolume.min.z + maxStepHeight
&& actorVolume.min.z + kMaxStepHeight
< trv->max.z)
goto big_continue;
}
@ -2002,8 +2002,8 @@ PathResult PathRequest::findPath(void) {
// (i.e. don't jmup off of cliffs). Also we can
// only climb steps below a certain height.
// if ( testPt.z < centerPt.z - maxJumpStep
// || testPt.z > centerPt.z + maxStepHeight)
// if ( testPt.z < centerPt.z - kMaxJumpStep
// || testPt.z > centerPt.z + kMaxStepHeight)
// continue;
// Turns are expensive, the sharper turns are more so.
@ -2136,7 +2136,7 @@ bool DestinationPathRequest::setCenter(
bestDist = centerCost;
// If we're at target square, then we're done!
if (dist == 0 && zDist <= maxStepHeight) {
if (dist == 0 && zDist <= kMaxStepHeight) {
flags |= PathRequest::completed;
// Return true to indicate that the path finding is done.
@ -2541,7 +2541,7 @@ TilePoint selectNearbySite(
// If the object is higher than the actor's head, or
// low enough to step over, then ignore it.
if (objLoc.z >= startingCoords.z + 80
|| objLoc.z + objProto->height <= startingCoords.z + maxStepHeight / 2) {
|| objLoc.z + objProto->height <= startingCoords.z + kMaxStepHeight / 2) {
continue;
}
@ -2665,7 +2665,7 @@ TilePoint selectNearbySite(
testPt.z = tileSlopeHeight(testPt, mapNum, 68, &sti);
// If it's too high to step, then don't continue
// if (testPt.z - qi.z > maxStepHeight) continue;
// if (testPt.z - qi.z > kMaxStepHeight) continue;
fromSubPt = centerPt;
for (i = 0; i < kTileSubSize; i++) {
int16 deltaZ;
@ -2677,7 +2677,7 @@ TilePoint selectNearbySite(
deltaZ = toSubPt.z - fromSubPt.z;
// If it's too high to step, then don't continue
if (deltaZ > maxStepHeight || deltaZ < -(maxStepHeight * 2)) {
if (deltaZ > kMaxStepHeight || deltaZ < -(kMaxStepHeight * 2)) {
traversable = false;
break;
}
@ -2877,7 +2877,7 @@ bool checkPath(
// If the height difference is too great skip this tile
// position
if (abs(quantizedCoords.z - startingCoords.z) > maxStepHeight)
if (abs(quantizedCoords.z - startingCoords.z) > kMaxStepHeight)
continue;
// Compute initial cost based upon the distance from the
@ -2971,7 +2971,7 @@ bool checkPath(
deltaZ = toSubPt.z - fromSubPt.z;
// If it's too high to step, then don't continue
if (deltaZ > maxStepHeight || deltaZ < -(maxStepHeight * 2)) {
if (deltaZ > kMaxStepHeight || deltaZ < -(kMaxStepHeight * 2)) {
traversable = false;
break;
}
@ -3004,7 +3004,7 @@ bool checkPath(
// If the resulting height is significantly different
// from the destination height, assume we're on a
// different level and return false.
return abs(testPt.z - destCoords.z) <= maxStepHeight;
return abs(testPt.z - destCoords.z) <= kMaxStepHeight;
}

View file

@ -1018,7 +1018,7 @@ GameObject *objectNollision(Effectron *obj, const TilePoint &loc) {
volume.max.z = loc.z + obj->hgtCall();
// Adjust MIN Z for the fact that they can step over obstacles.
//if ( isActor( obj )) volume.min.z += maxStepHeight / 2;
//if ( isActor( obj )) volume.min.z += kMaxStepHeight / 2;
// Constructor
CircularObjectIterator iter(obj->world(), loc, obj->brdCall() + 32);

View file

@ -4362,7 +4362,7 @@ bool BandTask::atTarget(void) {
TilePoint actorLoc = stack->getActor()->getLocation();
if ((actorLoc - currentTarget).quickHDistance() > 6
|| abs(actorLoc.z - currentTarget.z) > maxStepHeight) {
|| abs(actorLoc.z - currentTarget.z) > kMaxStepHeight) {
if (attend != NULL) {
attend->abortTask();
delete attend;
@ -4699,7 +4699,7 @@ TaskResult FollowPatrolRouteTask::handleFollowPatrolRoute(void) {
== (currentWayPoint.u >> kTileUVShift)
&& (actorLoc.v >> kTileUVShift)
== (currentWayPoint.v >> kTileUVShift)
&& abs(actorLoc.z - currentWayPoint.z) <= maxStepHeight) {
&& abs(actorLoc.z - currentWayPoint.z) <= kMaxStepHeight) {
// Delete the gotoWayPoint task
if (gotoWayPoint != NULL) {
gotoWayPoint->abortTask();

View file

@ -64,7 +64,7 @@ void lavaDamage(GameObject *obj) {
return;
}
if (g_vm->_rnd->getRandomNumber(heatDamageOddsYes + heatDamageOddsNo - 1) > heatDamageOddsNo - 1) {
obj->acceptDamage(obj->thisID(), heatDamagePerFrame, damageHeat, heatDamageDicePerFrame, 6);
obj->acceptDamage(obj->thisID(), heatDamagePerFrame, kDamageHeat, heatDamageDicePerFrame, 6);
}
}
@ -75,19 +75,19 @@ void coldDamage(GameObject *obj) {
return;
}
if (g_vm->_rnd->getRandomNumber(coldDamageOddsYes + coldDamageOddsNo - 1) > coldDamageOddsNo - 1) {
obj->acceptDamage(obj->thisID(), coldDamagePerFrame, damageCold, coldDamageDicePerFrame, 6);
obj->acceptDamage(obj->thisID(), coldDamagePerFrame, kDamageCold, coldDamageDicePerFrame, 6);
}
}
void terrainDamageSlash(GameObject *obj) {
if (g_vm->_rnd->getRandomNumber(terrainDamageOddsYes + terrainDamageOddsNo - 1) > terrainDamageOddsNo - 1) {
obj->acceptDamage(obj->thisID(), terrainDamagePerFrame, damageSlash, terrainDamageDicePerFrame, 6);
obj->acceptDamage(obj->thisID(), terrainDamagePerFrame, kDamageSlash, terrainDamageDicePerFrame, 6);
}
}
void terrainDamageBash(GameObject *obj) {
if (g_vm->_rnd->getRandomNumber(terrainDamageOddsYes + terrainDamageOddsNo - 1) > terrainDamageOddsNo - 1) {
obj->acceptDamage(obj->thisID(), terrainDamagePerFrame, damageImpact, terrainDamageDicePerFrame, 6);
obj->acceptDamage(obj->thisID(), terrainDamagePerFrame, kDamageImpact, terrainDamageDicePerFrame, 6);
}
}
@ -195,7 +195,7 @@ uint32 tileTerrain(
// catwalks and other surfaces which have no bottom.
if ((terrainResult & terrainSolidSurface)
&& height > minZ + maxStepHeight) {
&& height > minZ + kMaxStepHeight) {
terrainResult |= terrainStone;
}
@ -858,7 +858,7 @@ int16 checkWalkable(
supportHeight = tileSlopeHeight(loc, obj, &sti);
if (supportHeight < loc.z - maxStepHeight * 4)
if (supportHeight < loc.z - kMaxStepHeight * 4)
return blockageTerrain;
if (sti.surfaceTile != NULL) {

View file

@ -4161,8 +4161,8 @@ TilePoint pickTile(Point32 pos,
// down levels, only search for surfaces which could be stepped
// on by the protagonist.
mag = (coords - protagPos).quickHDistance();
zMin = protagPos.z - maxPickHeight - mag;
zMax = protagPos.z + maxPickHeight + mag;
zMin = protagPos.z - kMaxPickHeight - mag;
zMax = protagPos.z + kMaxPickHeight + mag;
// Compute the coords of the actual tile that they clicked on.
tileCoords = coords >> kTileUVShift;
@ -4184,7 +4184,7 @@ TilePoint pickTile(Point32 pos,
mt = curMap->lookupMeta(mCoords);
// While we are less than the pick altitude
while (relPos.y < zMax + kTileDX + maxStepHeight - abs(relPos.x >> 1)) {
while (relPos.y < zMax + kTileDX + kMaxStepHeight - abs(relPos.x >> 1)) {
// If there is a metatile on this spot
if (mt != nullptr) {
// Iterate through all platforms
@ -4213,7 +4213,7 @@ TilePoint pickTile(Point32 pos,
continue;
// Reject the tile if it's too high.
if (sti.surfaceHeight > zMax + maxStepHeight) continue;
if (sti.surfaceHeight > zMax + kMaxStepHeight) continue;
// Reject the tile if mouse position is below lower tile
// boundary
@ -4299,8 +4299,8 @@ TilePoint pickTile(Point32 pos,
// Compute new altitude range based upon the tile position
// relative to the protaganist's position.
zMin = protagPos.z - maxPickHeight - (coords - protagPos).quickHDistance();
zMax = protagPos.z + maxPickHeight + (coords - protagPos).quickHDistance();
zMin = protagPos.z - kMaxPickHeight - (coords - protagPos).quickHDistance();
zMax = protagPos.z + kMaxPickHeight + (coords - protagPos).quickHDistance();
}
// If no tile was found, return the default.