SAGA2: Rename abort() methods
This commit is contained in:
parent
863adf7918
commit
b8ab6203e4
8 changed files with 87 additions and 154 deletions
|
@ -1368,7 +1368,7 @@ void Actor::deleteActor(void) {
|
||||||
|
|
||||||
// Kill task
|
// Kill task
|
||||||
if (curTask != NULL) {
|
if (curTask != NULL) {
|
||||||
curTask->abort();
|
curTask->abortTask();
|
||||||
delete curTask;
|
delete curTask;
|
||||||
curTask = NULL;
|
curTask = NULL;
|
||||||
}
|
}
|
||||||
|
@ -1432,7 +1432,7 @@ void Actor::die(void) {
|
||||||
|
|
||||||
// Kill task
|
// Kill task
|
||||||
if (curTask != NULL) {
|
if (curTask != NULL) {
|
||||||
curTask->abort();
|
curTask->abortTask();
|
||||||
delete curTask;
|
delete curTask;
|
||||||
curTask = NULL;
|
curTask = NULL;
|
||||||
}
|
}
|
||||||
|
@ -1533,7 +1533,7 @@ void Actor::deactivateActor(void) {
|
||||||
#endif
|
#endif
|
||||||
// Kill task
|
// Kill task
|
||||||
if (curTask != NULL) {
|
if (curTask != NULL) {
|
||||||
curTask->abort();
|
curTask->abortTask();
|
||||||
delete curTask;
|
delete curTask;
|
||||||
curTask = NULL;
|
curTask = NULL;
|
||||||
}
|
}
|
||||||
|
@ -1588,7 +1588,7 @@ void Actor::lobotomize(void) {
|
||||||
|
|
||||||
// Kill task
|
// Kill task
|
||||||
if (curTask != NULL) {
|
if (curTask != NULL) {
|
||||||
curTask->abort();
|
curTask->abortTask();
|
||||||
delete curTask;
|
delete curTask;
|
||||||
curTask = NULL;
|
curTask = NULL;
|
||||||
}
|
}
|
||||||
|
@ -2275,7 +2275,7 @@ bool Actor::SetAvailableAction(int16 flags, ...) {
|
||||||
void Actor::setGoal(uint8 newGoal) {
|
void Actor::setGoal(uint8 newGoal) {
|
||||||
if (currentGoal != newGoal) {
|
if (currentGoal != newGoal) {
|
||||||
if (curTask != NULL) {
|
if (curTask != NULL) {
|
||||||
curTask->abort();
|
curTask->abortTask();
|
||||||
delete curTask;
|
delete curTask;
|
||||||
curTask = NULL;
|
curTask = NULL;
|
||||||
}
|
}
|
||||||
|
|
|
@ -33,14 +33,6 @@
|
||||||
|
|
||||||
namespace Saga2 {
|
namespace Saga2 {
|
||||||
|
|
||||||
#ifdef _WIN32 // Set structure alignment packing value to 1 byte
|
|
||||||
#pragma pack( push, 1 )
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/* ===================================================================== *
|
|
||||||
Constants
|
|
||||||
* ===================================================================== */
|
|
||||||
|
|
||||||
class ActorAssignment;
|
class ActorAssignment;
|
||||||
class Band;
|
class Band;
|
||||||
class MotionTask;
|
class MotionTask;
|
||||||
|
@ -138,15 +130,15 @@ struct ActorAttributes {
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
uint8 allSkills[ numSkills ]; // number of skills
|
uint8 allSkills[numSkills]; // number of skills
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
// Pad byte for alignment
|
// Pad byte for alignment
|
||||||
int8 pad;
|
int8 pad;
|
||||||
|
|
||||||
// Hit-points
|
// Hit-points
|
||||||
int16 vitality;
|
int16 vitality;
|
||||||
|
|
||||||
// Magic energy
|
// Magic energy
|
||||||
union {
|
union {
|
||||||
|
@ -159,14 +151,14 @@ struct ActorAttributes {
|
||||||
violetMana;
|
violetMana;
|
||||||
};
|
};
|
||||||
|
|
||||||
int16 allManas[ numManas ];
|
int16 allManas[numManas];
|
||||||
};
|
};
|
||||||
|
|
||||||
uint8 &skill(int16 id) {
|
uint8 &skill(int16 id) {
|
||||||
return allSkills[ id ];
|
return allSkills[id];
|
||||||
}
|
}
|
||||||
int16 &mana(int16 id) {
|
int16 &mana(int16 id) {
|
||||||
return allManas[ id ];
|
return allManas[id];
|
||||||
}
|
}
|
||||||
|
|
||||||
uint8 getSkillLevel(int16 id) {
|
uint8 getSkillLevel(int16 id) {
|
||||||
|
@ -175,8 +167,8 @@ struct ActorAttributes {
|
||||||
}; // 28 bytes
|
}; // 28 bytes
|
||||||
|
|
||||||
|
|
||||||
const int baseCarryingCapacity = 100;
|
const int baseCarryingCapacity = 100;
|
||||||
const int carryingCapacityBonusPerBrawn = 200 / ActorAttributes::skillLevels;
|
const int carryingCapacityBonusPerBrawn = 200 / ActorAttributes::skillLevels;
|
||||||
|
|
||||||
/* ===================================================================== *
|
/* ===================================================================== *
|
||||||
ResourceActorProtoExtension structure
|
ResourceActorProtoExtension structure
|
||||||
|
@ -512,13 +504,13 @@ struct ResourceActor : public ResourceGameObject {
|
||||||
rightHandObject; // object held in right hand.
|
rightHandObject; // object held in right hand.
|
||||||
|
|
||||||
// Knowledge packets
|
// Knowledge packets
|
||||||
uint16 knowledge[ 16 ];
|
uint16 knowledge[16];
|
||||||
|
|
||||||
// Schedule script ID
|
// Schedule script ID
|
||||||
uint16 schedule;
|
uint16 schedule;
|
||||||
|
|
||||||
// Pad bytes
|
// Pad bytes
|
||||||
uint8 reserved[ 18 ];
|
uint8 reserved[18];
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -561,14 +553,14 @@ public:
|
||||||
rightHandObject; // object held in right hand.
|
rightHandObject; // object held in right hand.
|
||||||
|
|
||||||
// Knowledge packets
|
// Knowledge packets
|
||||||
uint16 knowledge[ 16 ];
|
uint16 knowledge[16];
|
||||||
|
|
||||||
// Schedule script ID
|
// Schedule script ID
|
||||||
uint16 schedule;
|
uint16 schedule;
|
||||||
|
|
||||||
// Run-time fields
|
// Run-time fields
|
||||||
|
|
||||||
uint8 conversationMemory[ 4 ];// last things talked about
|
uint8 conversationMemory[4];// last things talked about
|
||||||
|
|
||||||
// Sprite animation variables
|
// Sprite animation variables
|
||||||
uint8 currentAnimation, // current action sequence
|
uint8 currentAnimation, // current action sequence
|
||||||
|
@ -613,7 +605,7 @@ public:
|
||||||
uint8 deactivationCounter;
|
uint8 deactivationCounter;
|
||||||
|
|
||||||
// Assignment
|
// Assignment
|
||||||
uint8 assignmentBuf[ 24 ]; // memory reserved for actor
|
uint8 assignmentBuf[24]; // memory reserved for actor
|
||||||
// assignments
|
// assignments
|
||||||
|
|
||||||
// Current effective stats
|
// Current effective stats
|
||||||
|
@ -636,11 +628,11 @@ public:
|
||||||
Actor *leader; // This actor's leader
|
Actor *leader; // This actor's leader
|
||||||
Band *followers; // This actor's band of followers
|
Band *followers; // This actor's band of followers
|
||||||
|
|
||||||
ObjectID armorObjects[ ARMOR_COUNT ]; // armor objects being worn
|
ObjectID armorObjects[ARMOR_COUNT]; // armor objects being worn
|
||||||
|
|
||||||
GameObject *currentTarget;
|
GameObject *currentTarget;
|
||||||
|
|
||||||
int16 scriptVar[ actorScriptVars ]; // scratch variables for scripter use
|
int16 scriptVar[actorScriptVars]; // scratch variables for scripter use
|
||||||
|
|
||||||
// Member functions
|
// Member functions
|
||||||
|
|
||||||
|
@ -1078,58 +1070,6 @@ void loadFactionTallies(SaveFileReader &saveGame);
|
||||||
// Cleanup the faction tally table
|
// Cleanup the faction tally table
|
||||||
inline void cleanupFactionTallies(void) { /* Nothing to do */ }
|
inline void cleanupFactionTallies(void) { /* Nothing to do */ }
|
||||||
|
|
||||||
/* ============================================================================ *
|
|
||||||
Magic: Actor Enchantment bits
|
|
||||||
* ============================================================================ */
|
|
||||||
|
|
||||||
// These are are all the enchantment effects that can be represented
|
|
||||||
// as a single bit.
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// THESE ARE NO LONGER VALID SEE EFFECTS.H
|
|
||||||
|
|
||||||
#if 0
|
|
||||||
enum enchantmentEffects {
|
|
||||||
actorFlamingAura = (1 << 0), // surrounded by damaging aura
|
|
||||||
actorImmunePhysical = (1 << 1), // immune to physical weapons
|
|
||||||
actorImmuneProjectile = (1 << 2), // immune to projectiles
|
|
||||||
actorImmuneHandToHand = (1 << 3), // immune to non-projectiles
|
|
||||||
actorImmuneMagicMissile = (1 << 4), // immune to magical projectiles
|
|
||||||
actorImmuneFire = (1 << 5), // immune to fire
|
|
||||||
actorImmuneFireMagic = (1 << 6), // immune to magical fire
|
|
||||||
actorImmuneLava = (1 << 7), // immune to hot terrain
|
|
||||||
actorImmuneCold = (1 << 8), // immune to cold
|
|
||||||
actorImmuneMental = (1 << 9), // immune to mental attack
|
|
||||||
actorImmuneDirectMagic = (1 << 10), // immune to direct magic
|
|
||||||
actorImmuneLifeDrain = (1 << 11), // immune to Life Drain
|
|
||||||
actorLandWalking = (1 << 12), // can walk on land
|
|
||||||
actorDesolidified = (1 << 13), // can walk through walls
|
|
||||||
actorFloating = (1 << 14), // actor is floating
|
|
||||||
actorFallSlowly = (1 << 15), // protected against falling
|
|
||||||
actorLevitating = (1 << 16), // actor is levitating
|
|
||||||
actorWaterWalking = (1 << 17), // can walk on water
|
|
||||||
actorFlying = (1 << 18), // flying spell
|
|
||||||
actorBlind = (1 << 19), // actor is blind
|
|
||||||
actorPanic = (1 << 20), // actor runs away from danger
|
|
||||||
actorParalyzed = (1 << 21), // actor can not move
|
|
||||||
actorMoveFast = (1 << 22), // move faster than normal
|
|
||||||
actorMoveSlow = (1 << 23), // move slower than normal
|
|
||||||
actorAttackFast = (1 << 24), // attack faster than normal
|
|
||||||
actorAttackSlow = (1 << 25), // attack slower than normal
|
|
||||||
actorAsleep = (1 << 26), // actor goes to sleep
|
|
||||||
actorSoulSight = (1 << 27), // can see invisible
|
|
||||||
actorClairvoyant = (1 << 28), // player can scroll view
|
|
||||||
actorDetectPoison = (1 << 29), // poison objects highlighted
|
|
||||||
actorInvisible = (1 << 30), // no-one can see this actor
|
|
||||||
actorHasNoSmell = (1 << 31), // can't be tracked
|
|
||||||
};
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef _WIN32 // Reset old structure alignment
|
|
||||||
#pragma pack( pop )
|
|
||||||
#endif
|
|
||||||
|
|
||||||
} // end of namespace Saga2
|
} // end of namespace Saga2
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -62,7 +62,7 @@ ActorAssignment::~ActorAssignment(void) {
|
||||||
if (a->currentGoal == actorGoalFollowAssignment
|
if (a->currentGoal == actorGoalFollowAssignment
|
||||||
&& a->curTask != NULL) {
|
&& a->curTask != NULL) {
|
||||||
// If so, abort it
|
// If so, abort it
|
||||||
a->curTask->abort();
|
a->curTask->abortTask();
|
||||||
delete a->curTask;
|
delete a->curTask;
|
||||||
a->curTask = NULL;
|
a->curTask = NULL;
|
||||||
}
|
}
|
||||||
|
|
|
@ -24,8 +24,6 @@
|
||||||
* (c) 1993-1996 The Wyrmkeep Entertainment Co.
|
* (c) 1993-1996 The Wyrmkeep Entertainment Co.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#define FORBIDDEN_SYMBOL_ALLOW_ALL // FIXME: Remove
|
|
||||||
|
|
||||||
#include "saga2/std.h"
|
#include "saga2/std.h"
|
||||||
#include "saga2/gdraw.h"
|
#include "saga2/gdraw.h"
|
||||||
#include "saga2/gblitter.h"
|
#include "saga2/gblitter.h"
|
||||||
|
@ -36,10 +34,6 @@ namespace Saga2 {
|
||||||
#define TempFree free
|
#define TempFree free
|
||||||
|
|
||||||
|
|
||||||
/* ===================================================================== *
|
|
||||||
Member functions for gPort
|
|
||||||
* ===================================================================== */
|
|
||||||
|
|
||||||
void gPort::setMap(gPixelMap *newmap, bool inverted) {
|
void gPort::setMap(gPixelMap *newmap, bool inverted) {
|
||||||
map = newmap;
|
map = newmap;
|
||||||
clip = Rect16(0, 0, map->size.x, map->size.y);
|
clip = Rect16(0, 0, map->size.x, map->size.y);
|
||||||
|
|
|
@ -189,8 +189,7 @@ public:
|
||||||
|
|
||||||
// Constructor
|
// Constructor
|
||||||
gPort(void) {
|
gPort(void) {
|
||||||
memset(&map, 0,
|
memset(&map, 0, sizeof(gPort));
|
||||||
offsetof(gPort, textStyles) - offsetof(gPort, map) + sizeof(textStyles));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
virtual ~gPort() {}
|
virtual ~gPort() {}
|
||||||
|
@ -216,8 +215,8 @@ public:
|
||||||
|
|
||||||
// Indirect colors
|
// Indirect colors
|
||||||
|
|
||||||
void setPenMap(gPen *map) {
|
void setPenMap(gPen *pmap) {
|
||||||
penMap = map;
|
penMap = pmap;
|
||||||
}
|
}
|
||||||
void setIndirectColor(uint8 color) {
|
void setIndirectColor(uint8 color) {
|
||||||
fgPen = penMap[ color ];
|
fgPen = penMap[ color ];
|
||||||
|
|
|
@ -580,7 +580,7 @@ void setCenterActor(PlayerActorID newCenter) {
|
||||||
setEnchantmentDisplay();
|
setEnchantmentDisplay();
|
||||||
|
|
||||||
if (a->curTask != NULL) {
|
if (a->curTask != NULL) {
|
||||||
a->curTask->abort();
|
a->curTask->abortTask();
|
||||||
delete a->curTask;
|
delete a->curTask;
|
||||||
a->curTask = NULL;
|
a->curTask = NULL;
|
||||||
}
|
}
|
||||||
|
|
|
@ -1261,7 +1261,7 @@ int16 WanderTask::getType(void) const {
|
||||||
|
|
||||||
//----------------------------------------------------------------------
|
//----------------------------------------------------------------------
|
||||||
|
|
||||||
void WanderTask::abort(void) {
|
void WanderTask::abortTask(void) {
|
||||||
// if the actor has a wander motion, abort it
|
// if the actor has a wander motion, abort it
|
||||||
MotionTask *actorMotion = stack->getActor()->moveTask;
|
MotionTask *actorMotion = stack->getActor()->moveTask;
|
||||||
|
|
||||||
|
@ -1316,7 +1316,7 @@ TaskResult WanderTask::handleWander(void) {
|
||||||
|
|
||||||
void WanderTask::pause(void) {
|
void WanderTask::pause(void) {
|
||||||
// Call abort to stop the wandering motion
|
// Call abort to stop the wandering motion
|
||||||
abort();
|
abortTask();
|
||||||
|
|
||||||
paused = TRUE;
|
paused = TRUE;
|
||||||
counter = (rand() % 64 + rand() % 64) / 2;
|
counter = (rand() % 64 + rand() % 64) / 2;
|
||||||
|
@ -1424,9 +1424,9 @@ int16 TetheredWanderTask::getType(void) const {
|
||||||
|
|
||||||
//----------------------------------------------------------------------
|
//----------------------------------------------------------------------
|
||||||
|
|
||||||
void TetheredWanderTask::abort(void) {
|
void TetheredWanderTask::abortTask(void) {
|
||||||
if (gotoTether != NULL) {
|
if (gotoTether != NULL) {
|
||||||
gotoTether->abort();
|
gotoTether->abortTask();
|
||||||
delete gotoTether;
|
delete gotoTether;
|
||||||
gotoTether = NULL;
|
gotoTether = NULL;
|
||||||
} else {
|
} else {
|
||||||
|
@ -1467,7 +1467,7 @@ TaskResult TetheredWanderTask::handleWander(void) {
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if (gotoTether != NULL) {
|
if (gotoTether != NULL) {
|
||||||
gotoTether->abort();
|
gotoTether->abortTask();
|
||||||
delete gotoTether;
|
delete gotoTether;
|
||||||
gotoTether = NULL;
|
gotoTether = NULL;
|
||||||
}
|
}
|
||||||
|
@ -1590,10 +1590,10 @@ void GotoTask::mark(void) {
|
||||||
|
|
||||||
//----------------------------------------------------------------------
|
//----------------------------------------------------------------------
|
||||||
|
|
||||||
void GotoTask::abort(void) {
|
void GotoTask::abortTask(void) {
|
||||||
// If there is a wander subtask, delete it.
|
// If there is a wander subtask, delete it.
|
||||||
if (wander) {
|
if (wander) {
|
||||||
wander->abort();
|
wander->abortTask();
|
||||||
delete wander;
|
delete wander;
|
||||||
wander = NULL;
|
wander = NULL;
|
||||||
} else {
|
} else {
|
||||||
|
@ -1608,7 +1608,7 @@ void GotoTask::abort(void) {
|
||||||
TaskResult GotoTask::evaluate(void) {
|
TaskResult GotoTask::evaluate(void) {
|
||||||
// Determine if we have reach the target.
|
// Determine if we have reach the target.
|
||||||
if (stack->getActor()->getLocation() == destination()) {
|
if (stack->getActor()->getLocation() == destination()) {
|
||||||
abort();
|
abortTask();
|
||||||
return taskSucceeded;
|
return taskSucceeded;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2274,9 +2274,9 @@ void GoAwayFromTask::mark(void) {
|
||||||
//----------------------------------------------------------------------
|
//----------------------------------------------------------------------
|
||||||
// Abort this task
|
// Abort this task
|
||||||
|
|
||||||
void GoAwayFromTask::abort(void) {
|
void GoAwayFromTask::abortTask(void) {
|
||||||
if (goTask != NULL) {
|
if (goTask != NULL) {
|
||||||
goTask->abort();
|
goTask->abortTask();
|
||||||
delete goTask;
|
delete goTask;
|
||||||
goTask = NULL;
|
goTask = NULL;
|
||||||
}
|
}
|
||||||
|
@ -2597,14 +2597,14 @@ void HuntTask::mark(void) {
|
||||||
|
|
||||||
//----------------------------------------------------------------------
|
//----------------------------------------------------------------------
|
||||||
|
|
||||||
void HuntTask::abort(void) {
|
void HuntTask::abortTask(void) {
|
||||||
if (huntFlags & (huntWander | huntGoto)) {
|
if (huntFlags & (huntWander | huntGoto)) {
|
||||||
subTask->abort();
|
subTask->abortTask();
|
||||||
delete subTask;
|
delete subTask;
|
||||||
}
|
}
|
||||||
|
|
||||||
// If we've reached the target call the atTargetAbort() function
|
// If we've reached the target call the atTargetabortTask() function
|
||||||
if (atTarget()) atTargetAbort();
|
if (atTarget()) atTargetabortTask();
|
||||||
}
|
}
|
||||||
|
|
||||||
//----------------------------------------------------------------------
|
//----------------------------------------------------------------------
|
||||||
|
@ -2680,7 +2680,7 @@ TaskResult HuntTask::update(void) {
|
||||||
//----------------------------------------------------------------------
|
//----------------------------------------------------------------------
|
||||||
|
|
||||||
void HuntTask::removeWanderTask(void) {
|
void HuntTask::removeWanderTask(void) {
|
||||||
subTask->abort();
|
subTask->abortTask();
|
||||||
delete subTask;
|
delete subTask;
|
||||||
huntFlags &= ~huntWander;
|
huntFlags &= ~huntWander;
|
||||||
}
|
}
|
||||||
|
@ -2688,7 +2688,7 @@ void HuntTask::removeWanderTask(void) {
|
||||||
//----------------------------------------------------------------------
|
//----------------------------------------------------------------------
|
||||||
|
|
||||||
void HuntTask::removeGotoTask(void) {
|
void HuntTask::removeGotoTask(void) {
|
||||||
subTask->abort();
|
subTask->abortTask();
|
||||||
delete subTask;
|
delete subTask;
|
||||||
huntFlags &= ~huntGoto;
|
huntFlags &= ~huntGoto;
|
||||||
}
|
}
|
||||||
|
@ -2866,7 +2866,7 @@ bool HuntToBeNearLocationTask::atTarget(void) {
|
||||||
|
|
||||||
//----------------------------------------------------------------------
|
//----------------------------------------------------------------------
|
||||||
|
|
||||||
void HuntToBeNearLocationTask::atTargetAbort(void) {}
|
void HuntToBeNearLocationTask::atTargetabortTask(void) {}
|
||||||
|
|
||||||
//----------------------------------------------------------------------
|
//----------------------------------------------------------------------
|
||||||
|
|
||||||
|
@ -3099,7 +3099,7 @@ bool HuntToBeNearObjectTask::atTarget(void) {
|
||||||
|
|
||||||
//----------------------------------------------------------------------
|
//----------------------------------------------------------------------
|
||||||
|
|
||||||
void HuntToBeNearObjectTask::atTargetAbort(void) {}
|
void HuntToBeNearObjectTask::atTargetabortTask(void) {}
|
||||||
|
|
||||||
//----------------------------------------------------------------------
|
//----------------------------------------------------------------------
|
||||||
|
|
||||||
|
@ -3238,7 +3238,7 @@ bool HuntToPossessTask::atTarget(void) {
|
||||||
|
|
||||||
//----------------------------------------------------------------------
|
//----------------------------------------------------------------------
|
||||||
|
|
||||||
void HuntToPossessTask::atTargetAbort(void) {}
|
void HuntToPossessTask::atTargetabortTask(void) {}
|
||||||
|
|
||||||
//----------------------------------------------------------------------
|
//----------------------------------------------------------------------
|
||||||
|
|
||||||
|
@ -3512,7 +3512,7 @@ void HuntToBeNearActorTask::evaluateTarget(void) {
|
||||||
maxSenseRange,
|
maxSenseRange,
|
||||||
actorArray[ i ])) {
|
actorArray[ i ])) {
|
||||||
if (currentTarget != actorArray[ i ]) {
|
if (currentTarget != actorArray[ i ]) {
|
||||||
if (atTarget()) atTargetAbort();
|
if (atTarget()) atTargetabortTask();
|
||||||
currentTarget = actorArray[ i ];
|
currentTarget = actorArray[ i ];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -3539,7 +3539,7 @@ bool HuntToBeNearActorTask::atTarget(void) {
|
||||||
return TRUE;
|
return TRUE;
|
||||||
else {
|
else {
|
||||||
if (goAway != NULL) {
|
if (goAway != NULL) {
|
||||||
goAway->abort();
|
goAway->abortTask();
|
||||||
delete goAway;
|
delete goAway;
|
||||||
goAway = NULL;
|
goAway = NULL;
|
||||||
}
|
}
|
||||||
|
@ -3550,9 +3550,9 @@ bool HuntToBeNearActorTask::atTarget(void) {
|
||||||
|
|
||||||
//----------------------------------------------------------------------
|
//----------------------------------------------------------------------
|
||||||
|
|
||||||
void HuntToBeNearActorTask::atTargetAbort(void) {
|
void HuntToBeNearActorTask::atTargetabortTask(void) {
|
||||||
if (goAway != NULL) {
|
if (goAway != NULL) {
|
||||||
goAway->abort();
|
goAway->abortTask();
|
||||||
delete goAway;
|
delete goAway;
|
||||||
goAway = NULL;
|
goAway = NULL;
|
||||||
}
|
}
|
||||||
|
@ -3568,7 +3568,7 @@ TaskResult HuntToBeNearActorTask::atTargetEvaluate(void) {
|
||||||
return taskNotDone;
|
return taskNotDone;
|
||||||
|
|
||||||
if (goAway != NULL) {
|
if (goAway != NULL) {
|
||||||
goAway->abort();
|
goAway->abortTask();
|
||||||
delete goAway;
|
delete goAway;
|
||||||
goAway = NULL;
|
goAway = NULL;
|
||||||
}
|
}
|
||||||
|
@ -3596,7 +3596,7 @@ TaskResult HuntToBeNearActorTask::atTargetUpdate(void) {
|
||||||
|
|
||||||
// Delete the go away task if it exists
|
// Delete the go away task if it exists
|
||||||
if (goAway != NULL) {
|
if (goAway != NULL) {
|
||||||
goAway->abort();
|
goAway->abortTask();
|
||||||
delete goAway;
|
delete goAway;
|
||||||
goAway = NULL;
|
goAway = NULL;
|
||||||
}
|
}
|
||||||
|
@ -3689,8 +3689,8 @@ bool HuntToKillTask::operator == (const Task &t) const {
|
||||||
|
|
||||||
//----------------------------------------------------------------------
|
//----------------------------------------------------------------------
|
||||||
|
|
||||||
void HuntToKillTask::abort(void) {
|
void HuntToKillTask::abortTask(void) {
|
||||||
HuntActorTask::abort();
|
HuntActorTask::abortTask();
|
||||||
|
|
||||||
Actor *a = stack->getActor();
|
Actor *a = stack->getActor();
|
||||||
|
|
||||||
|
@ -3858,7 +3858,7 @@ void HuntToKillTask::evaluateTarget(void) {
|
||||||
if (bestTarget != currentTarget) {
|
if (bestTarget != currentTarget) {
|
||||||
// If the current target has changed, abort any
|
// If the current target has changed, abort any
|
||||||
// action currently taking place
|
// action currently taking place
|
||||||
if (atTarget()) atTargetAbort();
|
if (atTarget()) atTargetabortTask();
|
||||||
currentTarget = bestTarget;
|
currentTarget = bestTarget;
|
||||||
a->currentTarget = currentTarget;
|
a->currentTarget = currentTarget;
|
||||||
}
|
}
|
||||||
|
@ -3883,7 +3883,7 @@ bool HuntToKillTask::atTarget(void) {
|
||||||
|
|
||||||
//----------------------------------------------------------------------
|
//----------------------------------------------------------------------
|
||||||
|
|
||||||
void HuntToKillTask::atTargetAbort(void) {
|
void HuntToKillTask::atTargetabortTask(void) {
|
||||||
// If the task is aborted while at the target actor, abort any
|
// If the task is aborted while at the target actor, abort any
|
||||||
// attack currently taking place
|
// attack currently taking place
|
||||||
stack->getActor()->stopAttack(currentTarget);
|
stack->getActor()->stopAttack(currentTarget);
|
||||||
|
@ -4070,7 +4070,7 @@ bool HuntToGiveTask::atTarget(void) {
|
||||||
|
|
||||||
//----------------------------------------------------------------------
|
//----------------------------------------------------------------------
|
||||||
|
|
||||||
void HuntToGiveTask::atTargetAbort(void) {}
|
void HuntToGiveTask::atTargetabortTask(void) {}
|
||||||
|
|
||||||
//----------------------------------------------------------------------
|
//----------------------------------------------------------------------
|
||||||
|
|
||||||
|
@ -4355,7 +4355,7 @@ bool BandTask::atTarget(void) {
|
||||||
if ((actorLoc - currentTarget).quickHDistance() > 6
|
if ((actorLoc - currentTarget).quickHDistance() > 6
|
||||||
|| abs(actorLoc.z - currentTarget.z) > maxStepHeight) {
|
|| abs(actorLoc.z - currentTarget.z) > maxStepHeight) {
|
||||||
if (attend != NULL) {
|
if (attend != NULL) {
|
||||||
attend->abort();
|
attend->abortTask();
|
||||||
delete attend;
|
delete attend;
|
||||||
attend = NULL;
|
attend = NULL;
|
||||||
}
|
}
|
||||||
|
@ -4368,9 +4368,9 @@ bool BandTask::atTarget(void) {
|
||||||
|
|
||||||
//----------------------------------------------------------------------
|
//----------------------------------------------------------------------
|
||||||
|
|
||||||
void BandTask::atTargetAbort(void) {
|
void BandTask::atTargetabortTask(void) {
|
||||||
if (attend != NULL) {
|
if (attend != NULL) {
|
||||||
attend->abort();
|
attend->abortTask();
|
||||||
delete attend;
|
delete attend;
|
||||||
attend = NULL;
|
attend = NULL;
|
||||||
}
|
}
|
||||||
|
@ -4641,10 +4641,10 @@ int16 FollowPatrolRouteTask::getType(void) const {
|
||||||
|
|
||||||
//----------------------------------------------------------------------
|
//----------------------------------------------------------------------
|
||||||
|
|
||||||
void FollowPatrolRouteTask::abort(void) {
|
void FollowPatrolRouteTask::abortTask(void) {
|
||||||
// If there is a subtask, get rid of it
|
// If there is a subtask, get rid of it
|
||||||
if (gotoWayPoint) {
|
if (gotoWayPoint) {
|
||||||
gotoWayPoint->abort();
|
gotoWayPoint->abortTask();
|
||||||
delete gotoWayPoint;
|
delete gotoWayPoint;
|
||||||
gotoWayPoint = NULL;
|
gotoWayPoint = NULL;
|
||||||
}
|
}
|
||||||
|
@ -4693,7 +4693,7 @@ TaskResult FollowPatrolRouteTask::handleFollowPatrolRoute(void) {
|
||||||
&& abs(actorLoc.z - currentWayPoint.z) <= maxStepHeight) {
|
&& abs(actorLoc.z - currentWayPoint.z) <= maxStepHeight) {
|
||||||
// Delete the gotoWayPoint task
|
// Delete the gotoWayPoint task
|
||||||
if (gotoWayPoint != NULL) {
|
if (gotoWayPoint != NULL) {
|
||||||
gotoWayPoint->abort();
|
gotoWayPoint->abortTask();
|
||||||
delete gotoWayPoint;
|
delete gotoWayPoint;
|
||||||
gotoWayPoint = NULL;
|
gotoWayPoint = NULL;
|
||||||
}
|
}
|
||||||
|
@ -4808,7 +4808,7 @@ int16 AttendTask::getType(void) const {
|
||||||
|
|
||||||
//----------------------------------------------------------------------
|
//----------------------------------------------------------------------
|
||||||
|
|
||||||
void AttendTask::abort(void) {
|
void AttendTask::abortTask(void) {
|
||||||
MotionTask *actorMotion = stack->getActor()->moveTask;
|
MotionTask *actorMotion = stack->getActor()->moveTask;
|
||||||
|
|
||||||
// Determine if we need to abort the actor motion
|
// Determine if we need to abort the actor motion
|
||||||
|
@ -4939,10 +4939,10 @@ int16 DefendTask::getType(void) const {
|
||||||
|
|
||||||
//----------------------------------------------------------------------
|
//----------------------------------------------------------------------
|
||||||
|
|
||||||
void DefendTask::abort(void) {
|
void DefendTask::abortTask(void) {
|
||||||
// If we have a sub-task, kill it
|
// If we have a sub-task, kill it
|
||||||
if (subTask != NULL) {
|
if (subTask != NULL) {
|
||||||
subTask->abort();
|
subTask->abortTask();
|
||||||
delete subTask;
|
delete subTask;
|
||||||
subTask = NULL;
|
subTask = NULL;
|
||||||
}
|
}
|
||||||
|
@ -5101,7 +5101,7 @@ int16 ParryTask::getType(void) const {
|
||||||
|
|
||||||
//----------------------------------------------------------------------
|
//----------------------------------------------------------------------
|
||||||
|
|
||||||
void ParryTask::abort(void) {
|
void ParryTask::abortTask(void) {
|
||||||
MotionTask *actorMotion = stack->getActor()->moveTask;
|
MotionTask *actorMotion = stack->getActor()->moveTask;
|
||||||
|
|
||||||
// Kill the defense motion, if there is one
|
// Kill the defense motion, if there is one
|
||||||
|
@ -5261,11 +5261,11 @@ void TaskStack::setTask(Task *t) {
|
||||||
//----------------------------------------------------------------------
|
//----------------------------------------------------------------------
|
||||||
// Abort all tasks in stack
|
// Abort all tasks in stack
|
||||||
|
|
||||||
void TaskStack::abort(void) {
|
void TaskStack::abortTask(void) {
|
||||||
if (stackBottomID != NoTask) {
|
if (stackBottomID != NoTask) {
|
||||||
Task *stackBottom = getTaskAddress(stackBottomID);
|
Task *stackBottom = getTaskAddress(stackBottomID);
|
||||||
|
|
||||||
stackBottom->abort();
|
stackBottom->abortTask();
|
||||||
delete stackBottom;
|
delete stackBottom;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -204,7 +204,7 @@ public:
|
||||||
// Return an integer representing the type of this task
|
// Return an integer representing the type of this task
|
||||||
virtual int16 getType(void) const = 0;
|
virtual int16 getType(void) const = 0;
|
||||||
|
|
||||||
virtual void abort(void) = 0;
|
virtual void abortTask(void) = 0;
|
||||||
virtual TaskResult evaluate(void) = 0;
|
virtual TaskResult evaluate(void) = 0;
|
||||||
virtual TaskResult update(void) = 0;
|
virtual TaskResult update(void) = 0;
|
||||||
|
|
||||||
|
@ -244,7 +244,7 @@ public:
|
||||||
// Return an integer representing the type of this task
|
// Return an integer representing the type of this task
|
||||||
int16 getType(void) const;
|
int16 getType(void) const;
|
||||||
|
|
||||||
void abort();
|
void abortTask();
|
||||||
TaskResult evaluate(void);
|
TaskResult evaluate(void);
|
||||||
TaskResult update(void);
|
TaskResult update(void);
|
||||||
|
|
||||||
|
@ -323,7 +323,7 @@ public:
|
||||||
// Return an integer representing the type of this task
|
// Return an integer representing the type of this task
|
||||||
int16 getType(void) const;
|
int16 getType(void) const;
|
||||||
|
|
||||||
void abort(void);
|
void abortTask(void);
|
||||||
|
|
||||||
// Determine if the specified task is equivalent to this task
|
// Determine if the specified task is equivalent to this task
|
||||||
bool operator == (const Task &t) const;
|
bool operator == (const Task &t) const;
|
||||||
|
@ -367,7 +367,7 @@ public:
|
||||||
void mark(void);
|
void mark(void);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
void abort(void);
|
void abortTask(void);
|
||||||
TaskResult evaluate(void);
|
TaskResult evaluate(void);
|
||||||
TaskResult update(void);
|
TaskResult update(void);
|
||||||
|
|
||||||
|
@ -664,7 +664,7 @@ public:
|
||||||
void mark(void);
|
void mark(void);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
void abort(void);
|
void abortTask(void);
|
||||||
TaskResult evaluate(void);
|
TaskResult evaluate(void);
|
||||||
TaskResult update(void);
|
TaskResult update(void);
|
||||||
|
|
||||||
|
@ -788,7 +788,7 @@ public:
|
||||||
void mark(void);
|
void mark(void);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
void abort(void);
|
void abortTask(void);
|
||||||
TaskResult evaluate(void);
|
TaskResult evaluate(void);
|
||||||
TaskResult update(void);
|
TaskResult update(void);
|
||||||
|
|
||||||
|
@ -804,7 +804,7 @@ protected:
|
||||||
virtual TilePoint currentTargetLoc(void) = 0;
|
virtual TilePoint currentTargetLoc(void) = 0;
|
||||||
|
|
||||||
virtual bool atTarget(void) = 0;
|
virtual bool atTarget(void) = 0;
|
||||||
virtual void atTargetAbort(void) = 0;
|
virtual void atTargetabortTask(void) = 0;
|
||||||
virtual TaskResult atTargetEvaluate(void) = 0;
|
virtual TaskResult atTargetEvaluate(void) = 0;
|
||||||
virtual TaskResult atTargetUpdate(void) = 0;
|
virtual TaskResult atTargetUpdate(void) = 0;
|
||||||
};
|
};
|
||||||
|
@ -887,7 +887,7 @@ protected:
|
||||||
|
|
||||||
bool atTarget(void);
|
bool atTarget(void);
|
||||||
|
|
||||||
void atTargetAbort(void);
|
void atTargetabortTask(void);
|
||||||
TaskResult atTargetEvaluate(void);
|
TaskResult atTargetEvaluate(void);
|
||||||
TaskResult atTargetUpdate(void);
|
TaskResult atTargetUpdate(void);
|
||||||
|
|
||||||
|
@ -978,7 +978,7 @@ protected:
|
||||||
|
|
||||||
bool atTarget(void);
|
bool atTarget(void);
|
||||||
|
|
||||||
void atTargetAbort(void);
|
void atTargetabortTask(void);
|
||||||
TaskResult atTargetEvaluate(void);
|
TaskResult atTargetEvaluate(void);
|
||||||
TaskResult atTargetUpdate(void);
|
TaskResult atTargetUpdate(void);
|
||||||
|
|
||||||
|
@ -1031,7 +1031,7 @@ protected:
|
||||||
void evaluateTarget(void);
|
void evaluateTarget(void);
|
||||||
bool atTarget(void);
|
bool atTarget(void);
|
||||||
|
|
||||||
void atTargetAbort(void);
|
void atTargetabortTask(void);
|
||||||
TaskResult atTargetEvaluate(void);
|
TaskResult atTargetEvaluate(void);
|
||||||
TaskResult atTargetUpdate(void);
|
TaskResult atTargetUpdate(void);
|
||||||
};
|
};
|
||||||
|
@ -1147,7 +1147,7 @@ protected:
|
||||||
|
|
||||||
bool atTarget(void);
|
bool atTarget(void);
|
||||||
|
|
||||||
void atTargetAbort(void);
|
void atTargetabortTask(void);
|
||||||
TaskResult atTargetEvaluate(void);
|
TaskResult atTargetEvaluate(void);
|
||||||
TaskResult atTargetUpdate(void);
|
TaskResult atTargetUpdate(void);
|
||||||
|
|
||||||
|
@ -1204,14 +1204,14 @@ public:
|
||||||
// Determine if the specified task is equivalent to this task
|
// Determine if the specified task is equivalent to this task
|
||||||
bool operator == (const Task &t) const;
|
bool operator == (const Task &t) const;
|
||||||
|
|
||||||
void abort(void);
|
void abortTask(void);
|
||||||
TaskResult update(void);
|
TaskResult update(void);
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
void evaluateTarget(void);
|
void evaluateTarget(void);
|
||||||
bool atTarget(void);
|
bool atTarget(void);
|
||||||
|
|
||||||
void atTargetAbort(void);
|
void atTargetabortTask(void);
|
||||||
TaskResult atTargetEvaluate(void);
|
TaskResult atTargetEvaluate(void);
|
||||||
TaskResult atTargetUpdate(void);
|
TaskResult atTargetUpdate(void);
|
||||||
|
|
||||||
|
@ -1264,7 +1264,7 @@ protected:
|
||||||
void evaluateTarget(void);
|
void evaluateTarget(void);
|
||||||
bool atTarget(void);
|
bool atTarget(void);
|
||||||
|
|
||||||
void atTargetAbort(void);
|
void atTargetabortTask(void);
|
||||||
TaskResult atTargetEvaluate(void);
|
TaskResult atTargetEvaluate(void);
|
||||||
TaskResult atTargetUpdate(void);
|
TaskResult atTargetUpdate(void);
|
||||||
};
|
};
|
||||||
|
@ -1399,7 +1399,7 @@ protected:
|
||||||
|
|
||||||
bool atTarget(void);
|
bool atTarget(void);
|
||||||
|
|
||||||
void atTargetAbort(void);
|
void atTargetabortTask(void);
|
||||||
TaskResult atTargetEvaluate(void);
|
TaskResult atTargetEvaluate(void);
|
||||||
TaskResult atTargetUpdate(void);
|
TaskResult atTargetUpdate(void);
|
||||||
|
|
||||||
|
@ -1514,7 +1514,7 @@ public:
|
||||||
// Return an integer representing the type of this task
|
// Return an integer representing the type of this task
|
||||||
int16 getType(void) const;
|
int16 getType(void) const;
|
||||||
|
|
||||||
void abort(void);
|
void abortTask(void);
|
||||||
TaskResult evaluate(void);
|
TaskResult evaluate(void);
|
||||||
TaskResult update(void);
|
TaskResult update(void);
|
||||||
|
|
||||||
|
@ -1560,7 +1560,7 @@ public:
|
||||||
// Return an integer representing the type of this task
|
// Return an integer representing the type of this task
|
||||||
int16 getType(void) const;
|
int16 getType(void) const;
|
||||||
|
|
||||||
void abort(void);
|
void abortTask(void);
|
||||||
TaskResult evaluate(void);
|
TaskResult evaluate(void);
|
||||||
TaskResult update(void);
|
TaskResult update(void);
|
||||||
|
|
||||||
|
@ -1605,7 +1605,7 @@ public:
|
||||||
// Return an integer representing the type of this task
|
// Return an integer representing the type of this task
|
||||||
int16 getType(void) const;
|
int16 getType(void) const;
|
||||||
|
|
||||||
void abort(void);
|
void abortTask(void);
|
||||||
TaskResult evaluate(void);
|
TaskResult evaluate(void);
|
||||||
TaskResult update(void);
|
TaskResult update(void);
|
||||||
|
|
||||||
|
@ -1650,7 +1650,7 @@ public:
|
||||||
// Return an integer representing the type of this task
|
// Return an integer representing the type of this task
|
||||||
int16 getType(void) const;
|
int16 getType(void) const;
|
||||||
|
|
||||||
void abort(void);
|
void abortTask(void);
|
||||||
TaskResult evaluate(void);
|
TaskResult evaluate(void);
|
||||||
TaskResult update(void);
|
TaskResult update(void);
|
||||||
|
|
||||||
|
@ -1732,7 +1732,7 @@ public:
|
||||||
}
|
}
|
||||||
|
|
||||||
// Abort all tasks in stack
|
// Abort all tasks in stack
|
||||||
void abort(void);
|
void abortTask(void);
|
||||||
// Re-evaluate tasks in stack
|
// Re-evaluate tasks in stack
|
||||||
TaskResult evaluate(void);
|
TaskResult evaluate(void);
|
||||||
// Update the state of the tasks in stack
|
// Update the state of the tasks in stack
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue