mirror of
https://foundry.openuru.org/gitblit/r/CWE-ou-minkata.git
synced 2025-07-17 10:52:46 +00:00
Obliterate hsBool
This commit is contained in:
@ -175,7 +175,7 @@ int plAGAnim::AddApplicator(plAGApplicator *app)
|
||||
|
||||
// RemoveApplicator ------------------------
|
||||
// -----------------
|
||||
hsBool plAGAnim::RemoveApplicator(int index)
|
||||
bool plAGAnim::RemoveApplicator(int index)
|
||||
{
|
||||
hsAssert(index < fApps.size(), "Out of range index for plAGAnim::RemoveApp()");
|
||||
|
||||
@ -299,7 +299,7 @@ plAGAnim * plAGAnim::FindAnim(const plString &name)
|
||||
|
||||
// RemoveAnim -------------------------------
|
||||
// -----------
|
||||
hsBool plAGAnim::RemoveAnim(const plString &name)
|
||||
bool plAGAnim::RemoveAnim(const plString &name)
|
||||
{
|
||||
plAnimMap::iterator i = fAllAnims.find(name);
|
||||
|
||||
@ -328,7 +328,7 @@ void plAGAnim::DumpAnimationRegistry()
|
||||
|
||||
// SharesPinsWith -----------------------------------------
|
||||
// ---------------
|
||||
hsBool plAGAnim::SharesPinsWith(const plAGAnim *anim) const
|
||||
bool plAGAnim::SharesPinsWith(const plAGAnim *anim) const
|
||||
{
|
||||
int i, j;
|
||||
for (i = 0; i < fApps.size(); i++)
|
||||
@ -394,10 +394,10 @@ void plATCAnim::Read(hsStream *stream, hsResMgr *mgr)
|
||||
plAGAnim::Read(stream, mgr);
|
||||
|
||||
fInitial = stream->ReadLEScalar();
|
||||
fAutoStart = stream->Readbool();
|
||||
fAutoStart = stream->ReadBool();
|
||||
fLoopStart = stream->ReadLEScalar();
|
||||
fLoopEnd = stream->ReadLEScalar();
|
||||
fLoop = stream->Readbool();
|
||||
fLoop = stream->ReadBool();
|
||||
|
||||
fEaseInType = stream->ReadByte();
|
||||
fEaseInMin = stream->ReadLEScalar();
|
||||
@ -438,10 +438,10 @@ void plATCAnim::Write(hsStream *stream, hsResMgr *mgr)
|
||||
plAGAnim::Write(stream, mgr);
|
||||
|
||||
stream->WriteLEScalar(fInitial);
|
||||
stream->Writebool(fAutoStart);
|
||||
stream->WriteBool(fAutoStart);
|
||||
stream->WriteLEScalar(fLoopStart);
|
||||
stream->WriteLEScalar(fLoopEnd);
|
||||
stream->Writebool(fLoop);
|
||||
stream->WriteBool(fLoop);
|
||||
|
||||
stream->WriteByte(fEaseInType);
|
||||
stream->WriteLEScalar(fEaseInMin);
|
||||
|
@ -134,7 +134,7 @@ public:
|
||||
|
||||
/** Remove the ith applicator and its associated channel. Existing applicators
|
||||
will be renumbered. */
|
||||
hsBool RemoveApplicator(int appNum);
|
||||
bool RemoveApplicator(int appNum);
|
||||
|
||||
/** The name of the animation. This name is used in the avatar manager to reference
|
||||
animations. Animations are generally indexed by name when they are loaded
|
||||
@ -164,7 +164,7 @@ public:
|
||||
|
||||
/** Returns true if any applicator on the arg anim tries to use the
|
||||
same pin (on the same object) as we do. */
|
||||
hsBool SharesPinsWith(const plAGAnim *anim) const;
|
||||
bool SharesPinsWith(const plAGAnim *anim) const;
|
||||
|
||||
|
||||
// PLASMA PROTOCOL
|
||||
@ -181,7 +181,7 @@ public:
|
||||
global animation registry. */
|
||||
static plAGAnim *FindAnim(const plString &name);
|
||||
/** Remove the given animation from the registry. */
|
||||
static hsBool RemoveAnim(const plString &name);
|
||||
static bool RemoveAnim(const plString &name);
|
||||
/** Clear the animation cache. Used when resetting the client
|
||||
to a vanilla state, as when clearing the scene while
|
||||
exporting. */
|
||||
@ -243,7 +243,7 @@ public:
|
||||
|
||||
/** Does this animation start automatically when it's applied? */
|
||||
virtual bool GetAutoStart() const { return fAutoStart; }
|
||||
void SetAutoStart(hsBool start) { fAutoStart = (start != 0); }
|
||||
void SetAutoStart(bool start) { fAutoStart = (start != 0); }
|
||||
|
||||
/** If the animation loops, this is where it will restart the loop. Note that
|
||||
loops do not have to start at the beginning of the animation. */
|
||||
@ -258,7 +258,7 @@ public:
|
||||
/** Does this animation loop?. Note that there may be multiple loop segments defined
|
||||
within a given animation. */
|
||||
virtual bool GetLoop() const { return fLoop; }
|
||||
void SetLoop(hsBool loop) { fLoop = (loop != 0); }
|
||||
void SetLoop(bool loop) { fLoop = (loop != 0); }
|
||||
|
||||
/** Set the curve type for easing in. Easing is an optional feature which allows you
|
||||
to make an animation slow down gradually when you stop it.
|
||||
|
@ -91,7 +91,7 @@ extern const char *gGlobalChannelName = nil;
|
||||
// ctor -------------------------------------------------------------------
|
||||
// -----
|
||||
plAGAnimInstance::plAGAnimInstance(plAGAnim * anim, plAGMasterMod * master,
|
||||
float blend, uint16_t blendPriority, hsBool cache,
|
||||
float blend, uint16_t blendPriority, bool cache,
|
||||
bool useAmplitude)
|
||||
: fAnimation(anim),
|
||||
fMaster(master),
|
||||
@ -214,7 +214,7 @@ void plAGAnimInstance::IRegisterDetach(const plString &channelName, plAGChannel
|
||||
|
||||
// SetCurrentTime ---------------------------------------------------------------
|
||||
// ---------------
|
||||
void plAGAnimInstance::SetCurrentTime(float localT, hsBool jump /* = false */)
|
||||
void plAGAnimInstance::SetCurrentTime(float localT, bool jump /* = false */)
|
||||
{
|
||||
if (fTimeConvert)
|
||||
fTimeConvert->SetCurrentAnimTime(localT, jump);
|
||||
@ -222,7 +222,7 @@ void plAGAnimInstance::SetCurrentTime(float localT, hsBool jump /* = false */)
|
||||
|
||||
// SeekRelative ------------------------------------
|
||||
// -------------
|
||||
void plAGAnimInstance::SeekRelative (float delta, hsBool jump)
|
||||
void plAGAnimInstance::SeekRelative (float delta, bool jump)
|
||||
{
|
||||
if(fTimeConvert)
|
||||
{
|
||||
@ -333,7 +333,7 @@ plString plAGAnimInstance::GetName()
|
||||
|
||||
// SetLoop ----------------------------------
|
||||
// --------
|
||||
void plAGAnimInstance::SetLoop(hsBool status)
|
||||
void plAGAnimInstance::SetLoop(bool status)
|
||||
{
|
||||
if (fTimeConvert)
|
||||
fTimeConvert->Loop(status);
|
||||
@ -341,7 +341,7 @@ void plAGAnimInstance::SetLoop(hsBool status)
|
||||
|
||||
// HandleCmd ----------------------------------------
|
||||
// ----------
|
||||
hsBool plAGAnimInstance::HandleCmd(plAnimCmdMsg *msg)
|
||||
bool plAGAnimInstance::HandleCmd(plAnimCmdMsg *msg)
|
||||
{
|
||||
if (fTimeConvert)
|
||||
return fTimeConvert->HandleCmd(msg);
|
||||
@ -350,7 +350,7 @@ hsBool plAGAnimInstance::HandleCmd(plAnimCmdMsg *msg)
|
||||
|
||||
// IsFinished -----------------------
|
||||
// -----------
|
||||
hsBool plAGAnimInstance::IsFinished()
|
||||
bool plAGAnimInstance::IsFinished()
|
||||
{
|
||||
if (fTimeConvert)
|
||||
return fTimeConvert->IsStopped();
|
||||
@ -359,7 +359,7 @@ hsBool plAGAnimInstance::IsFinished()
|
||||
|
||||
// IsAtEnd -----------------------
|
||||
// --------
|
||||
hsBool plAGAnimInstance::IsAtEnd()
|
||||
bool plAGAnimInstance::IsAtEnd()
|
||||
{
|
||||
if(fTimeConvert)
|
||||
{
|
||||
@ -452,7 +452,7 @@ void plAGAnimInstance::ProcessFade(float elapsed)
|
||||
|
||||
// ICalcFade ---------------------------------------------------------------------
|
||||
// ----------
|
||||
float plAGAnimInstance::ICalcFade(hsBool &fade, float curVal, float goal,
|
||||
float plAGAnimInstance::ICalcFade(bool &fade, float curVal, float goal,
|
||||
float rate, float elapsed)
|
||||
{
|
||||
float newVal;
|
||||
|
@ -98,7 +98,7 @@ public:
|
||||
This attaches the animation channels to the channels of
|
||||
the master modifier and creates all the bookkeeping structures
|
||||
necessary to undo it later. */
|
||||
plAGAnimInstance(plAGAnim * anim, plAGMasterMod * master, float blend, uint16_t blendPriority, hsBool cache, bool useAmplitude);
|
||||
plAGAnimInstance(plAGAnim * anim, plAGMasterMod * master, float blend, uint16_t blendPriority, bool cache, bool useAmplitude);
|
||||
|
||||
/** Destructor. Removes the animation from the scene objects it's attached to. */
|
||||
virtual ~plAGAnimInstance();
|
||||
@ -141,10 +141,10 @@ public:
|
||||
|
||||
/** Make this animation loop (or not.) Note that the instance can loop
|
||||
or not without regard to whether the plAGAnim it is based on loops. */
|
||||
void SetLoop(hsBool status);
|
||||
void SetLoop(bool status);
|
||||
|
||||
/** Interpret and respond to an animation command message. /sa plAnimCmdMsg */
|
||||
hsBool HandleCmd(plAnimCmdMsg *msg);
|
||||
bool HandleCmd(plAnimCmdMsg *msg);
|
||||
|
||||
/** Start playback of the animation. You may optionally provide the a world
|
||||
time, which is needed for synchronizing the animation's timeline
|
||||
@ -159,14 +159,14 @@ public:
|
||||
Note that this time is in animation local time, not global time.
|
||||
The "jump" parameter specifies whether or not to fire callbacks
|
||||
that occur between the current time and the target time. */
|
||||
void SetCurrentTime(float newLocalTime, hsBool jump = false);
|
||||
void SetCurrentTime(float newLocalTime, bool jump = false);
|
||||
|
||||
/** Move the playback head by the specified relative amount within
|
||||
the animation. This may cause looping. If the beginning or end
|
||||
of the animation is reached an looping is not on, the movement
|
||||
will pin.
|
||||
\param jump if true, don't look for callbacks between old time and TRACKED_NEW */
|
||||
void SeekRelative(float delta, hsBool jump);
|
||||
void SeekRelative(float delta, bool jump);
|
||||
|
||||
/** Gradually fade the blend strength or amplitude of the animation.
|
||||
\param goal is the desired blend strength
|
||||
@ -186,10 +186,10 @@ public:
|
||||
Primarily used to see if an animation has played all the
|
||||
way to the end, but will also return true if the animation
|
||||
was stopped with a stop command */
|
||||
hsBool IsFinished();
|
||||
bool IsFinished();
|
||||
|
||||
/** Is the animation playback head positioned at the end. */
|
||||
hsBool IsAtEnd();
|
||||
bool IsAtEnd();
|
||||
|
||||
/** Get the name of the underlying animation. */
|
||||
plString GetName();
|
||||
@ -243,16 +243,16 @@ protected:
|
||||
// Each activation gets its own timeline.
|
||||
plAnimTimeConvert *fTimeConvert;
|
||||
|
||||
hsBool fFadeBlend; /// we are fading the blend
|
||||
bool fFadeBlend; /// we are fading the blend
|
||||
float fFadeBlendGoal; /// what blend level we're trying to reach
|
||||
float fFadeBlendRate; /// how fast are we fading in blend units per second (1 blend unit = full)
|
||||
hsBool fFadeDetach; /// detach after fade is finished? (only used for blend fades)
|
||||
bool fFadeDetach; /// detach after fade is finished? (only used for blend fades)
|
||||
|
||||
hsBool fFadeAmp; /// we are fading the amplitude
|
||||
bool fFadeAmp; /// we are fading the amplitude
|
||||
float fFadeAmpGoal; /// amplitude we're trying to reach
|
||||
float fFadeAmpRate; /// how faster we're fading in blend units per second
|
||||
|
||||
float ICalcFade(hsBool &fade, float curVal, float goal, float rate, float elapsed);
|
||||
float ICalcFade(bool &fade, float curVal, float goal, float rate, float elapsed);
|
||||
|
||||
};
|
||||
|
||||
|
@ -65,7 +65,7 @@ plAGApplicator::~plAGApplicator()
|
||||
{
|
||||
}
|
||||
|
||||
void plAGApplicator::Apply(const plAGModifier *mod, double time, hsBool force)
|
||||
void plAGApplicator::Apply(const plAGModifier *mod, double time, bool force)
|
||||
{
|
||||
if (fEnabled || force)
|
||||
IApply(mod, time);
|
||||
@ -112,7 +112,7 @@ plAGApplicator *plAGApplicator::CloneWithChannel(plAGChannel *channel)
|
||||
return app;
|
||||
}
|
||||
|
||||
hsBool plAGApplicator::CanBlend(plAGApplicator *app)
|
||||
bool plAGApplicator::CanBlend(plAGApplicator *app)
|
||||
{
|
||||
uint16_t ourClass = ClassIndex();
|
||||
uint16_t theirClass = app->ClassIndex();
|
||||
|
@ -111,7 +111,7 @@ public:
|
||||
/** Optionally suppress the action of this applicator.
|
||||
The applicator can still be forced to apply using the force
|
||||
paramater of the Apply function. */
|
||||
void Enable(hsBool on) { fEnabled = on; }
|
||||
void Enable(bool on) { fEnabled = on; }
|
||||
|
||||
/** Make a shallow copy of the applicator. Keep the same input channel
|
||||
but do not clone the input channel. */
|
||||
@ -129,24 +129,24 @@ public:
|
||||
would be effected by pulling the input channel from the other applicator,
|
||||
blending it with our input channel via a new blend node, attaching that blend
|
||||
node as our new input, and throwing the other applicator away. */
|
||||
virtual hsBool CanBlend(plAGApplicator *app);
|
||||
virtual bool CanBlend(plAGApplicator *app);
|
||||
/** Combine the two applicators if possible. \sa CanBlend */
|
||||
virtual plAGChannel * MergeChannel(plAGApplicator *app, plAGChannel *channel,
|
||||
plScalarChannel *blend, int blendPriority);
|
||||
|
||||
/** \bug It makes no sense for an applicator to combine because combination always
|
||||
results in a different data type, which would require a different applicator. */
|
||||
virtual hsBool CanCombine(plAGApplicator *app) { return false; }
|
||||
virtual bool CanCombine(plAGApplicator *app) { return false; }
|
||||
|
||||
/** Apply our channel's data to the scene object, via the modifier.
|
||||
This is the only function that actually changes perceivable scene state. */
|
||||
void Apply(const plAGModifier *mod, double time, hsBool force = false); // Apply our channel's data to the modifier
|
||||
void Apply(const plAGModifier *mod, double time, bool force = false); // Apply our channel's data to the modifier
|
||||
|
||||
// this is pretty much a HACK to support applicators that want to stick around when
|
||||
// their channel is gone so they can operate on the next channel that comes in
|
||||
// the RIGHT way to do this is to make applicators support the Detach() protocol just
|
||||
// like channels...
|
||||
virtual hsBool AutoDelete() { return true; } // should we remove it when its input channel is gone?
|
||||
virtual bool AutoDelete() { return true; } // should we remove it when its input channel is gone?
|
||||
|
||||
// PlOP
|
||||
CLASSNAME_REGISTER( plAGApplicator );
|
||||
@ -171,7 +171,7 @@ protected:
|
||||
|
||||
// -- members --
|
||||
plAGChannel *fChannel;
|
||||
hsBool fEnabled;
|
||||
bool fEnabled;
|
||||
plString fChannelName;
|
||||
};
|
||||
|
||||
|
@ -163,7 +163,7 @@ public:
|
||||
|
||||
/** Is the animation moving at the given world time? Takes into account
|
||||
start/stop messages that haven't been applied yet, ease curves, etc. */
|
||||
virtual hsBool IsStoppedAt(double wSecs) { return true; }
|
||||
virtual bool IsStoppedAt(double wSecs) { return true; }
|
||||
|
||||
/** Detach the given channel from our graph. If this is the channel in
|
||||
question, returns any upstream channels so they can be reattached.
|
||||
|
@ -98,8 +98,8 @@ void plAGMasterMod::Write(hsStream *stream, hsResMgr *mgr)
|
||||
{
|
||||
mgr->WriteKey(stream, fPrivateAnims[i]->GetKey());
|
||||
}
|
||||
stream->Writebool(fIsGrouped);
|
||||
stream->Writebool(fIsGroupMaster);
|
||||
stream->WriteBool(fIsGrouped);
|
||||
stream->WriteBool(fIsGroupMaster);
|
||||
if (fIsGroupMaster)
|
||||
mgr->WriteKey(stream, fMsgForwarder->GetKey());
|
||||
|
||||
@ -126,8 +126,8 @@ void plAGMasterMod::Read(hsStream * stream, hsResMgr *mgr)
|
||||
plGenRefMsg* msg = new plGenRefMsg(GetKey(), plRefMsg::kOnCreate, 0, kPrivateAnim);
|
||||
mgr->ReadKeyNotifyMe(stream, msg, plRefFlags::kActiveRef);
|
||||
}
|
||||
fIsGrouped = stream->Readbool();
|
||||
fIsGroupMaster = stream->Readbool();
|
||||
fIsGrouped = stream->ReadBool();
|
||||
fIsGroupMaster = stream->ReadBool();
|
||||
if (fIsGroupMaster)
|
||||
{
|
||||
plGenRefMsg* msg = new plGenRefMsg(GetKey(), plRefMsg::kOnCreate, 0, 0);
|
||||
@ -218,7 +218,7 @@ plProfile_CreateTimer("AnimatingPhysicals", "Animation", AnimatingPhysicals);
|
||||
plProfile_CreateTimer("StoppedAnimPhysicals", "Animation", StoppedAnimPhysicals);
|
||||
|
||||
// IEVAL
|
||||
hsBool plAGMasterMod::IEval(double secs, float del, uint32_t dirty)
|
||||
bool plAGMasterMod::IEval(double secs, float del, uint32_t dirty)
|
||||
{
|
||||
if (fFirstEval)
|
||||
{
|
||||
@ -325,7 +325,7 @@ void plAGMasterMod::DumpAniGraph(const char *justThisChannel, bool optimized, do
|
||||
|
||||
// GETCHANNELMOD(name)
|
||||
// Get the modifier that controls the channel with the given name
|
||||
plAGModifier * plAGMasterMod::GetChannelMod(const plString & name, hsBool dontCache ) const
|
||||
plAGModifier * plAGMasterMod::GetChannelMod(const plString & name, bool dontCache ) const
|
||||
{
|
||||
plAGModifier * result = nil;
|
||||
std::map<plString, plAGModifier *>::const_iterator i = fChannelMods.find(name);
|
||||
@ -389,7 +389,7 @@ plAGModifier * plAGMasterMod::IFindChannelMod(const plSceneObject *SO, const plS
|
||||
plAGAnimInstance * plAGMasterMod::AttachAnimationBlended(plAGAnim *anim,
|
||||
float blendFactor /* = 0 */,
|
||||
uint16_t blendPriority /* plAGMedBlendPriority */,
|
||||
hsBool cache /* = false */)
|
||||
bool cache /* = false */)
|
||||
{
|
||||
plAGAnimInstance *instance = nil;
|
||||
plAnimVector::iterator i;
|
||||
@ -421,7 +421,7 @@ plAGAnimInstance * plAGMasterMod::AttachAnimationBlended(plAGAnim *anim,
|
||||
}
|
||||
|
||||
// ATTACHANIMATIONBLENDED(name, blend)
|
||||
plAGAnimInstance * plAGMasterMod::AttachAnimationBlended(const plString &name, float blendFactor /* = 0 */, uint16_t blendPriority, hsBool cache /* = false */)
|
||||
plAGAnimInstance * plAGMasterMod::AttachAnimationBlended(const plString &name, float blendFactor /* = 0 */, uint16_t blendPriority, bool cache /* = false */)
|
||||
{
|
||||
plAGAnimInstance *instance = nil;
|
||||
plAGAnim *anim = plAGAnim::FindAnim(name);
|
||||
@ -612,7 +612,7 @@ void plAGMasterMod::DumpCurrentAnims(const char *header)
|
||||
|
||||
// MSGRECEIVE
|
||||
// receive trigger messages
|
||||
hsBool plAGMasterMod::MsgReceive(plMessage* msg)
|
||||
bool plAGMasterMod::MsgReceive(plMessage* msg)
|
||||
{
|
||||
plAnimCmdMsg* cmdMsg;
|
||||
plAGCmdMsg* agMsg;
|
||||
@ -768,7 +768,7 @@ hsBool plAGMasterMod::MsgReceive(plMessage* msg)
|
||||
return plModifier::MsgReceive(msg);
|
||||
}
|
||||
|
||||
void plAGMasterMod::IRegForEval(hsBool val)
|
||||
void plAGMasterMod::IRegForEval(bool val)
|
||||
{
|
||||
if (fNeedEval == val)
|
||||
return;
|
||||
@ -780,10 +780,10 @@ void plAGMasterMod::IRegForEval(hsBool val)
|
||||
plgDispatch::Dispatch()->UnRegisterForExactType(plEvalMsg::Index(), GetKey());
|
||||
}
|
||||
|
||||
hsBool plAGMasterMod::HasRunningAnims()
|
||||
bool plAGMasterMod::HasRunningAnims()
|
||||
{
|
||||
int i;
|
||||
hsBool needEval = false;
|
||||
bool needEval = false;
|
||||
for (i = 0; i < fAnimInstances.size(); i++)
|
||||
{
|
||||
if (!fAnimInstances[i]->IsFinished())
|
||||
@ -798,7 +798,7 @@ hsBool plAGMasterMod::HasRunningAnims()
|
||||
//
|
||||
// Send SDL sendState msg to object's plAGMasterSDLModifier
|
||||
//
|
||||
hsBool plAGMasterMod::DirtySynchState(const char* SDLStateName, uint32_t synchFlags)
|
||||
bool plAGMasterMod::DirtySynchState(const char* SDLStateName, uint32_t synchFlags)
|
||||
{
|
||||
if(GetNumTargets() > 0 && (!fIsGrouped || fIsGroupMaster))
|
||||
{
|
||||
|
@ -98,7 +98,7 @@ public:
|
||||
virtual ~plAGMasterMod();
|
||||
|
||||
/** Find an individual plAGModifier of the given name under our control. */
|
||||
plAGModifier * GetChannelMod(const plString & name, hsBool dontCache = false) const;
|
||||
plAGModifier * GetChannelMod(const plString & name, bool dontCache = false) const;
|
||||
|
||||
/** \name Managing Animations */
|
||||
// \{
|
||||
@ -108,13 +108,13 @@ public:
|
||||
animation will be attached at full strength. */
|
||||
plAGAnimInstance *AttachAnimationBlended(plAGAnim *anim, float blendFactor = 0,
|
||||
uint16_t blendPriority = kAGMedBlendPriority,
|
||||
hsBool cache = false);
|
||||
bool cache = false);
|
||||
|
||||
/** Look up the given animation by name and attach it
|
||||
with the given blend factor. */
|
||||
plAGAnimInstance *AttachAnimationBlended(const plString &name, float blendFactor = 0,
|
||||
uint16_t blendPriority = kAGMedBlendPriority,
|
||||
hsBool cache = false);
|
||||
bool cache = false);
|
||||
|
||||
/** Play a simple anim (one that doesn't affect root) once and auto detach.
|
||||
Intended for Zandi's facial animations that run seperate from the behaviors. */
|
||||
@ -204,13 +204,13 @@ public:
|
||||
virtual void AddTarget(plSceneObject * object);
|
||||
virtual void RemoveTarget(plSceneObject * object);
|
||||
|
||||
hsBool MsgReceive(plMessage* msg);
|
||||
bool MsgReceive(plMessage* msg);
|
||||
|
||||
virtual void Write(hsStream *stream, hsResMgr *mgr);
|
||||
virtual void Read(hsStream * stream, hsResMgr *mgr);
|
||||
|
||||
hsBool HasRunningAnims();
|
||||
hsBool DirtySynchState(const char* SDLStateName, uint32_t synchFlags);
|
||||
bool HasRunningAnims();
|
||||
bool DirtySynchState(const char* SDLStateName, uint32_t synchFlags);
|
||||
|
||||
CLASSNAME_REGISTER( plAGMasterMod );
|
||||
GETINTERFACE_ANY( plAGMasterMod, plModifier );
|
||||
@ -220,7 +220,7 @@ protected:
|
||||
plAGModifier * ICacheChannelMod(plAGModifier *mod) const;
|
||||
plAGModifier * IFindChannelMod(const plSceneObject *obj, const plString &name) const;
|
||||
|
||||
virtual hsBool IEval(double secs, float del, uint32_t dirty);
|
||||
virtual bool IEval(double secs, float del, uint32_t dirty);
|
||||
|
||||
virtual void IApplyDynamic() {}; // dummy function required by base class
|
||||
|
||||
@ -245,9 +245,9 @@ protected:
|
||||
// animations that require AnimTimeConvert state to be synched
|
||||
plInstanceVector fATCAnimInstances;
|
||||
|
||||
hsBool fFirstEval;
|
||||
hsBool fNeedEval;
|
||||
void IRegForEval(hsBool val);
|
||||
bool fFirstEval;
|
||||
bool fNeedEval;
|
||||
void IRegForEval(bool val);
|
||||
|
||||
// SDL modifier which sends/recvs dynamics state
|
||||
plAGMasterSDLModifier *fAGMasterSDLMod;
|
||||
|
@ -69,7 +69,7 @@ plAGModifier::plAGModifier()
|
||||
}
|
||||
|
||||
// CTOR(name)
|
||||
plAGModifier::plAGModifier(const plString &name, hsBool autoApply)
|
||||
plAGModifier::plAGModifier(const plString &name, bool autoApply)
|
||||
: plSingleModifier(), fAutoApply(autoApply)
|
||||
{
|
||||
fChannelName = name;
|
||||
@ -93,7 +93,7 @@ plString plAGModifier::GetChannelName() const
|
||||
}
|
||||
|
||||
// ENABLE
|
||||
void plAGModifier::Enable(hsBool val)
|
||||
void plAGModifier::Enable(bool val)
|
||||
{
|
||||
fEnabled = val;
|
||||
}
|
||||
@ -126,7 +126,7 @@ void plAGModifier::Apply(double time) const
|
||||
|
||||
// IEVAL
|
||||
// Apply our channels to our scene object
|
||||
hsBool plAGModifier::IEval(double time, float delta, uint32_t dirty)
|
||||
bool plAGModifier::IEval(double time, float delta, uint32_t dirty)
|
||||
{
|
||||
if(fAutoApply) {
|
||||
// Apply(time, delta);
|
||||
@ -234,7 +234,7 @@ plAGChannel * plAGModifier::MergeChannel(plAGApplicator *app,
|
||||
}
|
||||
|
||||
// DETACHCHANNEL
|
||||
hsBool plAGModifier::DetachChannel(plAGChannel * channel)
|
||||
bool plAGModifier::DetachChannel(plAGChannel * channel)
|
||||
{
|
||||
plAppTable::iterator i = fApps.begin();
|
||||
|
||||
|
@ -89,7 +89,7 @@ public:
|
||||
incoming channels with this modifier. You may also supply an
|
||||
autoApply parameter, which indicates whether this modifier
|
||||
should apply itself every frame, or only when explicitly asked to. */
|
||||
plAGModifier(const plString &name, hsBool autoApply = true);
|
||||
plAGModifier(const plString &name, bool autoApply = true);
|
||||
|
||||
/** It's a destructor. Destroys the name passed into the constructor,
|
||||
and a bunch of other stuff you don't need to know anything about. */
|
||||
@ -108,7 +108,7 @@ public:
|
||||
plAGChannel *MergeChannel(plAGApplicator *app, plAGChannel *chan, plScalarChannel *blend,
|
||||
plAGAnimInstance *anim, int priority);
|
||||
/** Remove the given channel. Will also remove the channel's applicator. */
|
||||
hsBool DetachChannel(plAGChannel * channel);
|
||||
bool DetachChannel(plAGChannel * channel);
|
||||
|
||||
/** Set the applicator for a modifier.
|
||||
\deprecated */
|
||||
@ -125,7 +125,7 @@ public:
|
||||
/** Get the channel tied to our ith applicator */
|
||||
plAGChannel * GetChannel(int i) { return fApps[i]->GetChannel(); }
|
||||
|
||||
void Enable(hsBool val);
|
||||
void Enable(bool val);
|
||||
|
||||
// PERSISTENCE
|
||||
virtual void Read(hsStream *stream, hsResMgr *mgr);
|
||||
@ -140,13 +140,13 @@ protected:
|
||||
plAppTable fApps; // the applicators (with respective channels) that we're applying to our scene object
|
||||
|
||||
plString fChannelName; // name used for matching animation channels to this modifier
|
||||
hsBool fAutoApply; // evaluate animation automatically during IEval call
|
||||
hsBool fEnabled; // if not enabled, we don't eval any of our anims
|
||||
bool fAutoApply; // evaluate animation automatically during IEval call
|
||||
bool fEnabled; // if not enabled, we don't eval any of our anims
|
||||
|
||||
// APPLYING THE ANIMATION
|
||||
virtual hsBool IEval(double secs, float del, uint32_t dirty);
|
||||
virtual bool IEval(double secs, float del, uint32_t dirty);
|
||||
|
||||
virtual hsBool IHandleCmd(plAnimCmdMsg* modMsg) { return false; } // only plAGMasterMod should handle these
|
||||
virtual bool IHandleCmd(plAnimCmdMsg* modMsg) { return false; } // only plAGMasterMod should handle these
|
||||
virtual void IApplyDynamic() {}; // dummy function required by base class
|
||||
|
||||
// INTERNAL ACCESSORS FOR SCENE OBJECT INTERFACES
|
||||
|
@ -288,7 +288,7 @@ plAGAnimInstance * plAnimStage::Attach(plArmatureMod *armature, plArmatureBrain
|
||||
}
|
||||
|
||||
// SENDNOTIFY
|
||||
hsBool plAnimStage::ISendNotify(uint32_t notifyMask, uint32_t notifyType, plArmatureMod *armature, plArmatureBrain *brain)
|
||||
bool plAnimStage::ISendNotify(uint32_t notifyMask, uint32_t notifyType, plArmatureMod *armature, plArmatureBrain *brain)
|
||||
{
|
||||
// make sure the user has requested this type of notify
|
||||
if(fNotify & notifyMask)
|
||||
@ -326,10 +326,10 @@ hsBool plAnimStage::ISendNotify(uint32_t notifyMask, uint32_t notifyType, plArma
|
||||
}
|
||||
|
||||
// DETACH
|
||||
hsBool plAnimStage::Detach(plArmatureMod *armature)
|
||||
bool plAnimStage::Detach(plArmatureMod *armature)
|
||||
{
|
||||
|
||||
hsBool result = false;
|
||||
bool result = false;
|
||||
|
||||
#ifdef DEBUG_MULTISTAGE
|
||||
char sbuf[256];
|
||||
@ -681,7 +681,7 @@ float plAnimStage::GetLocalTime()
|
||||
}
|
||||
|
||||
// SETLOCALTIME
|
||||
void plAnimStage::SetLocalTime(float time, hsBool noCallbacks /* = false */)
|
||||
void plAnimStage::SetLocalTime(float time, bool noCallbacks /* = false */)
|
||||
{
|
||||
fLocalTime = time;
|
||||
if(fAnimInstance)
|
||||
@ -766,9 +766,9 @@ void plAnimStage::Read(hsStream *stream, hsResMgr *mgr)
|
||||
fRegressType = (RegressType)stream->ReadLE32();
|
||||
fLoops = stream->ReadLE32();
|
||||
|
||||
fDoAdvanceTo = stream->Readbool();
|
||||
fDoAdvanceTo = stream->ReadBool();
|
||||
fAdvanceTo = stream->ReadLE32();
|
||||
fDoRegressTo = stream->Readbool();
|
||||
fDoRegressTo = stream->ReadBool();
|
||||
fRegressTo = stream->ReadLE32();
|
||||
}
|
||||
|
||||
@ -782,9 +782,9 @@ void plAnimStage::Write(hsStream *stream, hsResMgr *mgr)
|
||||
stream->WriteLE32(fRegressType);
|
||||
stream->WriteLE32(fLoops);
|
||||
|
||||
stream->Writebool(fDoAdvanceTo);
|
||||
stream->WriteBool(fDoAdvanceTo);
|
||||
stream->WriteLE32(fAdvanceTo);
|
||||
stream->Writebool(fDoRegressTo);
|
||||
stream->WriteBool(fDoRegressTo);
|
||||
stream->WriteLE32(fRegressTo);
|
||||
}
|
||||
|
||||
@ -795,7 +795,7 @@ void plAnimStage::SaveAux(hsStream *stream, hsResMgr *mgr)
|
||||
stream->WriteLEScalar(fLocalTime);
|
||||
stream->WriteLEScalar(fLength);
|
||||
stream->WriteLE32(fCurLoop);
|
||||
stream->Writebool(fAttached);
|
||||
stream->WriteBool(fAttached);
|
||||
// no ephemeral stage at the moment
|
||||
}
|
||||
|
||||
@ -805,8 +805,6 @@ void plAnimStage::LoadAux(hsStream *stream, hsResMgr *mgr, double time)
|
||||
fLocalTime = stream->ReadLEScalar();
|
||||
fLength = stream->ReadLEScalar();
|
||||
fCurLoop = stream->ReadLE32();
|
||||
// This should actually be Readbool (lowercase), but I won't fix it since that
|
||||
// would require a version change
|
||||
fAttached = (stream->Readbool() != 0);
|
||||
fAttached = stream->ReadBool();
|
||||
}
|
||||
|
||||
|
@ -194,7 +194,7 @@ public:
|
||||
const plAnimStage& operator=(const plAnimStage& src);
|
||||
|
||||
plAGAnimInstance * Attach(plArmatureMod *armature, plArmatureBrain *brain, float initialBlend, double time);
|
||||
int Detach(plArmatureMod *armature);
|
||||
bool Detach(plArmatureMod *armature);
|
||||
void Reset(double time, plArmatureMod *avMod, bool atStart);
|
||||
void ResetAtTime(double time, float localTime, plArmatureMod *avMod);
|
||||
bool MoveRelative(double worldTime, float delta, float &overage, plArmatureMod *avMod);
|
||||
@ -217,7 +217,7 @@ public:
|
||||
int GetLoopValue();
|
||||
void SetLoopValue(int loop);
|
||||
float GetLocalTime();
|
||||
void SetLocalTime(float time, hsBool noCallbacks = false);
|
||||
void SetLocalTime(float time, bool noCallbacks = false);
|
||||
float GetLength();
|
||||
|
||||
void SetMod(plMultistageBehMod* p) { fMod = p; } // for returning ID#'s to python scripts:
|
||||
@ -252,7 +252,7 @@ protected:
|
||||
bool ITryAdvance(plArmatureMod *avMod);
|
||||
bool ITryRegress(plArmatureMod *avMod);
|
||||
|
||||
hsBool ISendNotify(uint32_t notifyMask, uint32_t notifyType, plArmatureMod *armature, plArmatureBrain *brain);
|
||||
bool ISendNotify(uint32_t notifyMask, uint32_t notifyType, plArmatureMod *armature, plArmatureBrain *brain);
|
||||
|
||||
char *fAnimName; // the name of our animation
|
||||
uint8_t fNotify; // flags for which events will cause notification events
|
||||
|
@ -61,14 +61,14 @@ public:
|
||||
|
||||
void SetSurface(plSwimRegionInterface *region, float surfaceHeight);
|
||||
float GetBuoyancy() { return fBuoyancy; }
|
||||
hsBool IsOnGround() { return fOnGround; }
|
||||
hsBool HadContacts() { return fHadContacts; }
|
||||
bool IsOnGround() { return fOnGround; }
|
||||
bool HadContacts() { return fHadContacts; }
|
||||
|
||||
protected:
|
||||
void IAdjustBuoyancy();
|
||||
|
||||
hsBool fOnGround;
|
||||
hsBool fHadContacts;
|
||||
bool fOnGround;
|
||||
bool fHadContacts;
|
||||
float fBuoyancy;
|
||||
float fSurfaceHeight;
|
||||
plSwimRegionInterface *fCurrentRegion;
|
||||
|
@ -104,7 +104,7 @@ void plArmatureEffectsMgr::Write(hsStream *s, hsResMgr *mgr)
|
||||
mgr->WriteKey(s, fEffects[i]->GetKey());
|
||||
}
|
||||
|
||||
hsBool plArmatureEffectsMgr::MsgReceive(plMessage* msg)
|
||||
bool plArmatureEffectsMgr::MsgReceive(plMessage* msg)
|
||||
{
|
||||
plEventCallbackInterceptMsg *iMsg = plEventCallbackInterceptMsg::ConvertNoRef(msg);
|
||||
if (iMsg)
|
||||
@ -238,7 +238,7 @@ void plArmatureEffectFootSound::Write(hsStream* s, hsResMgr* mgr)
|
||||
mgr->WriteKey(s, (fMods[i] ? fMods[i]->GetKey() : nil));
|
||||
}
|
||||
|
||||
hsBool plArmatureEffectFootSound::MsgReceive(plMessage* msg)
|
||||
bool plArmatureEffectFootSound::MsgReceive(plMessage* msg)
|
||||
{
|
||||
plGenRefMsg *refMsg = plGenRefMsg::ConvertNoRef(msg);
|
||||
if (refMsg)
|
||||
@ -260,7 +260,7 @@ hsBool plArmatureEffectFootSound::MsgReceive(plMessage* msg)
|
||||
return plArmatureEffect::MsgReceive(msg);
|
||||
}
|
||||
|
||||
hsBool plArmatureEffectFootSound::HandleTrigger(plMessage* msg)
|
||||
bool plArmatureEffectFootSound::HandleTrigger(plMessage* msg)
|
||||
{
|
||||
plArmatureEffectMsg *eMsg = plArmatureEffectMsg::ConvertNoRef(msg);
|
||||
if (eMsg)
|
||||
|
@ -62,7 +62,7 @@ class plArmatureEffectsMgr : public hsKeyedObject
|
||||
{
|
||||
protected:
|
||||
hsTArray<plArmatureEffect *> fEffects;
|
||||
hsBool fEnabled;
|
||||
bool fEnabled;
|
||||
|
||||
public:
|
||||
|
||||
@ -75,7 +75,7 @@ public:
|
||||
virtual void Read(hsStream* s, hsResMgr* mgr);
|
||||
virtual void Write(hsStream* s, hsResMgr* mgr);
|
||||
|
||||
virtual hsBool MsgReceive(plMessage* msg);
|
||||
virtual bool MsgReceive(plMessage* msg);
|
||||
|
||||
uint32_t GetNumEffects();
|
||||
plArmatureEffect *GetEffect(uint32_t num);
|
||||
@ -119,7 +119,7 @@ public:
|
||||
CLASSNAME_REGISTER( plArmatureEffect );
|
||||
GETINTERFACE_ANY( plArmatureEffect, hsKeyedObject );
|
||||
|
||||
virtual hsBool HandleTrigger(plMessage* msg) = 0;
|
||||
virtual bool HandleTrigger(plMessage* msg) = 0;
|
||||
virtual void Reset() {}
|
||||
};
|
||||
|
||||
@ -149,8 +149,8 @@ public:
|
||||
virtual void Read(hsStream* s, hsResMgr* mgr);
|
||||
virtual void Write(hsStream* s, hsResMgr* mgr);
|
||||
|
||||
virtual hsBool MsgReceive(plMessage* msg);
|
||||
virtual hsBool HandleTrigger(plMessage* msg);
|
||||
virtual bool MsgReceive(plMessage* msg);
|
||||
virtual bool HandleTrigger(plMessage* msg);
|
||||
virtual void Reset();
|
||||
void SetFootType(uint8_t);
|
||||
|
||||
|
@ -147,9 +147,9 @@ plArmatureModBase::~plArmatureModBase()
|
||||
}
|
||||
}
|
||||
|
||||
hsBool plArmatureModBase::MsgReceive(plMessage* msg)
|
||||
bool plArmatureModBase::MsgReceive(plMessage* msg)
|
||||
{
|
||||
hsBool result = false;
|
||||
bool result = false;
|
||||
|
||||
plArmatureBrain *curBrain = nil;
|
||||
if (fBrains.size() > 0)
|
||||
@ -184,7 +184,7 @@ void plArmatureModBase::RemoveTarget(plSceneObject* so)
|
||||
plAGMasterMod::RemoveTarget(so);
|
||||
}
|
||||
|
||||
hsBool plArmatureModBase::IEval(double time, float elapsed, uint32_t dirty)
|
||||
bool plArmatureModBase::IEval(double time, float elapsed, uint32_t dirty)
|
||||
{
|
||||
if (IsFinal())
|
||||
{
|
||||
@ -193,7 +193,7 @@ hsBool plArmatureModBase::IEval(double time, float elapsed, uint32_t dirty)
|
||||
plArmatureBrain *curBrain = fBrains.back();
|
||||
if (curBrain)
|
||||
{
|
||||
hsBool result = curBrain->Apply(time, elapsed);
|
||||
bool result = curBrain->Apply(time, elapsed);
|
||||
if (!result)
|
||||
{
|
||||
PopBrain();
|
||||
@ -271,7 +271,7 @@ void plArmatureModBase::AddressMessageToDescendants(const plCoordinateInterface
|
||||
AddressMessageToDescendants(CI->GetChild(i), msg);
|
||||
}
|
||||
|
||||
void plArmatureModBase::EnableDrawingTree(const plSceneObject *object, hsBool status)
|
||||
void plArmatureModBase::EnableDrawingTree(const plSceneObject *object, bool status)
|
||||
{
|
||||
if (!object)
|
||||
return;
|
||||
@ -296,7 +296,7 @@ plKey plArmatureModBase::GetWorldKey() const
|
||||
return nil;
|
||||
}
|
||||
|
||||
hsBool plArmatureModBase::ValidatePhysics()
|
||||
bool plArmatureModBase::ValidatePhysics()
|
||||
{
|
||||
if (!fTarget)
|
||||
return false;
|
||||
@ -310,7 +310,7 @@ hsBool plArmatureModBase::ValidatePhysics()
|
||||
return !(fWaitFlags & kNeedPhysics);
|
||||
}
|
||||
|
||||
hsBool plArmatureModBase::ValidateMesh()
|
||||
bool plArmatureModBase::ValidateMesh()
|
||||
{
|
||||
if (fWaitFlags & kNeedMesh)
|
||||
{
|
||||
@ -327,7 +327,7 @@ hsBool plArmatureModBase::ValidateMesh()
|
||||
fWaitFlags |= kNeedMesh;
|
||||
break;
|
||||
}
|
||||
hsBool visible = (i == fCurLOD ? true : false);
|
||||
bool visible = (i == fCurLOD ? true : false);
|
||||
EnableDrawingTree(meshObj, visible);
|
||||
}
|
||||
}
|
||||
@ -418,7 +418,7 @@ void plArmatureModBase::LeaveAge()
|
||||
}
|
||||
}
|
||||
|
||||
hsBool plArmatureModBase::IsFinal()
|
||||
bool plArmatureModBase::IsFinal()
|
||||
{
|
||||
return !fWaitFlags;
|
||||
}
|
||||
@ -447,7 +447,7 @@ void plArmatureModBase::AdjustLOD()
|
||||
}
|
||||
|
||||
// Should always be called from AdjustLOD
|
||||
hsBool plArmatureModBase::SetLOD(int iNewLOD)
|
||||
bool plArmatureModBase::SetLOD(int iNewLOD)
|
||||
{
|
||||
if (iNewLOD >= fMeshKeys.size())
|
||||
iNewLOD = fMeshKeys.size() - 1;
|
||||
@ -512,14 +512,14 @@ uint8_t plArmatureModBase::GetNumLOD() const
|
||||
return fMeshKeys.size();
|
||||
}
|
||||
|
||||
void plArmatureModBase::EnablePhysics(hsBool status, uint16_t reason /* = kDisableReasonUnknown */)
|
||||
void plArmatureModBase::EnablePhysics(bool status, uint16_t reason /* = kDisableReasonUnknown */)
|
||||
{
|
||||
if (status)
|
||||
fDisabledPhysics &= ~reason;
|
||||
else
|
||||
fDisabledPhysics |= reason;
|
||||
|
||||
hsBool newStatus = !fDisabledPhysics;
|
||||
bool newStatus = !fDisabledPhysics;
|
||||
|
||||
if (fController)
|
||||
fController->Enable(newStatus);
|
||||
@ -532,21 +532,21 @@ void plArmatureModBase::EnablePhysics(hsBool status, uint16_t reason /* = kDisab
|
||||
// Disabling Kinematics (state=false) means:
|
||||
// - all outside forces will affect us and collisions on
|
||||
// i.e. normal enabled physical
|
||||
void plArmatureModBase::EnablePhysicsKinematic(hsBool status)
|
||||
void plArmatureModBase::EnablePhysicsKinematic(bool status)
|
||||
{
|
||||
if (fController)
|
||||
fController->Kinematic(status);
|
||||
}
|
||||
|
||||
void plArmatureModBase::EnableDrawing(hsBool status, uint16_t reason /* = kDisableReasonUnknown */)
|
||||
void plArmatureModBase::EnableDrawing(bool status, uint16_t reason /* = kDisableReasonUnknown */)
|
||||
{
|
||||
hsBool oldStatus = !fDisabledDraw;
|
||||
bool oldStatus = !fDisabledDraw;
|
||||
if (status)
|
||||
fDisabledDraw &= ~reason;
|
||||
else
|
||||
fDisabledDraw |= reason;
|
||||
|
||||
hsBool newStatus = !fDisabledDraw;
|
||||
bool newStatus = !fDisabledDraw;
|
||||
if (oldStatus == newStatus)
|
||||
return;
|
||||
|
||||
@ -613,7 +613,7 @@ void plArmatureModBase::ICustomizeApplicator()
|
||||
}
|
||||
}
|
||||
|
||||
void plArmatureModBase::IEnableBones(int lod, hsBool enable)
|
||||
void plArmatureModBase::IEnableBones(int lod, bool enable)
|
||||
{
|
||||
if (lod < fUnusedBones.size())
|
||||
{
|
||||
@ -629,7 +629,7 @@ void plArmatureModBase::IEnableBones(int lod, hsBool enable)
|
||||
const char *plArmatureMod::BoneStrings[] = {"Male", "Female", "Critter", "Actor"};
|
||||
|
||||
float plArmatureMod::fMouseTurnSensitivity = 1.f;
|
||||
hsBool plArmatureMod::fClickToTurn = true;
|
||||
bool plArmatureMod::fClickToTurn = true;
|
||||
|
||||
void plArmatureMod::IInitDefaults()
|
||||
{
|
||||
@ -927,7 +927,7 @@ void plArmatureMod::UnRegisterForBehaviorNotify(plKey key)
|
||||
fNotifyKeys.RemoveItem(key);
|
||||
}
|
||||
|
||||
void plArmatureMod::IFireBehaviorNotify(uint32_t type, hsBool behaviorStart)
|
||||
void plArmatureMod::IFireBehaviorNotify(uint32_t type, bool behaviorStart)
|
||||
{
|
||||
if (fNotifyKeys.GetCount() > 0)
|
||||
{
|
||||
@ -940,7 +940,7 @@ void plArmatureMod::IFireBehaviorNotify(uint32_t type, hsBool behaviorStart)
|
||||
}
|
||||
}
|
||||
|
||||
void plArmatureMod::EnterAge(hsBool reSpawn)
|
||||
void plArmatureMod::EnterAge(bool reSpawn)
|
||||
{
|
||||
fMidLink = false;
|
||||
fAlreadyPanicLinking = false;
|
||||
@ -1002,7 +1002,7 @@ void plArmatureMod::LeaveAge()
|
||||
ClearInputFlags(true, false);
|
||||
}
|
||||
|
||||
void plArmatureMod::PanicLink(hsBool playLinkOutAnim /* = true */)
|
||||
void plArmatureMod::PanicLink(bool playLinkOutAnim /* = true */)
|
||||
{
|
||||
// console override... just go back to the beginning
|
||||
if (fDontPanicLink)
|
||||
@ -1065,9 +1065,9 @@ void plArmatureMod::PersonalLink()
|
||||
}
|
||||
}
|
||||
|
||||
hsBool plArmatureMod::MsgReceive(plMessage* msg)
|
||||
bool plArmatureMod::MsgReceive(plMessage* msg)
|
||||
{
|
||||
hsBool result = false;
|
||||
bool result = false;
|
||||
|
||||
plArmatureBrain *curBrain = nil;
|
||||
if (fBrains.size() > 0)
|
||||
@ -1169,8 +1169,8 @@ hsBool plArmatureMod::MsgReceive(plMessage* msg)
|
||||
plEnableMsg *enMsg = plEnableMsg::ConvertNoRef(msg);
|
||||
if(enMsg && enMsg->Type(plEnableMsg::kDrawable))
|
||||
{
|
||||
hsBool enable = enMsg->Cmd(plEnableMsg::kEnable);
|
||||
hsBool disable = enMsg->Cmd(plEnableMsg::kDisable);
|
||||
bool enable = enMsg->Cmd(plEnableMsg::kEnable);
|
||||
bool disable = enMsg->Cmd(plEnableMsg::kDisable);
|
||||
|
||||
hsAssert(enable != disable, "Conflicting or missing commands to enable message");
|
||||
|
||||
@ -1278,7 +1278,7 @@ hsBool plArmatureMod::MsgReceive(plMessage* msg)
|
||||
plLoadAvatarMsg *avLoadMsg = plLoadAvatarMsg::ConvertNoRef(msg);
|
||||
if (avLoadMsg)
|
||||
{
|
||||
hsBool isPlayer = avLoadMsg->GetIsPlayer();
|
||||
bool isPlayer = avLoadMsg->GetIsPlayer();
|
||||
if (!isPlayer)
|
||||
plgDispatch::Dispatch()->UnRegisterForExactType(plAgeLoadedMsg::Index(), GetKey());
|
||||
|
||||
@ -1406,7 +1406,7 @@ hsBool plArmatureMod::MsgReceive(plMessage* msg)
|
||||
return plAGMasterMod::MsgReceive(msg);
|
||||
}
|
||||
|
||||
hsBool plArmatureMod::IHandleControlMsg(plControlEventMsg* pMsg)
|
||||
bool plArmatureMod::IHandleControlMsg(plControlEventMsg* pMsg)
|
||||
{
|
||||
// Slight change in design here...
|
||||
// Avatar input control messages are only sent locally.
|
||||
@ -1427,7 +1427,7 @@ hsBool plArmatureMod::IHandleControlMsg(plControlEventMsg* pMsg)
|
||||
{
|
||||
ControlEventCode moveCode = pMsg->GetControlCode();
|
||||
|
||||
hsBool flagChanged = false;
|
||||
bool flagChanged = false;
|
||||
if(pMsg->ControlActivated())
|
||||
{
|
||||
if (moveCode == B_CONTROL_TURN_TO && fClickToTurn)
|
||||
@ -1543,7 +1543,7 @@ void plArmatureMod::ILinkToPersonalAge()
|
||||
pMsg->Send();
|
||||
}
|
||||
|
||||
hsBool plArmatureMod::IEval(double time, float elapsed, uint32_t dirty)
|
||||
bool plArmatureMod::IEval(double time, float elapsed, uint32_t dirty)
|
||||
{
|
||||
if (IsFinal())
|
||||
{
|
||||
@ -1563,7 +1563,7 @@ hsBool plArmatureMod::IEval(double time, float elapsed, uint32_t dirty)
|
||||
}
|
||||
else // Bookkeeping for the local player...
|
||||
{
|
||||
hsBool update = false;
|
||||
bool update = false;
|
||||
if (fOldRegionsICareAbout != fRegionsICareAbout)
|
||||
{
|
||||
update = true;
|
||||
@ -1830,7 +1830,7 @@ void plArmatureMod::Read(hsStream * stream, hsResMgr *mgr)
|
||||
plgDispatch::Dispatch()->RegisterForExactType(plAvatarStealthModeMsg::Index(), GetKey());
|
||||
}
|
||||
|
||||
hsBool plArmatureMod::DirtySynchState(const char* SDLStateName, uint32_t synchFlags)
|
||||
bool plArmatureMod::DirtySynchState(const char* SDLStateName, uint32_t synchFlags)
|
||||
{
|
||||
// skip requests to synch non-avatar state
|
||||
if (SDLStateName && stricmp(SDLStateName, kSDLAvatar))
|
||||
@ -1849,7 +1849,7 @@ hsBool plArmatureMod::DirtySynchState(const char* SDLStateName, uint32_t synchFl
|
||||
return false;
|
||||
}
|
||||
|
||||
hsBool plArmatureMod::DirtyPhysicalSynchState(uint32_t synchFlags)
|
||||
bool plArmatureMod::DirtyPhysicalSynchState(uint32_t synchFlags)
|
||||
{
|
||||
synchFlags |= plSynchedObject::kForceFullSend; // TEMP
|
||||
synchFlags |= plSynchedObject::kBCastToClients;
|
||||
@ -1945,12 +1945,12 @@ void plArmatureMod::NetworkSynch(double timeNow, int force)
|
||||
fPendingSynch = true;
|
||||
}
|
||||
|
||||
hsBool plArmatureMod::IsLocalAvatar()
|
||||
bool plArmatureMod::IsLocalAvatar()
|
||||
{
|
||||
return plAvatarMgr::GetInstance()->GetLocalAvatar() == this;
|
||||
}
|
||||
|
||||
hsBool plArmatureMod::IsLocalAI()
|
||||
bool plArmatureMod::IsLocalAI()
|
||||
{
|
||||
// Formerly a lot of silly cached rigamaroll... Now, we'll just rely
|
||||
// on the fact that one player is the game master. HACK TURD if net groups
|
||||
@ -1988,7 +1988,7 @@ plLayerLinkAnimation *plArmatureMod::IFindLayerLinkAnim()
|
||||
return nil;
|
||||
}
|
||||
|
||||
hsBool plArmatureMod::ValidatePhysics()
|
||||
bool plArmatureMod::ValidatePhysics()
|
||||
{
|
||||
if (!fTarget)
|
||||
return false;
|
||||
@ -2019,7 +2019,7 @@ hsBool plArmatureMod::ValidatePhysics()
|
||||
|
||||
}
|
||||
|
||||
hsBool plArmatureMod::ValidateMesh()
|
||||
bool plArmatureMod::ValidateMesh()
|
||||
{
|
||||
if (fWaitFlags & kNeedMesh)
|
||||
{
|
||||
@ -2036,7 +2036,7 @@ hsBool plArmatureMod::ValidateMesh()
|
||||
fWaitFlags |= kNeedMesh;
|
||||
break;
|
||||
}
|
||||
hsBool visible = (i == fCurLOD) ? true : false;
|
||||
bool visible = (i == fCurLOD) ? true : false;
|
||||
|
||||
EnableDrawingTree(meshObj, visible);
|
||||
|
||||
@ -2155,12 +2155,12 @@ void plArmatureMod::RestoreInputState()
|
||||
|
||||
}
|
||||
|
||||
hsBool plArmatureMod::GetInputFlag (int which) const
|
||||
bool plArmatureMod::GetInputFlag (int which) const
|
||||
{
|
||||
return fMoveFlags.IsBitSet(which);
|
||||
}
|
||||
|
||||
void plArmatureMod::SetInputFlag(int which, hsBool status)
|
||||
void plArmatureMod::SetInputFlag(int which, bool status)
|
||||
{
|
||||
if(status)
|
||||
{
|
||||
@ -2170,7 +2170,7 @@ void plArmatureMod::SetInputFlag(int which, hsBool status)
|
||||
}
|
||||
}
|
||||
|
||||
hsBool plArmatureMod::HasMovementFlag() const
|
||||
bool plArmatureMod::HasMovementFlag() const
|
||||
{
|
||||
return (fMoveFlags.IsBitSet(B_CONTROL_MOVE_FORWARD) ||
|
||||
fMoveFlags.IsBitSet(B_CONTROL_MOVE_BACKWARD) ||
|
||||
@ -2306,7 +2306,7 @@ void plArmatureMod::SetReverseFBOnIdle(bool val)
|
||||
SetInputFlag(B_CONTROL_LADDER_INVERTED, false);
|
||||
}
|
||||
|
||||
hsBool plArmatureMod::IsFBReversed()
|
||||
bool plArmatureMod::IsFBReversed()
|
||||
{
|
||||
return GetInputFlag(B_CONTROL_LADDER_INVERTED);
|
||||
}
|
||||
@ -2409,7 +2409,7 @@ void plArmatureMod::ISetupMarkerCallbacks(plATCAnim *anim, plAnimTimeConvert *at
|
||||
{
|
||||
|
||||
float time = -1;
|
||||
hsBool isLeft = false;
|
||||
bool isLeft = false;
|
||||
if (markers[i].Find("SndLeftFootDown") == 0)
|
||||
{
|
||||
isLeft = true;
|
||||
@ -2484,7 +2484,7 @@ int8_t plArmatureMod::AnimNameToIndex(const plString &name)
|
||||
return result;
|
||||
}
|
||||
|
||||
hsBool plArmatureMod::IsInStealthMode() const
|
||||
bool plArmatureMod::IsInStealthMode() const
|
||||
{
|
||||
return (fStealthMode != plAvatarStealthModeMsg::kStealthVisible);
|
||||
}
|
||||
@ -2504,7 +2504,7 @@ bool plArmatureMod::IsLinkedIn()
|
||||
return fIsLinkedIn;
|
||||
}
|
||||
|
||||
hsBool plArmatureMod::ConsumeJump()
|
||||
bool plArmatureMod::ConsumeJump()
|
||||
{
|
||||
if (!GetInputFlag(B_CONTROL_CONSUMABLE_JUMP))
|
||||
return false;
|
||||
|
@ -109,28 +109,28 @@ public:
|
||||
CLASSNAME_REGISTER( plArmatureModBase );
|
||||
GETINTERFACE_ANY( plArmatureModBase, plAGMasterMod );
|
||||
|
||||
virtual hsBool MsgReceive(plMessage* msg);
|
||||
virtual bool MsgReceive(plMessage* msg);
|
||||
virtual void AddTarget(plSceneObject* so);
|
||||
virtual void RemoveTarget(plSceneObject* so);
|
||||
virtual hsBool IEval(double secs, float del, uint32_t dirty);
|
||||
virtual bool IEval(double secs, float del, uint32_t dirty);
|
||||
virtual void Read(hsStream *stream, hsResMgr *mgr);
|
||||
virtual void Write(hsStream *stream, hsResMgr *mgr);
|
||||
|
||||
plMatrixDifferenceApp *GetRootAnimator() { return fRootAnimator; }
|
||||
plPhysicalControllerCore* GetController() const { return fController; }
|
||||
plKey GetWorldKey() const;
|
||||
virtual hsBool ValidatePhysics();
|
||||
virtual hsBool ValidateMesh();
|
||||
virtual bool ValidatePhysics();
|
||||
virtual bool ValidateMesh();
|
||||
virtual void PushBrain(plArmatureBrain *brain);
|
||||
virtual void PopBrain();
|
||||
plArmatureBrain *GetCurrentBrain() const;
|
||||
plDrawable *FindDrawable() const;
|
||||
virtual void LeaveAge();
|
||||
virtual hsBool IsFinal();
|
||||
virtual bool IsFinal();
|
||||
|
||||
// LOD stuff
|
||||
void AdjustLOD(); // see if we need to switch to a different resolution
|
||||
hsBool SetLOD(int newLOD); // switch to a different resolution
|
||||
bool SetLOD(int newLOD); // switch to a different resolution
|
||||
void RefreshTree(); // Resend an LOD update to all our nodes (for when geometry changes)
|
||||
int AppendMeshKey(plKey meshKey);
|
||||
int AppendBoneVec(plKeyVector *boneVec);
|
||||
@ -147,15 +147,15 @@ public:
|
||||
kDisableReasonVehicle = 0x0010,
|
||||
kDisableReasonGenericBrain = 0x0020,
|
||||
};
|
||||
void EnablePhysics(hsBool status, uint16_t reason = kDisableReasonUnknown);
|
||||
void EnablePhysicsKinematic(hsBool status);
|
||||
void EnableDrawing(hsBool status, uint16_t reason = kDisableReasonUnknown);
|
||||
hsBool IsPhysicsEnabled() { return fDisabledPhysics == 0; }
|
||||
hsBool IsDrawEnabled() { return fDisabledDraw == 0; }
|
||||
void EnablePhysics(bool status, uint16_t reason = kDisableReasonUnknown);
|
||||
void EnablePhysicsKinematic(bool status);
|
||||
void EnableDrawing(bool status, uint16_t reason = kDisableReasonUnknown);
|
||||
bool IsPhysicsEnabled() { return fDisabledPhysics == 0; }
|
||||
bool IsDrawEnabled() { return fDisabledDraw == 0; }
|
||||
|
||||
|
||||
static void AddressMessageToDescendants(const plCoordinateInterface * CI, plMessage *msg);
|
||||
static void EnableDrawingTree(const plSceneObject *object, hsBool status);
|
||||
static void EnableDrawingTree(const plSceneObject *object, bool status);
|
||||
|
||||
static int fMinLOD; // throttle for lowest-indexed LOD
|
||||
static double fLODDistance; // Distance for first LOD switch 2nd is 2x this distance (for now)
|
||||
@ -163,7 +163,7 @@ public:
|
||||
protected:
|
||||
virtual void IFinalize();
|
||||
virtual void ICustomizeApplicator();
|
||||
void IEnableBones(int lod, hsBool enable);
|
||||
void IEnableBones(int lod, bool enable);
|
||||
|
||||
// Some of these flags are only needed by derived classes, but I just want
|
||||
// the one waitFlags variable.
|
||||
@ -204,23 +204,23 @@ public:
|
||||
CLASSNAME_REGISTER( plArmatureMod );
|
||||
GETINTERFACE_ANY( plArmatureMod, plArmatureModBase );
|
||||
|
||||
virtual hsBool MsgReceive(plMessage* msg);
|
||||
virtual bool MsgReceive(plMessage* msg);
|
||||
virtual void AddTarget(plSceneObject* so);
|
||||
virtual void RemoveTarget(plSceneObject* so);
|
||||
virtual hsBool IEval(double secs, float del, uint32_t dirty);
|
||||
virtual bool IEval(double secs, float del, uint32_t dirty);
|
||||
virtual void Read(hsStream *stream, hsResMgr *mgr);
|
||||
virtual void Write(hsStream *stream, hsResMgr *mgr);
|
||||
|
||||
virtual hsBool ValidatePhysics();
|
||||
virtual hsBool ValidateMesh();
|
||||
virtual bool ValidatePhysics();
|
||||
virtual bool ValidateMesh();
|
||||
|
||||
// Get or set the position of the avatar in simulation space. Set any
|
||||
// arguments you don't care about to nil.
|
||||
void SetPositionAndRotationSim(const hsPoint3* position, const hsQuat* rotation);
|
||||
void GetPositionAndRotationSim(hsPoint3* position, hsQuat* rotation);
|
||||
|
||||
hsBool IsLocalAvatar();
|
||||
hsBool IsLocalAI();
|
||||
bool IsLocalAvatar();
|
||||
bool IsLocalAI();
|
||||
virtual const plSceneObject *FindBone(const plString & name) const;
|
||||
virtual const plSceneObject *FindBone(uint32_t id) const; // use an id from an appropriate taxonomy, such as plAvBrainHuman::BoneID
|
||||
virtual void AddBoneMapping(uint32_t id, const plSceneObject *bone);
|
||||
@ -229,9 +229,9 @@ public:
|
||||
|
||||
virtual void Spawn(double timeNow);
|
||||
virtual void SpawnAt(int which, double timeNow);
|
||||
virtual void EnterAge(hsBool reSpawn);
|
||||
virtual void EnterAge(bool reSpawn);
|
||||
virtual void LeaveAge();
|
||||
virtual void PanicLink(hsBool playLinkOutAnim = true);
|
||||
virtual void PanicLink(bool playLinkOutAnim = true);
|
||||
virtual void PersonalLink();
|
||||
|
||||
virtual bool ToggleDontPanicLinkFlag() { fDontPanicLink = fDontPanicLink ? false : true; return fDontPanicLink; }
|
||||
@ -249,15 +249,15 @@ public:
|
||||
void IProcessQueuedInput();
|
||||
void PreserveInputState();
|
||||
void RestoreInputState();
|
||||
hsBool GetInputFlag(int f) const;
|
||||
void SetInputFlag(int which, hsBool status);
|
||||
bool GetInputFlag(int f) const;
|
||||
void SetInputFlag(int which, bool status);
|
||||
void ClearInputFlags(bool saveAlwaysRun, bool clearBackup);
|
||||
hsBool HasMovementFlag() const; // Is any *movement* input flag on?
|
||||
bool HasMovementFlag() const; // Is any *movement* input flag on?
|
||||
float GetTurnStrength() const;
|
||||
float GetKeyTurnStrength() const;
|
||||
float GetAnalogTurnStrength() const;
|
||||
void SetReverseFBOnIdle(bool val);
|
||||
hsBool IsFBReversed();
|
||||
bool IsFBReversed();
|
||||
|
||||
bool ForwardKeyDown() const;
|
||||
bool BackwardKeyDown() const;
|
||||
@ -282,8 +282,8 @@ public:
|
||||
|
||||
void SynchIfLocal(double timeNow, int force); // Just physical state
|
||||
void SynchInputState(uint32_t rcvID = kInvalidPlayerID);
|
||||
hsBool DirtySynchState(const char* SDLStateName, uint32_t synchFlags );
|
||||
hsBool DirtyPhysicalSynchState(uint32_t synchFlags);
|
||||
bool DirtySynchState(const char* SDLStateName, uint32_t synchFlags );
|
||||
bool DirtyPhysicalSynchState(uint32_t synchFlags);
|
||||
plClothingOutfit *GetClothingOutfit() const { return fClothingOutfit; }
|
||||
plClothingSDLModifier *GetClothingSDLMod() const { return fClothingSDLMod; }
|
||||
const plSceneObject *GetClothingSO(uint8_t lod) const;
|
||||
@ -310,19 +310,19 @@ public:
|
||||
|
||||
int RefreshDebugDisplay();
|
||||
void DumpToDebugDisplay(int &x, int &y, int lineHeight, char *strBuf, plDebugText &debugTxt);
|
||||
void SetDebugState(hsBool state) { fDebugOn = (state != 0); }
|
||||
void SetDebugState(bool state) { fDebugOn = (state != 0); }
|
||||
bool GetDebugState() { return fDebugOn; }
|
||||
|
||||
virtual void RefreshTree() {}
|
||||
hsBool IsInStealthMode() const;
|
||||
bool IsInStealthMode() const;
|
||||
int GetStealthLevel() const { return fStealthLevel; }
|
||||
|
||||
bool IsOpaque();
|
||||
bool IsLinkedIn();
|
||||
bool IsMidLink();
|
||||
hsBool ConsumeJump(); // returns true if the jump keypress was available to consume
|
||||
bool ConsumeJump(); // returns true if the jump keypress was available to consume
|
||||
|
||||
void SendBehaviorNotify(uint32_t type, hsBool start = true) { IFireBehaviorNotify(type,start); }
|
||||
void SendBehaviorNotify(uint32_t type, bool start = true) { IFireBehaviorNotify(type,start); }
|
||||
// Discovered a bug which makes these values horribly out of scale. So we do the rescale
|
||||
// in the Get/Set functions for backwards compatability.
|
||||
static void SetMouseTurnSensitivity(float val) { fMouseTurnSensitivity = val / 150.f; }
|
||||
@ -363,7 +363,7 @@ public:
|
||||
plMatrixDelayedCorrectionApplicator *fBoneRootAnimator;
|
||||
|
||||
static const float kAvatarInputSynchThreshold;
|
||||
static hsBool fClickToTurn;
|
||||
static bool fClickToTurn;
|
||||
static const char *BoneStrings[];
|
||||
|
||||
void SetPhysicalDims(float height, float width) { fPhysHeight = height; fPhysWidth = width; }
|
||||
@ -381,8 +381,8 @@ protected:
|
||||
virtual void ISetupMarkerCallbacks(plATCAnim *anim, plAnimTimeConvert *atc);
|
||||
|
||||
void NetworkSynch(double timeNow, int force = 0);
|
||||
hsBool IHandleControlMsg(plControlEventMsg* pMsg);
|
||||
void IFireBehaviorNotify(uint32_t type, hsBool behaviorStart = true);
|
||||
bool IHandleControlMsg(plControlEventMsg* pMsg);
|
||||
void IFireBehaviorNotify(uint32_t type, bool behaviorStart = true);
|
||||
void IHandleInputStateMsg(plAvatarInputStateMsg *msg);
|
||||
void ILinkToPersonalAge();
|
||||
int IFindSpawnOverride(void);
|
||||
|
@ -55,7 +55,7 @@ plArmatureBehavior::~plArmatureBehavior()
|
||||
fAnim->Detach();
|
||||
}
|
||||
|
||||
void plArmatureBehavior::Init(plAGAnim *anim, hsBool loop, plArmatureBrain *brain, plArmatureModBase *armature, uint8_t index)
|
||||
void plArmatureBehavior::Init(plAGAnim *anim, bool loop, plArmatureBrain *brain, plArmatureModBase *armature, uint8_t index)
|
||||
{
|
||||
fArmature = armature;
|
||||
fBrain = brain;
|
||||
|
@ -60,7 +60,7 @@ public:
|
||||
plArmatureBehavior();
|
||||
virtual ~plArmatureBehavior();
|
||||
|
||||
void Init(plAGAnim *anim, hsBool loop, plArmatureBrain *brain, plArmatureModBase *armature, uint8_t index);
|
||||
void Init(plAGAnim *anim, bool loop, plArmatureBrain *brain, plArmatureModBase *armature, uint8_t index);
|
||||
virtual void Process(double time, float elapsed);
|
||||
virtual void SetStrength(float val, float rate = 0.f); // default instant change
|
||||
virtual float GetStrength();
|
||||
|
@ -79,7 +79,7 @@ plArmatureBrain::~plArmatureBrain()
|
||||
delete fCurTask;
|
||||
}
|
||||
|
||||
hsBool plArmatureBrain::Apply(double timeNow, float elapsed)
|
||||
bool plArmatureBrain::Apply(double timeNow, float elapsed)
|
||||
{
|
||||
IProcessTasks(timeNow, elapsed);
|
||||
fArmature->ApplyAnimations(timeNow, elapsed);
|
||||
@ -99,7 +99,7 @@ void plArmatureBrain::QueueTask(plAvTask *task)
|
||||
fTaskQueue.push_back(task);
|
||||
}
|
||||
|
||||
hsBool plArmatureBrain::LeaveAge()
|
||||
bool plArmatureBrain::LeaveAge()
|
||||
{
|
||||
if (fCurTask)
|
||||
fCurTask->LeaveAge(plArmatureMod::ConvertNoRef(fArmature));
|
||||
@ -115,7 +115,7 @@ hsBool plArmatureBrain::LeaveAge()
|
||||
return true;
|
||||
}
|
||||
|
||||
hsBool plArmatureBrain::IsRunningTask() const
|
||||
bool plArmatureBrain::IsRunningTask() const
|
||||
{
|
||||
if (fCurTask)
|
||||
return true;
|
||||
@ -157,7 +157,7 @@ void plArmatureBrain::Read(hsStream *stream, hsResMgr *mgr)
|
||||
}
|
||||
|
||||
// MSGRECEIVE
|
||||
hsBool plArmatureBrain::MsgReceive(plMessage * msg)
|
||||
bool plArmatureBrain::MsgReceive(plMessage * msg)
|
||||
{
|
||||
plAvTaskMsg *taskMsg = plAvTaskMsg::ConvertNoRef(msg);
|
||||
if (taskMsg)
|
||||
@ -192,7 +192,7 @@ void plArmatureBrain::IProcessTasks(double time, float elapsed)
|
||||
}
|
||||
}
|
||||
|
||||
hsBool plArmatureBrain::IHandleTaskMsg(plAvTaskMsg *msg)
|
||||
bool plArmatureBrain::IHandleTaskMsg(plAvTaskMsg *msg)
|
||||
{
|
||||
plAvTask *task = msg->GetTask();
|
||||
QueueTask(task);
|
||||
|
@ -71,25 +71,25 @@ public:
|
||||
CLASSNAME_REGISTER( plArmatureBrain );
|
||||
GETINTERFACE_ANY( plArmatureBrain, plCreatable );
|
||||
|
||||
virtual hsBool Apply(double timeNow, float elapsed);
|
||||
virtual bool Apply(double timeNow, float elapsed);
|
||||
virtual void Activate(plArmatureModBase *armature);
|
||||
virtual void Deactivate() {}
|
||||
virtual void Suspend() {}
|
||||
virtual void Resume() {}
|
||||
virtual void Spawn(double timeNow) {}
|
||||
virtual void OnBehaviorStop(uint8_t index) {}
|
||||
virtual hsBool LeaveAge();
|
||||
virtual hsBool IsRunningTask() const;
|
||||
virtual bool LeaveAge();
|
||||
virtual bool IsRunningTask() const;
|
||||
virtual void QueueTask(plAvTask *task);
|
||||
virtual void DumpToDebugDisplay(int &x, int &y, int lineHeight, char *strBuf, plDebugText &debugTxt) {}
|
||||
|
||||
virtual void Write(hsStream *stream, hsResMgr *mgr);
|
||||
virtual void Read(hsStream *stream, hsResMgr *mgr);
|
||||
virtual hsBool MsgReceive(plMessage *msg);
|
||||
virtual bool MsgReceive(plMessage *msg);
|
||||
|
||||
protected:
|
||||
virtual void IProcessTasks(double time, float elapsed);
|
||||
virtual hsBool IHandleTaskMsg(plAvTaskMsg *msg);
|
||||
virtual bool IHandleTaskMsg(plAvTaskMsg *msg);
|
||||
|
||||
typedef std::deque<plAvTask *> plAvTaskQueue;
|
||||
plAvTaskQueue fTaskQueue; // FIFO queue of tasks we're working on
|
||||
|
@ -210,9 +210,9 @@ void plAvBrainClimb::Deactivate()
|
||||
}
|
||||
|
||||
// APPLY
|
||||
hsBool plAvBrainClimb::Apply(double time, float elapsed)
|
||||
bool plAvBrainClimb::Apply(double time, float elapsed)
|
||||
{
|
||||
hsBool result = true;
|
||||
bool result = true;
|
||||
|
||||
IGetDesiredDirection();
|
||||
|
||||
@ -242,7 +242,7 @@ hsBool plAvBrainClimb::Apply(double time, float elapsed)
|
||||
}
|
||||
|
||||
// MSGRECEIVE
|
||||
hsBool plAvBrainClimb::MsgReceive(plMessage *msg)
|
||||
bool plAvBrainClimb::MsgReceive(plMessage *msg)
|
||||
{
|
||||
plClimbMsg *climbMsg;
|
||||
plLOSHitMsg *losMsg;
|
||||
@ -259,7 +259,7 @@ hsBool plAvBrainClimb::MsgReceive(plMessage *msg)
|
||||
}
|
||||
|
||||
// IHANDLECLIMBMSG
|
||||
hsBool plAvBrainClimb::IHandleClimbMsg(plClimbMsg *msg)
|
||||
bool plAvBrainClimb::IHandleClimbMsg(plClimbMsg *msg)
|
||||
{
|
||||
switch(msg->fCommand)
|
||||
{
|
||||
@ -301,12 +301,12 @@ hsBool plAvBrainClimb::IHandleClimbMsg(plClimbMsg *msg)
|
||||
}
|
||||
|
||||
// IHANDLELOSMSG
|
||||
hsBool plAvBrainClimb::IHandleLOSMsg(plLOSHitMsg *msg)
|
||||
bool plAvBrainClimb::IHandleLOSMsg(plLOSHitMsg *msg)
|
||||
{
|
||||
plClimbMsg::Direction blockDir = static_cast<plClimbMsg::Direction>(msg->fRequestID);
|
||||
// this is a weak test because someone else could be using the same bits to mean something different
|
||||
// the real strategy is that we should only receive LOS messages of our own creation
|
||||
hsBool oneOfOurs = blockDir == plClimbMsg::kUp || blockDir == plClimbMsg::kDown || blockDir == plClimbMsg::kLeft || blockDir == plClimbMsg::kRight;
|
||||
bool oneOfOurs = blockDir == plClimbMsg::kUp || blockDir == plClimbMsg::kDown || blockDir == plClimbMsg::kLeft || blockDir == plClimbMsg::kRight;
|
||||
if(oneOfOurs)
|
||||
{
|
||||
fPhysicallyBlockedDirections |= blockDir;
|
||||
@ -320,7 +320,7 @@ hsBool plAvBrainClimb::IHandleLOSMsg(plLOSHitMsg *msg)
|
||||
bool plAvBrainClimb::IProcessExitStage(double time, float elapsed)
|
||||
{
|
||||
plAGAnimInstance *ai = fExitStage->GetAnimInstance();
|
||||
hsBool animDone = ai->IsAtEnd();
|
||||
bool animDone = ai->IsAtEnd();
|
||||
float unused;
|
||||
|
||||
// if we have an exit stage running, move it instead of the base stage
|
||||
@ -730,7 +730,7 @@ void plAvBrainClimb::ICalcProbeLengths()
|
||||
|
||||
// IInitAnimations ---------------------
|
||||
// ---------------
|
||||
hsBool plAvBrainClimb::IInitAnimations()
|
||||
bool plAvBrainClimb::IInitAnimations()
|
||||
{
|
||||
fUp = new plAnimStage("WallClimbUp",
|
||||
plAnimStage::kNotifyEnter, plAnimStage::kForwardAuto, plAnimStage::kBackNone, plAnimStage::kAdvanceAuto, plAnimStage::kRegressAuto,
|
||||
|
@ -98,7 +98,7 @@ public:
|
||||
|
||||
virtual void Activate(plArmatureModBase *avMod);
|
||||
virtual void Deactivate();
|
||||
virtual hsBool Apply(double timeNow, float elapsed);
|
||||
virtual bool Apply(double timeNow, float elapsed);
|
||||
|
||||
virtual void SaveToSDL(plStateDataRecord *sdl);
|
||||
virtual void LoadFromSDL(const plStateDataRecord *sdl);
|
||||
@ -108,7 +108,7 @@ public:
|
||||
const char *ModeStr(Mode mode);
|
||||
|
||||
// plasma protocol
|
||||
virtual hsBool MsgReceive(plMessage *msg);
|
||||
virtual bool MsgReceive(plMessage *msg);
|
||||
|
||||
CLASSNAME_REGISTER( plAvBrainClimb );
|
||||
GETINTERFACE_ANY( plAvBrainClimb, plArmatureBrain);
|
||||
@ -121,8 +121,8 @@ private:
|
||||
/** Handle a climb message. Note that the "start climbing" climb message is handled
|
||||
by the human brain, since there's no climb brain there to hear it, since you
|
||||
(by definition) haven't started climbing yet... */
|
||||
inline hsBool IHandleClimbMsg(plClimbMsg *msg);
|
||||
inline hsBool IHandleLOSMsg(plLOSHitMsg *msg);
|
||||
inline bool IHandleClimbMsg(plClimbMsg *msg);
|
||||
inline bool IHandleLOSMsg(plLOSHitMsg *msg);
|
||||
|
||||
/** Allow or block dismounting in the specified direction. */
|
||||
void IEnableDismount(plClimbMsg::Direction dir, bool status);
|
||||
@ -159,7 +159,7 @@ private:
|
||||
|
||||
/** Create all our animation stage objects. Doesn't actually apply any of the animations
|
||||
to the avatar yet. */
|
||||
virtual hsBool IInitAnimations();
|
||||
virtual bool IInitAnimations();
|
||||
|
||||
/** Find the animation stage corresponding with a mode */
|
||||
plAnimStage * IGetStageFromMode(Mode mode);
|
||||
|
@ -116,7 +116,7 @@ plAvBrainCoop::plAvBrainCoop(uint32_t exitFlags, float fadeIn, float fadeOut,
|
||||
|
||||
// MsgReceive ----------------------------------
|
||||
// -----------
|
||||
hsBool plAvBrainCoop::MsgReceive(plMessage *msg)
|
||||
bool plAvBrainCoop::MsgReceive(plMessage *msg)
|
||||
{
|
||||
plPickedMsg *pickM = plPickedMsg::ConvertNoRef(msg);
|
||||
if(pickM)
|
||||
@ -202,15 +202,15 @@ void plAvBrainCoop::Read(hsStream *stream, hsResMgr *mgr)
|
||||
fInitiatorID = stream->ReadLE32();
|
||||
fInitiatorSerial = stream->ReadLE16();
|
||||
|
||||
if(stream->Readbool())
|
||||
if(stream->ReadBool())
|
||||
{
|
||||
fHostKey = mgr->ReadKey(stream);
|
||||
}
|
||||
if(stream->Readbool())
|
||||
if(stream->ReadBool())
|
||||
{
|
||||
fGuestKey = mgr->ReadKey(stream);
|
||||
}
|
||||
fWaitingForClick = stream->Readbool();
|
||||
fWaitingForClick = stream->ReadBool();
|
||||
|
||||
unsigned numRecipients = stream->ReadLE16();
|
||||
for (unsigned i = 0; i < numRecipients; i++)
|
||||
@ -229,15 +229,15 @@ void plAvBrainCoop::Write(hsStream *stream, hsResMgr *mgr)
|
||||
bool hasHostKey = (fHostKey != nil);
|
||||
bool hasGuestKey = (fGuestKey != nil);
|
||||
|
||||
stream->Writebool(hasHostKey);
|
||||
stream->WriteBool(hasHostKey);
|
||||
if(hasHostKey)
|
||||
mgr->WriteKey(stream, fHostKey);
|
||||
|
||||
stream->Writebool(hasGuestKey);
|
||||
stream->WriteBool(hasGuestKey);
|
||||
if(hasGuestKey)
|
||||
mgr->WriteKey(stream, fGuestKey);
|
||||
|
||||
stream->Writebool(fWaitingForClick);
|
||||
stream->WriteBool(fWaitingForClick);
|
||||
|
||||
stream->WriteLE16(fRecipients.size());
|
||||
for (unsigned i = 0; i < fRecipients.size(); i++)
|
||||
|
@ -63,7 +63,7 @@ public:
|
||||
plAvBrainCoop(uint32_t exitFlags, float fadeIn, float fadeOut, MoveMode moveMode,
|
||||
uint32_t initiatorID, uint16_t initiatorSerial, plKey hostKey);
|
||||
|
||||
hsBool MsgReceive(plMessage *msg);
|
||||
bool MsgReceive(plMessage *msg);
|
||||
virtual bool RelayNotifyMsg(plNotifyMsg *msg);
|
||||
void EnableGuestClick();
|
||||
|
||||
|
@ -81,7 +81,7 @@ public:
|
||||
fAvMod(nil), fCritterBrain(nil), fName(name), fRandomStartPoint(randomStart), fFadeInLength(fadeInLength), fFadeOutLength(fadeOutLength) {}
|
||||
virtual ~CritterBehavior() {}
|
||||
|
||||
void Init(plAGAnim* anim, hsBool loop, plAvBrainCritter* brain, plArmatureMod* body, uint8_t index)
|
||||
void Init(plAGAnim* anim, bool loop, plAvBrainCritter* brain, plArmatureMod* body, uint8_t index)
|
||||
{
|
||||
plArmatureBehavior::Init(anim, loop, brain, body, index);
|
||||
fAvMod = body;
|
||||
@ -89,7 +89,7 @@ public:
|
||||
fAnimName = anim->GetName();
|
||||
}
|
||||
|
||||
virtual hsBool PreCondition(double time, float elapsed) {return true;}
|
||||
virtual bool PreCondition(double time, float elapsed) {return true;}
|
||||
|
||||
float GetAnimLength() {return (fAnim->GetAnimation()->GetLength());}
|
||||
void SetAnimTime(float time) {fAnim->SetCurrentTime(time, true);}
|
||||
@ -152,7 +152,7 @@ plAvBrainCritter::~plAvBrainCritter()
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
hsBool plAvBrainCritter::Apply(double time, float elapsed)
|
||||
bool plAvBrainCritter::Apply(double time, float elapsed)
|
||||
{
|
||||
// update internal pathfinding variables
|
||||
IEvalGoal();
|
||||
@ -173,7 +173,7 @@ hsBool plAvBrainCritter::Apply(double time, float elapsed)
|
||||
return plArmatureBrain::Apply(time, elapsed);
|
||||
}
|
||||
|
||||
hsBool plAvBrainCritter::MsgReceive(plMessage* msg)
|
||||
bool plAvBrainCritter::MsgReceive(plMessage* msg)
|
||||
{
|
||||
return plArmatureBrain::MsgReceive(msg);
|
||||
}
|
||||
@ -456,7 +456,7 @@ void plAvBrainCritter::DumpToDebugDisplay(int& x, int& y, int lineHeight, char*
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
hsBool plAvBrainCritter::IInitBaseAnimations()
|
||||
bool plAvBrainCritter::IInitBaseAnimations()
|
||||
{
|
||||
// create the basic idle and run behaviors, and put them into our appropriate structures
|
||||
plAGAnim* idle = fAvMod->FindCustomAnim(kDefaultIdleAnimName);
|
||||
|
@ -75,8 +75,8 @@ public:
|
||||
CLASSNAME_REGISTER(plAvBrainCritter);
|
||||
GETINTERFACE_ANY(plAvBrainCritter, plArmatureBrain);
|
||||
|
||||
hsBool Apply(double time, float elapsed);
|
||||
hsBool MsgReceive(plMessage* msg);
|
||||
bool Apply(double time, float elapsed);
|
||||
bool MsgReceive(plMessage* msg);
|
||||
|
||||
virtual void Activate(plArmatureModBase* avMod);
|
||||
virtual void Deactivate();
|
||||
@ -140,7 +140,7 @@ public:
|
||||
static bool fDrawDebug;
|
||||
|
||||
protected:
|
||||
virtual hsBool IInitBaseAnimations();
|
||||
virtual bool IInitBaseAnimations();
|
||||
|
||||
int IPickBehavior(int behavior) const;
|
||||
int IPickBehavior(const std::string& behavior) const;
|
||||
|
@ -100,7 +100,7 @@ void plAvBrainDrive::IEnablePhysics(bool enable, plKey avKey)
|
||||
}
|
||||
|
||||
// APPLY
|
||||
hsBool plAvBrainDrive::Apply(double timeNow, float elapsed)
|
||||
bool plAvBrainDrive::Apply(double timeNow, float elapsed)
|
||||
{
|
||||
plSceneObject * avSO = fAvMod->GetTarget(0);
|
||||
float eTime = hsTimer::GetDelSysSeconds();
|
||||
@ -180,7 +180,7 @@ hsBool plAvBrainDrive::Apply(double timeNow, float elapsed)
|
||||
}
|
||||
|
||||
// IHANDLECONTROLMSG
|
||||
hsBool plAvBrainDrive::MsgReceive(plMessage* msg)
|
||||
bool plAvBrainDrive::MsgReceive(plMessage* msg)
|
||||
{
|
||||
plControlEventMsg *ctrlMsg = plControlEventMsg::ConvertNoRef(msg);
|
||||
if(ctrlMsg)
|
||||
|
@ -81,12 +81,12 @@ public:
|
||||
virtual void Deactivate();
|
||||
|
||||
/** Look at the key states and figure out if and how we should move */
|
||||
virtual hsBool Apply(double timeNow, float elapsed); // main control loop. called by avatar eval()
|
||||
virtual bool Apply(double timeNow, float elapsed); // main control loop. called by avatar eval()
|
||||
|
||||
// the user brain base handles most of the details of control messages,
|
||||
// so this function just looks for the special command which gets us out
|
||||
// of drive mode.
|
||||
virtual hsBool MsgReceive(plMessage* pMsg); // handle control input from the user
|
||||
virtual bool MsgReceive(plMessage* pMsg); // handle control input from the user
|
||||
|
||||
CLASSNAME_REGISTER( plAvBrainDrive );
|
||||
GETINTERFACE_ANY( plAvBrainDrive, plArmatureBrain );
|
||||
|
@ -75,7 +75,7 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
|
||||
#include "plStatusLog/plStatusLog.h"
|
||||
#endif
|
||||
|
||||
hsBool plAvBrainGeneric::fForce3rdPerson = true;
|
||||
bool plAvBrainGeneric::fForce3rdPerson = true;
|
||||
const float plAvBrainGeneric::kDefaultFadeIn = 6.f; // 1/6th of a second to fade in
|
||||
const float plAvBrainGeneric::kDefaultFadeOut = 0.f; // instant fade out.
|
||||
|
||||
@ -218,7 +218,7 @@ void plAvBrainGeneric::Activate(plArmatureModBase *avMod)
|
||||
fAvMod->SetReverseFBOnIdle(true);
|
||||
}
|
||||
|
||||
hsBool plAvBrainGeneric::IsRunningTask()
|
||||
bool plAvBrainGeneric::IsRunningTask()
|
||||
{
|
||||
if ( fStages->size() > 0 )
|
||||
return true;
|
||||
@ -242,9 +242,9 @@ bool plAvBrainGeneric::MatchAnimNames(const char *names[], int count)
|
||||
|
||||
// Apply ----------------------------------------------------
|
||||
// ------
|
||||
hsBool plAvBrainGeneric::Apply(double time, float elapsed)
|
||||
bool plAvBrainGeneric::Apply(double time, float elapsed)
|
||||
{
|
||||
hsBool result = false;
|
||||
bool result = false;
|
||||
|
||||
switch(fMode)
|
||||
{
|
||||
@ -345,7 +345,7 @@ float plAvBrainGeneric::IGetAnimDelta(double time, float elapsed)
|
||||
plAnimStage::ForwardType forward = curStage->GetForwardType();
|
||||
plAnimStage::BackType back = curStage->GetBackType();
|
||||
bool fwdIsDown = (fReverseFBControlsOnRelease && fAvMod->IsFBReversed()) ? fAvMod->BackwardKeyDown() : fAvMod->ForwardKeyDown();
|
||||
hsBool backIsDown = (fReverseFBControlsOnRelease && fAvMod->IsFBReversed()) ? fAvMod->ForwardKeyDown() : fAvMod->BackwardKeyDown();
|
||||
bool backIsDown = (fReverseFBControlsOnRelease && fAvMod->IsFBReversed()) ? fAvMod->ForwardKeyDown() : fAvMod->BackwardKeyDown();
|
||||
|
||||
// forward with a key down gets top priority
|
||||
if(forward == plAnimStage::kForwardKey && fwdIsDown)
|
||||
@ -372,14 +372,14 @@ float plAvBrainGeneric::IGetAnimDelta(double time, float elapsed)
|
||||
|
||||
// IProcessNormal -------------------------------------------------
|
||||
// ---------------
|
||||
hsBool plAvBrainGeneric::IProcessNormal(double time, float elapsed)
|
||||
bool plAvBrainGeneric::IProcessNormal(double time, float elapsed)
|
||||
{
|
||||
plAnimStage *curStage = (*fStages)[fCurStage];
|
||||
if(curStage)
|
||||
{
|
||||
float animDelta = IGetAnimDelta(time, elapsed); // how far to move the anim (may be negative)
|
||||
float overage;
|
||||
hsBool done = curStage->MoveRelative(time, animDelta, overage, fAvMod);
|
||||
bool done = curStage->MoveRelative(time, animDelta, overage, fAvMod);
|
||||
|
||||
if(done)
|
||||
{
|
||||
@ -404,7 +404,7 @@ hsBool plAvBrainGeneric::IProcessNormal(double time, float elapsed)
|
||||
|
||||
// IProcessFadeIn -------------------------------------------------
|
||||
// ---------------
|
||||
hsBool plAvBrainGeneric::IProcessFadeIn(double time, float elapsed)
|
||||
bool plAvBrainGeneric::IProcessFadeIn(double time, float elapsed)
|
||||
{
|
||||
plAnimStage *curStage = (*fStages)[fCurStage];
|
||||
|
||||
@ -437,7 +437,7 @@ hsBool plAvBrainGeneric::IProcessFadeIn(double time, float elapsed)
|
||||
|
||||
// IProcessFadeOut -------------------------------------------------
|
||||
// ----------------
|
||||
hsBool plAvBrainGeneric::IProcessFadeOut(double time, float elapsed)
|
||||
bool plAvBrainGeneric::IProcessFadeOut(double time, float elapsed)
|
||||
{
|
||||
plAnimStage *curStage = (*fStages)[fCurStage];
|
||||
|
||||
@ -478,7 +478,7 @@ hsBool plAvBrainGeneric::IProcessFadeOut(double time, float elapsed)
|
||||
|
||||
// ISwitchStages ---------------------------------------------------------------------------------------------------
|
||||
// --------------
|
||||
hsBool plAvBrainGeneric::ISwitchStages(int oldStageNum, int newStageNum, float delta, hsBool setTime, float newTime,
|
||||
bool plAvBrainGeneric::ISwitchStages(int oldStageNum, int newStageNum, float delta, bool setTime, float newTime,
|
||||
float fadeNew, float fadeOld, double worldTime)
|
||||
{
|
||||
#ifdef DEBUG_MULTISTAGE
|
||||
@ -549,9 +549,9 @@ void plAvBrainGeneric::IExitMoveMode()
|
||||
|
||||
// MsgReceive -------------------------------------
|
||||
// -----------
|
||||
hsBool plAvBrainGeneric::MsgReceive(plMessage *msg)
|
||||
bool plAvBrainGeneric::MsgReceive(plMessage *msg)
|
||||
{
|
||||
hsBool result = false;
|
||||
bool result = false;
|
||||
|
||||
plAvBrainGenericMsg *genMsg = plAvBrainGenericMsg::ConvertNoRef(msg);
|
||||
//plAvExitModeMsg *exitMsg = plAvExitModeMsg::ConvertNoRef(msg);
|
||||
@ -589,11 +589,11 @@ hsBool plAvBrainGeneric::MsgReceive(plMessage *msg)
|
||||
|
||||
// IHandleGenBrainMsg -----------------------------------------------------
|
||||
// -------------------
|
||||
hsBool plAvBrainGeneric::IHandleGenBrainMsg(const plAvBrainGenericMsg *msg)
|
||||
bool plAvBrainGeneric::IHandleGenBrainMsg(const plAvBrainGenericMsg *msg)
|
||||
{
|
||||
hsBool setTime = msg->fSetTime;
|
||||
bool setTime = msg->fSetTime;
|
||||
float newTime = msg->fNewTime;
|
||||
hsBool setDirection = msg->fSetDirection;
|
||||
bool setDirection = msg->fSetDirection;
|
||||
bool newDirection = msg->fNewDirection ? true : false;
|
||||
double worldTime = hsTimer::GetSysSeconds();
|
||||
|
||||
@ -670,7 +670,7 @@ hsBool plAvBrainGeneric::IHandleGenBrainMsg(const plAvBrainGenericMsg *msg)
|
||||
return true;
|
||||
}
|
||||
|
||||
hsBool plAvBrainGeneric::IHandleTaskMsg(plAvTaskMsg *msg)
|
||||
bool plAvBrainGeneric::IHandleTaskMsg(plAvTaskMsg *msg)
|
||||
{
|
||||
plAvTask *task = msg->GetTask();
|
||||
plAvTaskBrain *brainTask = plAvTaskBrain::ConvertNoRef(task);
|
||||
@ -782,7 +782,7 @@ void plAvBrainGeneric::Write(hsStream *stream, hsResMgr *mgr)
|
||||
stream->WriteLE32(fType);
|
||||
stream->WriteLE32(fExitFlags);
|
||||
stream->WriteByte(fMode);
|
||||
stream->Writebool(fForward);
|
||||
stream->WriteBool(fForward);
|
||||
|
||||
if(fStartMessage) {
|
||||
stream->WriteBool(true);
|
||||
@ -826,7 +826,7 @@ void plAvBrainGeneric::Read(hsStream *stream, hsResMgr *mgr)
|
||||
fType = static_cast<plAvBrainGeneric::BrainType>(stream->ReadLE32());
|
||||
fExitFlags = stream->ReadLE32();
|
||||
fMode = static_cast<Mode>(stream->ReadByte());
|
||||
fForward = stream->Readbool();
|
||||
fForward = stream->ReadBool();
|
||||
|
||||
if(stream->ReadBool()) {
|
||||
fStartMessage = plMessage::ConvertNoRef(mgr->ReadCreatable(stream));
|
||||
@ -854,7 +854,7 @@ void plAvBrainGeneric::Read(hsStream *stream, hsResMgr *mgr)
|
||||
|
||||
// LeaveAge ---------------------
|
||||
// ---------
|
||||
hsBool plAvBrainGeneric::LeaveAge()
|
||||
bool plAvBrainGeneric::LeaveAge()
|
||||
{
|
||||
IExitMoveMode();
|
||||
|
||||
|
@ -145,7 +145,7 @@ public:
|
||||
/** Virtual destructor */
|
||||
virtual ~plAvBrainGeneric();
|
||||
|
||||
static hsBool fForce3rdPerson;
|
||||
static bool fForce3rdPerson;
|
||||
|
||||
/** Attaches our current stage and takes control of the armature. Note that
|
||||
the brain may be in a "half-finished" state -- we may be receiving some
|
||||
@ -154,7 +154,7 @@ public:
|
||||
virtual void Activate(plArmatureModBase *avMod);
|
||||
|
||||
/** Advance the current stage and swap in a new stage if necessary. */
|
||||
virtual hsBool Apply(double timeNow, float elapsed);
|
||||
virtual bool Apply(double timeNow, float elapsed);
|
||||
|
||||
/** Remove all our stages and release control of the armature. */
|
||||
virtual void Deactivate();
|
||||
@ -168,9 +168,9 @@ public:
|
||||
virtual bool RelayNotifyMsg(plNotifyMsg *msg);
|
||||
|
||||
/** We're leaving the age. Clean up. */
|
||||
virtual hsBool LeaveAge();
|
||||
virtual bool LeaveAge();
|
||||
|
||||
virtual hsBool IsRunningTask();
|
||||
virtual bool IsRunningTask();
|
||||
|
||||
/** Compare the names of the anims in our stages.
|
||||
Return true on a match (order matters). */
|
||||
@ -256,7 +256,7 @@ public:
|
||||
virtual void DumpToDebugDisplay(int &x, int &y, int lineHeight, char *strBuf, plDebugText &debugTxt);
|
||||
|
||||
// plasma protocol
|
||||
hsBool MsgReceive(plMessage *msg);
|
||||
bool MsgReceive(plMessage *msg);
|
||||
CLASSNAME_REGISTER( plAvBrainGeneric );
|
||||
GETINTERFACE_ANY( plAvBrainGeneric, plArmatureBrain );
|
||||
|
||||
@ -271,19 +271,19 @@ protected:
|
||||
//
|
||||
/////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
hsBool IHandleGenBrainMsg(const plAvBrainGenericMsg *msg);
|
||||
hsBool IHandleTaskMsg(plAvTaskMsg *msg);
|
||||
bool IHandleGenBrainMsg(const plAvBrainGenericMsg *msg);
|
||||
bool IHandleTaskMsg(plAvTaskMsg *msg);
|
||||
|
||||
bool IBrainIsCompatible(plAvBrainGeneric *otherBrain);
|
||||
|
||||
float IGetAnimDelta(double time, float elapsed); // how far should we move our animation this frame?
|
||||
|
||||
hsBool IProcessNormal(double time, float elapsed);
|
||||
bool IProcessNormal(double time, float elapsed);
|
||||
|
||||
hsBool IProcessFadeIn(double time, float elapsed);
|
||||
hsBool IProcessFadeOut(double time, float elapsed);
|
||||
bool IProcessFadeIn(double time, float elapsed);
|
||||
bool IProcessFadeOut(double time, float elapsed);
|
||||
|
||||
hsBool ISwitchStages(int oldStage, int newStage, float delta, hsBool setTime, float newTime,
|
||||
bool ISwitchStages(int oldStage, int newStage, float delta, bool setTime, float newTime,
|
||||
float fadeNew, float fadeOld, double worldTime);
|
||||
|
||||
void IEnterMoveMode(double time); // we've just entered and we're about to begin animating.
|
||||
|
@ -98,7 +98,7 @@ plAvBrainHuman::TurnCurve plAvBrainHuman::fRunTurnCurve = plAvBrainHuman::kTurnE
|
||||
|
||||
const float plAvBrainHuman::kAirTimePanicThreshold = 10; // seconds
|
||||
|
||||
void plAvBrainHuman::SetTimeToMaxTurn(float time, hsBool walk)
|
||||
void plAvBrainHuman::SetTimeToMaxTurn(float time, bool walk)
|
||||
{
|
||||
if (walk)
|
||||
fWalkTimeToMaxTurn = time;
|
||||
@ -106,12 +106,12 @@ void plAvBrainHuman::SetTimeToMaxTurn(float time, hsBool walk)
|
||||
fRunTimeToMaxTurn = time;
|
||||
}
|
||||
|
||||
float plAvBrainHuman::GetTimeToMaxTurn(hsBool walk)
|
||||
float plAvBrainHuman::GetTimeToMaxTurn(bool walk)
|
||||
{
|
||||
return (walk ? fWalkTimeToMaxTurn : fRunTimeToMaxTurn);
|
||||
}
|
||||
|
||||
void plAvBrainHuman::SetMaxTurnSpeed(float radsPerSec, hsBool walk)
|
||||
void plAvBrainHuman::SetMaxTurnSpeed(float radsPerSec, bool walk)
|
||||
{
|
||||
if (walk)
|
||||
fWalkMaxTurnSpeed = radsPerSec;
|
||||
@ -119,12 +119,12 @@ void plAvBrainHuman::SetMaxTurnSpeed(float radsPerSec, hsBool walk)
|
||||
fRunMaxTurnSpeed = radsPerSec;
|
||||
}
|
||||
|
||||
float plAvBrainHuman::GetMaxTurnSpeed(hsBool walk)
|
||||
float plAvBrainHuman::GetMaxTurnSpeed(bool walk)
|
||||
{
|
||||
return (walk ? fWalkMaxTurnSpeed : fRunMaxTurnSpeed);
|
||||
}
|
||||
|
||||
void plAvBrainHuman::SetTurnCurve(TurnCurve curve, hsBool walk)
|
||||
void plAvBrainHuman::SetTurnCurve(TurnCurve curve, bool walk)
|
||||
{
|
||||
if (walk)
|
||||
fWalkTurnCurve = curve;
|
||||
@ -132,7 +132,7 @@ void plAvBrainHuman::SetTurnCurve(TurnCurve curve, hsBool walk)
|
||||
fRunTurnCurve = curve;
|
||||
}
|
||||
|
||||
plAvBrainHuman::TurnCurve plAvBrainHuman::GetTurnCurve(hsBool walk)
|
||||
plAvBrainHuman::TurnCurve plAvBrainHuman::GetTurnCurve(bool walk)
|
||||
{
|
||||
return (walk ? fWalkTurnCurve : fRunTurnCurve);
|
||||
}
|
||||
@ -146,7 +146,7 @@ plAvBrainHuman::plAvBrainHuman(bool isActor /* = false */) :
|
||||
{
|
||||
}
|
||||
|
||||
hsBool plAvBrainHuman::Apply(double timeNow, float elapsed)
|
||||
bool plAvBrainHuman::Apply(double timeNow, float elapsed)
|
||||
{
|
||||
#ifndef _DEBUG
|
||||
try
|
||||
@ -188,7 +188,7 @@ void plAvBrainHuman::Activate(plArmatureModBase *avMod)
|
||||
|
||||
|
||||
plSceneObject *avSO = fAvMod->GetTarget(0);
|
||||
hsBool isLocal = avSO->IsLocallyOwned();
|
||||
bool isLocal = avSO->IsLocallyOwned();
|
||||
|
||||
if (fAvMod->GetClothingOutfit() && fAvMod->GetClothingOutfit()->fGroup != plClothingMgr::kClothingBaseNoOptions)
|
||||
{
|
||||
@ -366,7 +366,7 @@ void plAvBrainHuman::Resume()
|
||||
plArmatureBrain::Resume();
|
||||
}
|
||||
|
||||
hsBool plAvBrainHuman::IHandleControlMsg(plControlEventMsg* msg)
|
||||
bool plAvBrainHuman::IHandleControlMsg(plControlEventMsg* msg)
|
||||
{
|
||||
ControlEventCode moveCode = msg->GetControlCode();
|
||||
|
||||
@ -432,7 +432,7 @@ void plAvBrainHuman::Read(hsStream *stream, hsResMgr *mgr)
|
||||
fIsActor = stream->ReadBool();
|
||||
}
|
||||
|
||||
hsBool plAvBrainHuman::MsgReceive(plMessage * msg)
|
||||
bool plAvBrainHuman::MsgReceive(plMessage * msg)
|
||||
{
|
||||
plControlEventMsg *ctrlMsg = plControlEventMsg::ConvertNoRef(msg);
|
||||
if (ctrlMsg)
|
||||
@ -490,7 +490,7 @@ hsBool plAvBrainHuman::MsgReceive(plMessage * msg)
|
||||
return plArmatureBrain::MsgReceive(msg);
|
||||
}
|
||||
|
||||
hsBool plAvBrainHuman::IHandleClimbMsg(plClimbMsg *msg)
|
||||
bool plAvBrainHuman::IHandleClimbMsg(plClimbMsg *msg)
|
||||
{
|
||||
bool isStartClimb = msg->fCommand == plClimbMsg::kStartClimbing;
|
||||
if(isStartClimb)
|
||||
@ -596,7 +596,7 @@ float plAvBrainHuman::IGetTurnStrength(double timeNow)
|
||||
return result;
|
||||
}
|
||||
|
||||
hsBool plAvBrainHuman::IHandleTaskMsg(plAvTaskMsg *msg)
|
||||
bool plAvBrainHuman::IHandleTaskMsg(plAvTaskMsg *msg)
|
||||
{
|
||||
if(plAvSeekMsg * seekM = plAvSeekMsg::ConvertNoRef(msg))
|
||||
{
|
||||
@ -727,9 +727,9 @@ void plAvBrainHuman::IChatOff()
|
||||
}
|
||||
}
|
||||
|
||||
hsBool plAvBrainHuman::IInitAnimations()
|
||||
bool plAvBrainHuman::IInitAnimations()
|
||||
{
|
||||
hsBool result = false;
|
||||
bool result = false;
|
||||
|
||||
plAGAnim *idle = fAvMod->FindCustomAnim("Idle");
|
||||
plAGAnim *walk = fAvMod->FindCustomAnim("Walk");
|
||||
@ -821,7 +821,7 @@ hsBool plAvBrainHuman::IInitAnimations()
|
||||
return result;
|
||||
}
|
||||
|
||||
hsBool plAvBrainHuman::RunStandardBehaviors(double timeNow, float elapsed)
|
||||
bool plAvBrainHuman::RunStandardBehaviors(double timeNow, float elapsed)
|
||||
{
|
||||
int i;
|
||||
for (i = 0; i < fBehaviors.GetCount(); i++)
|
||||
@ -866,7 +866,7 @@ void plAvBrainHuman::Spawn(double timeNow)
|
||||
fAvMod->Compile(timeNow);
|
||||
}
|
||||
|
||||
hsBool plAvBrainHuman::LeaveAge()
|
||||
bool plAvBrainHuman::LeaveAge()
|
||||
{
|
||||
plPhysicalControllerCore* controller = fAvMod->GetController();
|
||||
if(!controller->BehavingLikeAnAnimatedPhysical())
|
||||
@ -958,7 +958,7 @@ plHBehavior::~plHBehavior()
|
||||
{
|
||||
}
|
||||
|
||||
void plHBehavior::Init(plAGAnim *anim, hsBool loop, plAvBrainHuman *brain,
|
||||
void plHBehavior::Init(plAGAnim *anim, bool loop, plAvBrainHuman *brain,
|
||||
plArmatureMod *body, float fadeIn, float fadeOut,
|
||||
uint8_t index, uint32_t type /* = 0 */)
|
||||
{
|
||||
@ -1008,7 +1008,7 @@ void Idle::IStart()
|
||||
}
|
||||
}
|
||||
|
||||
hsBool Run::PreCondition(double time, float elapsed)
|
||||
bool Run::PreCondition(double time, float elapsed)
|
||||
{
|
||||
if (fAnim)
|
||||
{
|
||||
@ -1019,7 +1019,7 @@ hsBool Run::PreCondition(double time, float elapsed)
|
||||
return false;
|
||||
}
|
||||
|
||||
hsBool Walk::PreCondition(double time, float elapsed)
|
||||
bool Walk::PreCondition(double time, float elapsed)
|
||||
{
|
||||
if (fAnim)
|
||||
{
|
||||
@ -1030,7 +1030,7 @@ hsBool Walk::PreCondition(double time, float elapsed)
|
||||
return false;
|
||||
}
|
||||
|
||||
hsBool WalkBack::PreCondition(double time, float elapsed)
|
||||
bool WalkBack::PreCondition(double time, float elapsed)
|
||||
{
|
||||
if (fAnim)
|
||||
{
|
||||
@ -1041,7 +1041,7 @@ hsBool WalkBack::PreCondition(double time, float elapsed)
|
||||
return false;
|
||||
}
|
||||
|
||||
hsBool StepLeft::PreCondition(double time, float elapsed)
|
||||
bool StepLeft::PreCondition(double time, float elapsed)
|
||||
{
|
||||
if (fAnim)
|
||||
{
|
||||
@ -1053,7 +1053,7 @@ hsBool StepLeft::PreCondition(double time, float elapsed)
|
||||
return false;
|
||||
}
|
||||
|
||||
hsBool StepRight::PreCondition(double time, float elapsed)
|
||||
bool StepRight::PreCondition(double time, float elapsed)
|
||||
{
|
||||
if (fAnim)
|
||||
{
|
||||
@ -1065,7 +1065,7 @@ hsBool StepRight::PreCondition(double time, float elapsed)
|
||||
return false;
|
||||
}
|
||||
|
||||
hsBool StandingTurnLeft::PreCondition(double time, float elapsed)
|
||||
bool StandingTurnLeft::PreCondition(double time, float elapsed)
|
||||
{
|
||||
if (fAnim)
|
||||
{
|
||||
@ -1078,7 +1078,7 @@ hsBool StandingTurnLeft::PreCondition(double time, float elapsed)
|
||||
return false;
|
||||
}
|
||||
|
||||
hsBool StandingTurnRight::PreCondition(double time, float elapsed)
|
||||
bool StandingTurnRight::PreCondition(double time, float elapsed)
|
||||
{
|
||||
if (fAnim)
|
||||
{
|
||||
@ -1097,7 +1097,7 @@ void MovingTurn::IStart()
|
||||
fHuBrain->SetStartedTurning(hsTimer::GetSysSeconds());
|
||||
}
|
||||
|
||||
hsBool MovingTurnLeft::PreCondition(double time, float elapsed)
|
||||
bool MovingTurnLeft::PreCondition(double time, float elapsed)
|
||||
{
|
||||
if (fAvMod->GetTurnStrength() > 0)
|
||||
{
|
||||
@ -1108,7 +1108,7 @@ hsBool MovingTurnLeft::PreCondition(double time, float elapsed)
|
||||
return false;
|
||||
}
|
||||
|
||||
hsBool MovingTurnRight::PreCondition(double time, float elapsed)
|
||||
bool MovingTurnRight::PreCondition(double time, float elapsed)
|
||||
{
|
||||
if (fAvMod->GetTurnStrength() < 0)
|
||||
{
|
||||
@ -1134,7 +1134,7 @@ void Jump::IStop()
|
||||
plHBehavior::IStop();
|
||||
}
|
||||
|
||||
hsBool StandingJump::PreCondition(double time, float elapsed)
|
||||
bool StandingJump::PreCondition(double time, float elapsed)
|
||||
{
|
||||
if (fAnim)
|
||||
{
|
||||
@ -1162,7 +1162,7 @@ hsBool StandingJump::PreCondition(double time, float elapsed)
|
||||
return false;
|
||||
}
|
||||
|
||||
hsBool WalkingJump::PreCondition(double time, float elapsed)
|
||||
bool WalkingJump::PreCondition(double time, float elapsed)
|
||||
{
|
||||
if (fAnim)
|
||||
{
|
||||
@ -1192,7 +1192,7 @@ hsBool WalkingJump::PreCondition(double time, float elapsed)
|
||||
return false;
|
||||
}
|
||||
|
||||
hsBool RunningJump::PreCondition(double time, float elapsed)
|
||||
bool RunningJump::PreCondition(double time, float elapsed)
|
||||
{
|
||||
if (fAnim)
|
||||
{
|
||||
@ -1233,7 +1233,7 @@ static const float kMinAirTime = .5f;
|
||||
|
||||
RunningImpact::RunningImpact() : fDuration(0.0f) {}
|
||||
|
||||
hsBool RunningImpact::PreCondition(double time, float elapsed)
|
||||
bool RunningImpact::PreCondition(double time, float elapsed)
|
||||
{
|
||||
if (fDuration > 0.0f)
|
||||
fDuration = fDuration - elapsed;
|
||||
@ -1261,7 +1261,7 @@ void RunningImpact::IStop()
|
||||
|
||||
GroundImpact::GroundImpact() : fDuration(0.0f) {}
|
||||
|
||||
hsBool GroundImpact::PreCondition(double time, float elapsed)
|
||||
bool GroundImpact::PreCondition(double time, float elapsed)
|
||||
{
|
||||
|
||||
bool result = false;
|
||||
@ -1290,7 +1290,7 @@ void GroundImpact::IStop()
|
||||
plHBehavior::IStop();
|
||||
}
|
||||
|
||||
hsBool Fall::PreCondition(double time, float elapsed)
|
||||
bool Fall::PreCondition(double time, float elapsed)
|
||||
{
|
||||
return !fHuBrain->fCallbackAction->IsOnGround() && fHuBrain->fCallbackAction->HitGroundInThisAge();
|
||||
}
|
||||
@ -1340,7 +1340,7 @@ void Push::Process(double time, float elapsed)
|
||||
fHuBrain->fCallbackAction->SetTurnStrength(turnSpeed);
|
||||
}
|
||||
|
||||
//hsBool PushIdle::PreCondition(double time, float elapsed)
|
||||
//bool PushIdle::PreCondition(double time, float elapsed)
|
||||
//{
|
||||
// return (fHuBrain->fCallbackAction->GetPushingPhysical() &&
|
||||
// fHuBrain->fCallbackAction->IsOnGround() &&
|
||||
@ -1348,7 +1348,7 @@ void Push::Process(double time, float elapsed)
|
||||
// && fAvMod->GetTurnStrength() == 0);
|
||||
//}
|
||||
|
||||
hsBool PushWalk::PreCondition(double time, float elapsed)
|
||||
bool PushWalk::PreCondition(double time, float elapsed)
|
||||
{
|
||||
return (fHuBrain->fCallbackAction->GetPushingPhysical() && fHuBrain->fCallbackAction->GetFacingPushingPhysical() &&
|
||||
fHuBrain->fCallbackAction->IsOnGround() &&
|
||||
@ -1421,7 +1421,7 @@ bool AvatarEmote(plArmatureMod *avatar, const char *emoteName)
|
||||
plString fullName = avatar->MakeAnimationName(emoteName);
|
||||
plAGAnim *anim = plAGAnim::FindAnim(fullName);
|
||||
plEmoteAnim *emote = plEmoteAnim::ConvertNoRef(anim);
|
||||
hsBool alreadyActive = avatar->FindAnimInstance(fullName) != nil;
|
||||
bool alreadyActive = avatar->FindAnimInstance(fullName) != nil;
|
||||
plAvBrainHuman *huBrain = plAvBrainHuman::ConvertNoRef(avatar->FindBrainByClass(plAvBrainHuman::Index()));
|
||||
|
||||
// XXX
|
||||
|
@ -72,20 +72,20 @@ public:
|
||||
CLASSNAME_REGISTER( plAvBrainHuman );
|
||||
GETINTERFACE_ANY( plAvBrainHuman, plArmatureBrain );
|
||||
|
||||
virtual hsBool Apply(double timeNow, float elapsed);
|
||||
virtual bool Apply(double timeNow, float elapsed);
|
||||
virtual void Activate(plArmatureModBase *avMod);
|
||||
virtual void Deactivate();
|
||||
virtual void Suspend();
|
||||
virtual void Resume();
|
||||
virtual void Spawn(double timeNow);
|
||||
virtual hsBool LeaveAge();
|
||||
virtual bool LeaveAge();
|
||||
|
||||
bool IsActor() const {return fIsActor;}
|
||||
void IsActor(bool isActor) {fIsActor = isActor;}
|
||||
|
||||
bool IsMovementZeroBlend();
|
||||
void TurnToPoint(hsPoint3 point);
|
||||
hsBool RunStandardBehaviors(double timeNow, float elapsed);
|
||||
bool RunStandardBehaviors(double timeNow, float elapsed);
|
||||
void SetStartedTurning(double when);
|
||||
|
||||
virtual bool IsMovingForward(); // we're either walking or running. doesn't account for sliding.
|
||||
@ -96,7 +96,7 @@ public:
|
||||
|
||||
virtual void Write(hsStream *stream, hsResMgr *mgr);
|
||||
virtual void Read(hsStream *stream, hsResMgr *mgr);
|
||||
virtual hsBool MsgReceive(plMessage *msg);
|
||||
virtual bool MsgReceive(plMessage *msg);
|
||||
virtual void DumpToDebugDisplay(int &x, int &y, int lineHeight, char *strBuf, plDebugText &debugTxt);
|
||||
|
||||
// Hardwired Identifiers for all the canonical bones.
|
||||
@ -154,12 +154,12 @@ public:
|
||||
kHuBehaviorMax,
|
||||
};
|
||||
|
||||
static void SetTimeToMaxTurn(float time, hsBool walk);
|
||||
static float GetTimeToMaxTurn(hsBool walk);
|
||||
static void SetMaxTurnSpeed(float radsPerSec, hsBool walk);
|
||||
static float GetMaxTurnSpeed(hsBool walk);
|
||||
static void SetTurnCurve(TurnCurve curve, hsBool walk);
|
||||
static TurnCurve GetTurnCurve(hsBool walk);
|
||||
static void SetTimeToMaxTurn(float time, bool walk);
|
||||
static float GetTimeToMaxTurn(bool walk);
|
||||
static void SetMaxTurnSpeed(float radsPerSec, bool walk);
|
||||
static float GetMaxTurnSpeed(bool walk);
|
||||
static void SetTurnCurve(TurnCurve curve, bool walk);
|
||||
static TurnCurve GetTurnCurve(bool walk);
|
||||
|
||||
static const float kControlledFlightThreshold;
|
||||
static const float kAirTimeThreshold;
|
||||
@ -168,15 +168,15 @@ public:
|
||||
|
||||
protected:
|
||||
plAGAnim *FindCustomAnim(const char *baseName);
|
||||
virtual hsBool IHandleControlMsg(plControlEventMsg *ctrlMsg);
|
||||
virtual hsBool IHandleClimbMsg(plClimbMsg *msg);
|
||||
virtual hsBool IHandleTaskMsg(plAvTaskMsg *msg);
|
||||
virtual hsBool IInitAnimations();
|
||||
virtual bool IHandleControlMsg(plControlEventMsg *ctrlMsg);
|
||||
virtual bool IHandleClimbMsg(plClimbMsg *msg);
|
||||
virtual bool IHandleTaskMsg(plAvTaskMsg *msg);
|
||||
virtual bool IInitAnimations();
|
||||
virtual void IInitBoneMap();
|
||||
float IGetTurnStrength(double timeNow);
|
||||
void IChatOn();
|
||||
void IChatOff();
|
||||
hsBool IValidateAnimations();
|
||||
bool IValidateAnimations();
|
||||
|
||||
plAGModifier *fHandleAGMod; // the ag modifier that's attached to our top object
|
||||
double fStartedTurning; // when did we start turning?
|
||||
@ -236,9 +236,9 @@ public:
|
||||
plHBehavior();
|
||||
~plHBehavior();
|
||||
|
||||
void Init(plAGAnim *anim, hsBool loop, plAvBrainHuman *brain, plArmatureMod *body,
|
||||
void Init(plAGAnim *anim, bool loop, plAvBrainHuman *brain, plArmatureMod *body,
|
||||
float fadeIn, float fadeOut, uint8_t index, uint32_t type = 0);
|
||||
virtual hsBool PreCondition(double time, float elapsed) { return true; }
|
||||
virtual bool PreCondition(double time, float elapsed) { return true; }
|
||||
uint32_t GetType() const { return fType; }
|
||||
|
||||
protected:
|
||||
@ -264,43 +264,43 @@ class Idle : public plHBehavior
|
||||
class Run : public plHBehavior
|
||||
{
|
||||
public:
|
||||
virtual hsBool PreCondition(double time, float elapsed);
|
||||
virtual bool PreCondition(double time, float elapsed);
|
||||
};
|
||||
|
||||
class Walk : public plHBehavior
|
||||
{
|
||||
public:
|
||||
virtual hsBool PreCondition(double time, float elapsed);
|
||||
virtual bool PreCondition(double time, float elapsed);
|
||||
};
|
||||
|
||||
class WalkBack : public plHBehavior
|
||||
{
|
||||
public:
|
||||
virtual hsBool PreCondition(double time, float elapsed);
|
||||
virtual bool PreCondition(double time, float elapsed);
|
||||
};
|
||||
|
||||
class StepLeft : public plHBehavior
|
||||
{
|
||||
public:
|
||||
virtual hsBool PreCondition(double time, float elapsed);
|
||||
virtual bool PreCondition(double time, float elapsed);
|
||||
};
|
||||
|
||||
class StepRight : public plHBehavior
|
||||
{
|
||||
public:
|
||||
virtual hsBool PreCondition(double time, float elapsed);
|
||||
virtual bool PreCondition(double time, float elapsed);
|
||||
};
|
||||
|
||||
class StandingTurnLeft : public plHBehavior
|
||||
{
|
||||
public:
|
||||
virtual hsBool PreCondition(double time, float elapsed);
|
||||
virtual bool PreCondition(double time, float elapsed);
|
||||
};
|
||||
|
||||
class StandingTurnRight : public plHBehavior
|
||||
{
|
||||
public:
|
||||
virtual hsBool PreCondition(double time, float elapsed);
|
||||
virtual bool PreCondition(double time, float elapsed);
|
||||
};
|
||||
|
||||
class MovingTurn : public plHBehavior
|
||||
@ -314,19 +314,19 @@ protected:
|
||||
class MovingTurnLeft : public MovingTurn
|
||||
{
|
||||
public:
|
||||
virtual hsBool PreCondition(double time, float elapsed);
|
||||
virtual bool PreCondition(double time, float elapsed);
|
||||
};
|
||||
|
||||
class MovingTurnRight : public MovingTurn
|
||||
{
|
||||
public:
|
||||
virtual hsBool PreCondition(double time, float elapsed);
|
||||
virtual bool PreCondition(double time, float elapsed);
|
||||
};
|
||||
|
||||
class Jump : public plHBehavior
|
||||
{
|
||||
protected:
|
||||
hsBool fReleased;
|
||||
bool fReleased;
|
||||
virtual void IStart();
|
||||
virtual void IStop();
|
||||
|
||||
@ -337,26 +337,26 @@ public:
|
||||
class StandingJump : public Jump
|
||||
{
|
||||
public:
|
||||
virtual hsBool PreCondition(double time, float elapsed);
|
||||
virtual bool PreCondition(double time, float elapsed);
|
||||
};
|
||||
|
||||
class WalkingJump : public Jump
|
||||
{
|
||||
public:
|
||||
virtual hsBool PreCondition(double time, float elapsed);
|
||||
virtual bool PreCondition(double time, float elapsed);
|
||||
};
|
||||
|
||||
class RunningJump : public Jump
|
||||
{
|
||||
public:
|
||||
virtual hsBool PreCondition(double time, float elapsed);
|
||||
virtual bool PreCondition(double time, float elapsed);
|
||||
};
|
||||
|
||||
class GroundImpact : public plHBehavior
|
||||
{
|
||||
public:
|
||||
GroundImpact();
|
||||
virtual hsBool PreCondition(double time, float elapsed);
|
||||
virtual bool PreCondition(double time, float elapsed);
|
||||
|
||||
private:
|
||||
virtual void IStop();
|
||||
@ -367,7 +367,7 @@ class RunningImpact : public plHBehavior
|
||||
{
|
||||
public:
|
||||
RunningImpact();
|
||||
virtual hsBool PreCondition(double time, float elapsed);
|
||||
virtual bool PreCondition(double time, float elapsed);
|
||||
|
||||
private:
|
||||
virtual void IStop();
|
||||
@ -377,7 +377,7 @@ private:
|
||||
class Fall : public plHBehavior
|
||||
{
|
||||
public:
|
||||
virtual hsBool PreCondition(double time, float elapsed);
|
||||
virtual bool PreCondition(double time, float elapsed);
|
||||
virtual void Process(double time, float elapsed);
|
||||
};
|
||||
|
||||
@ -390,13 +390,13 @@ public:
|
||||
//class PushIdle : public Push
|
||||
//{
|
||||
//public:
|
||||
// virtual hsBool PreCondition(double time, float elapsed);
|
||||
// virtual bool PreCondition(double time, float elapsed);
|
||||
//};
|
||||
|
||||
class PushWalk : public Push
|
||||
{
|
||||
public:
|
||||
virtual hsBool PreCondition(double time, float elapsed);
|
||||
virtual bool PreCondition(double time, float elapsed);
|
||||
};
|
||||
|
||||
bool PushSimpleMultiStage(plArmatureMod *avatar, const char *enterAnim, const char *idleAnim,
|
||||
|
@ -72,7 +72,7 @@ void plAvBrainRideAnimatedPhysical::Deactivate()
|
||||
{
|
||||
plArmatureBrain::Deactivate();
|
||||
}
|
||||
hsBool plAvBrainRideAnimatedPhysical::MsgReceive(plMessage *msg)
|
||||
bool plAvBrainRideAnimatedPhysical::MsgReceive(plMessage *msg)
|
||||
{
|
||||
plRideAnimatedPhysMsg *ride = plRideAnimatedPhysMsg::ConvertNoRef(msg);
|
||||
if(ride)
|
||||
@ -88,9 +88,9 @@ hsBool plAvBrainRideAnimatedPhysical::MsgReceive(plMessage *msg)
|
||||
}
|
||||
return plArmatureBrain::MsgReceive(msg);
|
||||
}
|
||||
hsBool plAvBrainRideAnimatedPhysical::IInitAnimations()
|
||||
bool plAvBrainRideAnimatedPhysical::IInitAnimations()
|
||||
{
|
||||
hsBool result = false;
|
||||
bool result = false;
|
||||
|
||||
plAGAnim *idle = fAvMod->FindCustomAnim("Idle");
|
||||
plAGAnim *walk = fAvMod->FindCustomAnim("Walk");
|
||||
@ -180,11 +180,11 @@ hsBool plAvBrainRideAnimatedPhysical::IInitAnimations()
|
||||
}
|
||||
return result;
|
||||
}
|
||||
hsBool plAvBrainRideAnimatedPhysical::LeaveAge()
|
||||
bool plAvBrainRideAnimatedPhysical::LeaveAge()
|
||||
{
|
||||
return plArmatureBrain::LeaveAge();
|
||||
}
|
||||
hsBool plAvBrainRideAnimatedPhysical::Apply(double timeNow, float elapsed)
|
||||
bool plAvBrainRideAnimatedPhysical::Apply(double timeNow, float elapsed)
|
||||
{
|
||||
if(this->fMode==kAbort) return false;
|
||||
else return plAvBrainHuman::Apply(timeNow, elapsed);
|
||||
|
@ -56,10 +56,10 @@ public:
|
||||
~plAvBrainRideAnimatedPhysical();
|
||||
virtual void Activate(plArmatureModBase *avMod);
|
||||
virtual void Deactivate();
|
||||
virtual hsBool MsgReceive(plMessage *msg);
|
||||
virtual hsBool LeaveAge();
|
||||
virtual hsBool Apply(double timeNow, float elapsed);
|
||||
virtual bool MsgReceive(plMessage *msg);
|
||||
virtual bool LeaveAge();
|
||||
virtual bool Apply(double timeNow, float elapsed);
|
||||
protected:
|
||||
hsBool IInitAnimations();
|
||||
bool IInitAnimations();
|
||||
mode fMode;
|
||||
};
|
||||
|
@ -70,28 +70,28 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
|
||||
// still have effect on the armature; any messages which the top
|
||||
// brain doesn't handle will propagate down to the next brain in line.
|
||||
// */
|
||||
// virtual hsBool Activate(plArmatureMod *avMod);
|
||||
// virtual bool Activate(plArmatureMod *avMod);
|
||||
//
|
||||
// /** Has the brain resolved all its load-time dependencies? This is a mechanism
|
||||
// to allow newly loading creatures to reach a known state before they
|
||||
// are asked to load secondary state or to interact with the environment.
|
||||
// */
|
||||
// virtual hsBool IsReady();
|
||||
// virtual bool IsReady();
|
||||
//
|
||||
// /** This brain has just been removed from its armature and is about to be destructed. */
|
||||
// virtual hsBool Deactivate();
|
||||
// virtual bool Deactivate();
|
||||
//
|
||||
// /** This is the top brain and it's time for it to evaluate. Called during eval
|
||||
// time for the armature modifier. Only the topmost brain gets an apply
|
||||
// call; others must do any necessary background work during MsgReceive. */
|
||||
// virtual hsBool Apply(double timeNow, hsScalar elapsed);
|
||||
// virtual bool Apply(double timeNow, hsScalar elapsed);
|
||||
//
|
||||
// /** Another brain has been pushed atop this brain. Drop into the background.
|
||||
// We'll still receive any messages that the upper brain doesn't eat. */
|
||||
// virtual hsBool Suspend();
|
||||
// virtual bool Suspend();
|
||||
//
|
||||
// /** We were suspended, but now we're on top of the brain stack again. */
|
||||
// virtual hsBool Resume();
|
||||
// virtual bool Resume();
|
||||
//
|
||||
// // \name Spawning \{
|
||||
// /** Do any necessary custom action upon spawning afresh in a new age.
|
||||
@ -100,7 +100,7 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
|
||||
// virtual void Spawn(double timeNow) {};
|
||||
//
|
||||
// /** Custom behavior for entering an age. Binding the camera, audio source, etc. */
|
||||
// virtual void EnterAge(hsBool reSpawn) {};
|
||||
// virtual void EnterAge(bool reSpawn) {};
|
||||
//
|
||||
// /** Custom behavior for leaving an age. Free any attachments to camera, audio, etc. */
|
||||
// virtual void LeaveAge() {};
|
||||
@ -127,7 +127,7 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
|
||||
// virtual void SaveAux(hsStream *stream, hsResMgr *mgr);
|
||||
// virtual void LoadAux(hsStream *stream, hsResMgr *mgr, double time);
|
||||
//
|
||||
// virtual hsBool MsgReceive(plMessage *msg);
|
||||
// virtual bool MsgReceive(plMessage *msg);
|
||||
//
|
||||
//
|
||||
//protected:
|
||||
@ -139,9 +139,9 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
|
||||
// plAvTaskQueue fTaskQueue; // FIFO queue of tasks we're working on
|
||||
// plAvTask *fCurTask; // the task we're working on right now
|
||||
// // -- methods
|
||||
// virtual hsBool IHandleTaskMsg(plAvTaskMsg *msg); // respond to a task scheduling message
|
||||
// virtual bool IHandleTaskMsg(plAvTaskMsg *msg); // respond to a task scheduling message
|
||||
// void IProcessTasks(double time, hsScalar elapsed); // process current task and start new one if necessary
|
||||
//
|
||||
// hsBool fSuspended;
|
||||
// bool fSuspended;
|
||||
//};
|
||||
//
|
||||
|
@ -91,14 +91,14 @@ public:
|
||||
plSwimBehavior() : fAvMod(nil), fSwimBrain(nil) {}
|
||||
virtual ~plSwimBehavior() {}
|
||||
|
||||
void Init(plAGAnim *anim, hsBool loop, plAvBrainSwim *brain, plArmatureMod *body, uint8_t index)
|
||||
void Init(plAGAnim *anim, bool loop, plAvBrainSwim *brain, plArmatureMod *body, uint8_t index)
|
||||
{
|
||||
plArmatureBehavior::Init(anim, loop, brain, body, index);
|
||||
fAvMod = body;
|
||||
fSwimBrain = brain;
|
||||
}
|
||||
|
||||
virtual hsBool PreCondition(double time, float elapsed) { return true; }
|
||||
virtual bool PreCondition(double time, float elapsed) { return true; }
|
||||
|
||||
protected:
|
||||
virtual void IStart()
|
||||
@ -121,7 +121,7 @@ class SwimForward: public plSwimBehavior
|
||||
{
|
||||
public:
|
||||
/** Walk key is down, fast key is not down */
|
||||
virtual hsBool PreCondition(double time, float elapsed)
|
||||
virtual bool PreCondition(double time, float elapsed)
|
||||
{
|
||||
return (fAvMod->ForwardKeyDown() && !fAvMod->FastKeyDown());
|
||||
}
|
||||
@ -130,7 +130,7 @@ public:
|
||||
class SwimForwardFast: public plSwimBehavior
|
||||
{
|
||||
public:
|
||||
virtual hsBool PreCondition(double time, float elapsed)
|
||||
virtual bool PreCondition(double time, float elapsed)
|
||||
{
|
||||
return (fAvMod->ForwardKeyDown() && fAvMod->FastKeyDown());
|
||||
}
|
||||
@ -139,7 +139,7 @@ public:
|
||||
class SwimBack : public plSwimBehavior
|
||||
{
|
||||
public:
|
||||
virtual hsBool PreCondition(double time, float elapsed)
|
||||
virtual bool PreCondition(double time, float elapsed)
|
||||
{
|
||||
return (fAvMod->BackwardKeyDown());
|
||||
}
|
||||
@ -152,7 +152,7 @@ class TreadWater: public plSwimBehavior
|
||||
class SwimLeft : public plSwimBehavior
|
||||
{
|
||||
public:
|
||||
virtual hsBool PreCondition(double time, float elapsed)
|
||||
virtual bool PreCondition(double time, float elapsed)
|
||||
{
|
||||
return ((fAvMod->StrafeLeftKeyDown() || (fAvMod->StrafeKeyDown() && fAvMod->TurnLeftKeyDown())) &&
|
||||
!(fAvMod->StrafeRightKeyDown() || (fAvMod->StrafeKeyDown() && fAvMod->TurnRightKeyDown())) &&
|
||||
@ -163,7 +163,7 @@ public:
|
||||
class SwimRight : public plSwimBehavior
|
||||
{
|
||||
public:
|
||||
virtual hsBool PreCondition(double time, float elapsed)
|
||||
virtual bool PreCondition(double time, float elapsed)
|
||||
{
|
||||
return ((fAvMod->StrafeRightKeyDown() || (fAvMod->StrafeKeyDown() && fAvMod->TurnRightKeyDown())) &&
|
||||
!(fAvMod->StrafeLeftKeyDown() || (fAvMod->StrafeKeyDown() && fAvMod->TurnLeftKeyDown())) &&
|
||||
@ -199,7 +199,7 @@ public:
|
||||
class SwimTurnLeft : public SwimTurn
|
||||
{
|
||||
public:
|
||||
virtual hsBool PreCondition(double time, float elapsed)
|
||||
virtual bool PreCondition(double time, float elapsed)
|
||||
{
|
||||
return (fAvMod->GetTurnStrength() > 0 && (fAvMod->ForwardKeyDown() || fAvMod->BackwardKeyDown()));
|
||||
}
|
||||
@ -208,7 +208,7 @@ public:
|
||||
class SwimTurnRight : public SwimTurn
|
||||
{
|
||||
public:
|
||||
virtual hsBool PreCondition(double time, float elapsed)
|
||||
virtual bool PreCondition(double time, float elapsed)
|
||||
{
|
||||
return (fAvMod->GetTurnStrength() < 0 && (fAvMod->ForwardKeyDown() || fAvMod->BackwardKeyDown()));
|
||||
}
|
||||
@ -217,7 +217,7 @@ public:
|
||||
class TreadTurnLeft : public plSwimBehavior
|
||||
{
|
||||
public:
|
||||
virtual hsBool PreCondition(double time, float elapsed)
|
||||
virtual bool PreCondition(double time, float elapsed)
|
||||
{
|
||||
return (fAvMod->TurnLeftKeyDown() && !fAvMod->ForwardKeyDown() && !fAvMod->BackwardKeyDown());
|
||||
}
|
||||
@ -226,7 +226,7 @@ public:
|
||||
class TreadTurnRight : public plSwimBehavior
|
||||
{
|
||||
public:
|
||||
virtual hsBool PreCondition(double time, float elapsed)
|
||||
virtual bool PreCondition(double time, float elapsed)
|
||||
{
|
||||
return (fAvMod->TurnRightKeyDown() && !fAvMod->ForwardKeyDown() && !fAvMod->BackwardKeyDown());
|
||||
}
|
||||
@ -263,7 +263,7 @@ plAvBrainSwim::~plAvBrainSwim()
|
||||
delete fBehaviors[i];
|
||||
}
|
||||
|
||||
hsBool plAvBrainSwim::Apply(double time, float elapsed)
|
||||
bool plAvBrainSwim::Apply(double time, float elapsed)
|
||||
{
|
||||
IProbeSurface();
|
||||
if (fMode == kWalking)
|
||||
@ -328,7 +328,7 @@ hsBool plAvBrainSwim::Apply(double time, float elapsed)
|
||||
return plArmatureBrain::Apply(time, elapsed);
|
||||
}
|
||||
|
||||
hsBool plAvBrainSwim::MsgReceive(plMessage *msg)
|
||||
bool plAvBrainSwim::MsgReceive(plMessage *msg)
|
||||
{
|
||||
plLOSHitMsg *losHit = plLOSHitMsg::ConvertNoRef(msg);
|
||||
if (losHit)
|
||||
@ -495,7 +495,7 @@ void plAvBrainSwim::IStartSwimming(bool is2D)
|
||||
}
|
||||
}
|
||||
|
||||
hsBool plAvBrainSwim::IProcessSwimming2D(double time, float elapsed)
|
||||
bool plAvBrainSwim::IProcessSwimming2D(double time, float elapsed)
|
||||
{
|
||||
int i;
|
||||
for (i = 0; i < fBehaviors.GetCount(); i++)
|
||||
@ -515,13 +515,13 @@ hsBool plAvBrainSwim::IProcessSwimming2D(double time, float elapsed)
|
||||
return true;
|
||||
}
|
||||
|
||||
hsBool plAvBrainSwim::IProcessSwimming3D(double time, float elapsed)
|
||||
bool plAvBrainSwim::IProcessSwimming3D(double time, float elapsed)
|
||||
{
|
||||
fAvMod->ApplyAnimations(time, elapsed);
|
||||
return true;
|
||||
}
|
||||
|
||||
hsBool plAvBrainSwim::IInitAnimations()
|
||||
bool plAvBrainSwim::IInitAnimations()
|
||||
{
|
||||
plAGAnim *treadWater = fAvMod->FindCustomAnim("SwimIdle");
|
||||
plAGAnim *swimForward = fAvMod->FindCustomAnim("SwimSlow");
|
||||
@ -631,7 +631,7 @@ void plAvBrainSwim::IProbeSurface()
|
||||
fSurfaceProbeMsg->SendAndKeep();
|
||||
}
|
||||
|
||||
hsBool plAvBrainSwim::IHandleControlMsg(plControlEventMsg* msg)
|
||||
bool plAvBrainSwim::IHandleControlMsg(plControlEventMsg* msg)
|
||||
{
|
||||
ControlEventCode moveCode = msg->GetControlCode();
|
||||
if (msg->ControlActivated())
|
||||
|
@ -62,12 +62,12 @@ public:
|
||||
GETINTERFACE_ANY( plAvBrainSwim, plArmatureBrain );
|
||||
|
||||
virtual void Activate(plArmatureModBase *avMod);
|
||||
hsBool Apply(double time, float elapsed);
|
||||
bool Apply(double time, float elapsed);
|
||||
virtual void Deactivate();
|
||||
virtual void Suspend();
|
||||
virtual void Resume();
|
||||
virtual void DumpToDebugDisplay(int &x, int &y, int lineHeight, char *strBuf, plDebugText &debugTxt);
|
||||
hsBool MsgReceive(plMessage *msg);
|
||||
bool MsgReceive(plMessage *msg);
|
||||
bool IsWalking();
|
||||
bool IsWading();
|
||||
bool IsSwimming();
|
||||
@ -79,17 +79,17 @@ public:
|
||||
protected:
|
||||
void IStartWading();
|
||||
void IStartSwimming(bool is2D);
|
||||
hsBool IProcessSwimming2D(double time, float elapsed);
|
||||
hsBool IProcessSwimming3D(double time, float elapsed);
|
||||
hsBool IProcessWading(double time, float elapsed);
|
||||
hsBool IProcessClimbingOut(double time, float elapsed);
|
||||
hsBool IProcessBehaviors(double time, float elapsed);
|
||||
bool IProcessSwimming2D(double time, float elapsed);
|
||||
bool IProcessSwimming3D(double time, float elapsed);
|
||||
bool IProcessWading(double time, float elapsed);
|
||||
bool IProcessClimbingOut(double time, float elapsed);
|
||||
bool IProcessBehaviors(double time, float elapsed);
|
||||
|
||||
virtual hsBool IInitAnimations();
|
||||
virtual bool IInitAnimations();
|
||||
bool IAttachAction();
|
||||
bool IDetachAction();
|
||||
void IProbeSurface();
|
||||
hsBool IHandleControlMsg(plControlEventMsg* msg);
|
||||
bool IHandleControlMsg(plControlEventMsg* msg);
|
||||
float IGetTargetZ();
|
||||
|
||||
float fSurfaceDistance;
|
||||
|
@ -48,7 +48,7 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
|
||||
#include "plPhysicalControllerCore.h"
|
||||
|
||||
// Generic geom utils.
|
||||
static hsBool LinearVelocity(hsVector3 &outputV, float elapsed, hsMatrix44 &prevMat, hsMatrix44 &curMat);
|
||||
static bool LinearVelocity(hsVector3 &outputV, float elapsed, hsMatrix44 &prevMat, hsMatrix44 &curMat);
|
||||
static void AngularVelocity(float &outputV, float elapsed, hsMatrix44 &prevMat, hsMatrix44 &curMat);
|
||||
static float AngleRad2d (float x1, float y1, float x3, float y3);
|
||||
inline hsVector3 GetYAxis(hsMatrix44 &mat)
|
||||
@ -66,7 +66,7 @@ plAnimatedController::plAnimatedController(plSceneObject* rootObject, plAGApplic
|
||||
{
|
||||
}
|
||||
|
||||
void plAnimatedController::RecalcVelocity(double timeNow, double timePrev, hsBool useAnim /* = true */)
|
||||
void plAnimatedController::RecalcVelocity(double timeNow, double timePrev, bool useAnim /* = true */)
|
||||
{
|
||||
if (useAnim)
|
||||
{
|
||||
@ -120,7 +120,7 @@ plWalkingController::plWalkingController(plSceneObject* rootObject, plAGApplicat
|
||||
fWalkingStrategy = nil;
|
||||
}
|
||||
|
||||
void plWalkingController::RecalcVelocity(double timeNow, double timePrev, hsBool useAnim)
|
||||
void plWalkingController::RecalcVelocity(double timeNow, double timePrev, bool useAnim)
|
||||
{
|
||||
if (!fHitGroundInThisAge && fController && fController->IsEnabled() && fWalkingStrategy->IsOnGround())
|
||||
fHitGroundInThisAge = true; // if we're not pinned and we're not in an age yet, we are now.
|
||||
@ -215,9 +215,9 @@ void plWalkingController::Update()
|
||||
// double elapsed = time.asDouble() - getRefresh().asDouble();
|
||||
// setRefresh(time);
|
||||
//
|
||||
// hsBool isPhysical = !fPhysical->GetProperty(plSimulationInterface::kPinned);
|
||||
// bool isPhysical = !fPhysical->GetProperty(plSimulationInterface::kPinned);
|
||||
// const Havok::Vector3 straightUp(0.0f, 0.0f, 1.0f);
|
||||
// hsBool alreadyInAge = fHitGroundInThisAge;
|
||||
// bool alreadyInAge = fHitGroundInThisAge;
|
||||
//
|
||||
// int numContacts = fPhysical->GetNumContacts();
|
||||
// bool ground = false;
|
||||
@ -490,7 +490,7 @@ static float AngleRad2d ( float x1, float y1, float x3, float y3 )
|
||||
return value;
|
||||
}
|
||||
|
||||
static hsBool LinearVelocity(hsVector3 &outputV, float elapsed, hsMatrix44 &prevMat, hsMatrix44 &curMat)
|
||||
static bool LinearVelocity(hsVector3 &outputV, float elapsed, hsMatrix44 &prevMat, hsMatrix44 &curMat)
|
||||
{
|
||||
bool result = false;
|
||||
|
||||
@ -531,7 +531,7 @@ static hsBool LinearVelocity(hsVector3 &outputV, float elapsed, hsMatrix44 &prev
|
||||
float yfabs = fabs(prev2Now.fY);
|
||||
float zfabs = fabs(prev2Now.fZ);
|
||||
static const float maxVel = 20.0f;
|
||||
hsBool valid = xfabs < maxVel && yfabs < maxVel && zfabs < maxVel;
|
||||
bool valid = xfabs < maxVel && yfabs < maxVel && zfabs < maxVel;
|
||||
|
||||
if (valid)
|
||||
{
|
||||
@ -552,13 +552,13 @@ static void AngularVelocity(float &outputV, float elapsed, hsMatrix44 &prevMat,
|
||||
hsVector3 curForward = GetYAxis(curMat);
|
||||
|
||||
float angleSincePrev = AngleRad2d(curForward.fX, curForward.fY, prevForward.fX, prevForward.fY);
|
||||
hsBool sincePrevSign = angleSincePrev > 0.0f;
|
||||
bool sincePrevSign = angleSincePrev > 0.0f;
|
||||
if (angleSincePrev > M_PI)
|
||||
angleSincePrev = angleSincePrev - TWO_PI;
|
||||
|
||||
const hsVector3 startForward = hsVector3(0, -1.0, 0); // the Y orientation of a "resting" armature....
|
||||
float angleSinceStart = AngleRad2d(curForward.fX, curForward.fY, startForward.fX, startForward.fY);
|
||||
hsBool sinceStartSign = angleSinceStart > 0.0f;
|
||||
bool sinceStartSign = angleSinceStart > 0.0f;
|
||||
if (angleSinceStart > M_PI)
|
||||
angleSinceStart = angleSinceStart - TWO_PI;
|
||||
|
||||
|
@ -132,7 +132,7 @@ class plAnimatedController : public plAvatarController
|
||||
public:
|
||||
plAnimatedController(plSceneObject* rootObject, plAGApplicator* rootApp, plPhysicalControllerCore* controller);
|
||||
|
||||
virtual void RecalcVelocity(double timeNow, double timePrev, hsBool useAnim = true);
|
||||
virtual void RecalcVelocity(double timeNow, double timePrev, bool useAnim = true);
|
||||
void SetTurnStrength(float val) { fTurnStr = val; }
|
||||
float GetTurnStrength() { return fTurnStr; }
|
||||
virtual void ActivateController()=0;
|
||||
@ -150,7 +150,7 @@ class plWalkingController : public plAnimatedController
|
||||
public:
|
||||
plWalkingController(plSceneObject* rootObject, plAGApplicator* rootApp, plPhysicalControllerCore* controller);
|
||||
virtual ~plWalkingController();
|
||||
virtual void RecalcVelocity(double timeNow, double timePrev, hsBool useAnim = true);
|
||||
virtual void RecalcVelocity(double timeNow, double timePrev, bool useAnim = true);
|
||||
|
||||
void Reset(bool newAge);
|
||||
bool IsControlledFlight() const { return fControlledFlight != 0; }
|
||||
@ -199,8 +199,8 @@ public :
|
||||
fSwimmingStrategy->SetSurface(region,surfaceHeight);
|
||||
}
|
||||
float GetBuoyancy() { return fSwimmingStrategy->GetBuoyancy(); }
|
||||
hsBool IsOnGround() { return fSwimmingStrategy->IsOnGround(); }
|
||||
hsBool HadContacts() { return fSwimmingStrategy->HadContacts();}
|
||||
bool IsOnGround() { return fSwimmingStrategy->IsOnGround(); }
|
||||
bool HadContacts() { return fSwimmingStrategy->HadContacts();}
|
||||
void Enable(bool en){if (fController) fController->Enable(en);}
|
||||
plPhysicalControllerCore* GetController(){return fController;}
|
||||
virtual void ActivateController(){fSwimmingStrategy->RefreshConnectionToControllerCore();}
|
||||
|
@ -164,7 +164,7 @@ void plAvLadderMod::ITriggerSelf(plKey avKey)
|
||||
}
|
||||
|
||||
// MSGRECEIVE
|
||||
hsBool plAvLadderMod::MsgReceive(plMessage* msg)
|
||||
bool plAvLadderMod::MsgReceive(plMessage* msg)
|
||||
{
|
||||
// Avatar is entering or exiting our detector box
|
||||
plCollideMsg* collMsg = plCollideMsg::ConvertNoRef(msg);
|
||||
@ -337,8 +337,8 @@ void plAvLadderMod::Read(hsStream *stream, hsResMgr *mgr)
|
||||
|
||||
fType = stream->ReadLE32();
|
||||
fLoops = stream->ReadLE32();
|
||||
fGoingUp = stream->Readbool();
|
||||
fEnabled = stream->Readbool();
|
||||
fGoingUp = stream->ReadBool();
|
||||
fEnabled = stream->ReadBool();
|
||||
fLadderView.fX = stream->ReadLEScalar();
|
||||
fLadderView.fY = stream->ReadLEScalar();
|
||||
fLadderView.fZ = stream->ReadLEScalar();
|
||||
@ -350,7 +350,7 @@ void plAvLadderMod::Write(hsStream *stream, hsResMgr *mgr)
|
||||
|
||||
stream->WriteLE32(fType);
|
||||
stream->WriteLE32(fLoops);
|
||||
stream->Writebool(fGoingUp);
|
||||
stream->WriteBool(fGoingUp);
|
||||
stream->WriteBool(fEnabled);
|
||||
stream->WriteLEScalar(fLadderView.fX);
|
||||
stream->WriteLEScalar(fLadderView.fY);
|
||||
|
@ -61,7 +61,7 @@ public:
|
||||
GETINTERFACE_ANY( plAvLadderMod, plSingleModifier );
|
||||
|
||||
// virtual void AddTarget(plSceneObject* so) { SetTarget(so); }
|
||||
virtual hsBool MsgReceive(plMessage* msg);
|
||||
virtual bool MsgReceive(plMessage* msg);
|
||||
|
||||
virtual void Read(hsStream* stream, hsResMgr* mgr);
|
||||
virtual void Write(hsStream* stream, hsResMgr* mgr);
|
||||
@ -78,7 +78,7 @@ public:
|
||||
void SetEnabled(bool enabled) { fEnabled = enabled; }
|
||||
|
||||
protected:
|
||||
virtual hsBool IEval(double secs, float del, uint32_t dirty) {return true;}
|
||||
virtual bool IEval(double secs, float del, uint32_t dirty) {return true;}
|
||||
bool IIsReadyToClimb();
|
||||
void ITriggerSelf(plKey avKey);
|
||||
|
||||
|
@ -82,11 +82,11 @@ public:
|
||||
|
||||
/** Start the task: set up initial conditions or wait for resources to become available.
|
||||
Start will be called repeatedly until it returns true, indicating the task has begun. */
|
||||
virtual hsBool Start(plArmatureMod *avatar, plArmatureBrain *brain, double time, float elapsed);
|
||||
virtual bool Start(plArmatureMod *avatar, plArmatureBrain *brain, double time, float elapsed);
|
||||
|
||||
/** Run the task. Start is guaranteed to have returned true before Process() is called even once.
|
||||
Returns false when the task has finished and epilogue code has been executed. */
|
||||
virtual hsBool Process(plArmatureMod *avatar, plArmatureBrain *brain, double time, float elapsed);
|
||||
virtual bool Process(plArmatureMod *avatar, plArmatureBrain *brain, double time, float elapsed);
|
||||
|
||||
/** Clean up the task. This is guaranteed to be called when Process returns false. */
|
||||
virtual void Finish(plArmatureMod *avatar, plArmatureBrain *brain, double time, float elapsed);
|
||||
|
@ -75,7 +75,7 @@ plAvTaskBrain::~plAvTaskBrain()
|
||||
|
||||
// Start ------------------------------------------------------------------------------------------
|
||||
// ------
|
||||
hsBool plAvTaskBrain::Start(plArmatureMod *avatar, plArmatureBrain *brain, double time, float elapsed)
|
||||
bool plAvTaskBrain::Start(plArmatureMod *avatar, plArmatureBrain *brain, double time, float elapsed)
|
||||
{
|
||||
if(fBrain)
|
||||
avatar->PushBrain(fBrain);
|
||||
|
@ -71,7 +71,7 @@ public:
|
||||
virtual ~plAvTaskBrain();
|
||||
|
||||
// task protocol
|
||||
virtual hsBool Start(plArmatureMod *avatar, plArmatureBrain *brain, double time, float elapsed);
|
||||
virtual bool Start(plArmatureMod *avatar, plArmatureBrain *brain, double time, float elapsed);
|
||||
virtual void Finish(plArmatureMod *avatar, plArmatureBrain *brain, double time, float elapsed);
|
||||
|
||||
/** dump descriptive stuff to the given debug text */
|
||||
|
@ -89,7 +89,7 @@ void MakeMatrixUpright(hsMatrix44 &mat);
|
||||
#define kDefaultMaxSidleRange 4.0f
|
||||
#define kDefaultMaxSidleAngle 0.2f
|
||||
|
||||
hsBool plAvTaskSeek::fLogProcess = false;
|
||||
bool plAvTaskSeek::fLogProcess = false;
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
@ -203,7 +203,7 @@ void plAvTaskSeek::SetTarget(hsPoint3 &pos, hsPoint3 &lookAt)
|
||||
|
||||
// Start -----------------------------------------------------------------------------------------
|
||||
// ------
|
||||
hsBool plAvTaskSeek::Start(plArmatureMod *avatar, plArmatureBrain *brain, double time, float elapsed)
|
||||
bool plAvTaskSeek::Start(plArmatureMod *avatar, plArmatureBrain *brain, double time, float elapsed)
|
||||
{
|
||||
plAvBrainHuman *huBrain = plAvBrainHuman::ConvertNoRef(brain);
|
||||
hsAssert(huBrain, "Seek task only works on human brains");
|
||||
@ -243,7 +243,7 @@ hsBool plAvTaskSeek::Start(plArmatureMod *avatar, plArmatureBrain *brain, double
|
||||
|
||||
// Process -------------------------------------------------------------------------------------------
|
||||
// --------
|
||||
hsBool plAvTaskSeek::Process(plArmatureMod *avatar, plArmatureBrain *brain, double time, float elapsed)
|
||||
bool plAvTaskSeek::Process(plArmatureMod *avatar, plArmatureBrain *brain, double time, float elapsed)
|
||||
{
|
||||
if (fState == kSeekAbort)
|
||||
return false;
|
||||
@ -257,7 +257,7 @@ hsBool plAvTaskSeek::Process(plArmatureMod *avatar, plArmatureBrain *brain, doub
|
||||
}
|
||||
|
||||
IAnalyze(avatar);
|
||||
hsBool result = IMoveTowardsGoal(avatar, uBrain, time, elapsed);
|
||||
bool result = IMoveTowardsGoal(avatar, uBrain, time, elapsed);
|
||||
if (fLogProcess)
|
||||
DumpToAvatarLog(avatar);
|
||||
return result;
|
||||
@ -311,7 +311,7 @@ void plAvTaskSeek::LeaveAge(plArmatureMod *avatar)
|
||||
|
||||
// IAnalyze ----------------------------------------
|
||||
// ---------
|
||||
hsBool plAvTaskSeek::IAnalyze(plArmatureMod *avatar)
|
||||
bool plAvTaskSeek::IAnalyze(plArmatureMod *avatar)
|
||||
{
|
||||
avatar->GetPositionAndRotationSim(&fPosition, &fRotation);
|
||||
hsScalarTriple tmp(fSeekPos - fPosition);
|
||||
@ -350,7 +350,7 @@ hsBool plAvTaskSeek::IAnalyze(plArmatureMod *avatar)
|
||||
|
||||
// IMoveTowardsGoal --------------------------------------------------------------
|
||||
// -----------------
|
||||
hsBool plAvTaskSeek::IMoveTowardsGoal(plArmatureMod *avatar, plAvBrainHuman *brain,
|
||||
bool plAvTaskSeek::IMoveTowardsGoal(plArmatureMod *avatar, plAvBrainHuman *brain,
|
||||
double time, float elapsed)
|
||||
{
|
||||
bool stillRunning = true;
|
||||
@ -438,7 +438,7 @@ hsBool plAvTaskSeek::IMoveTowardsGoal(plArmatureMod *avatar, plAvBrainHuman *bra
|
||||
// ITRYFINISH
|
||||
bool plAvTaskSeek::ITryFinish(plArmatureMod *avatar, plAvBrainHuman *brain, double time, float elapsed)
|
||||
{
|
||||
hsBool animsDone = brain->IsMovementZeroBlend();
|
||||
bool animsDone = brain->IsMovementZeroBlend();
|
||||
|
||||
hsPoint3 newPosition = fPosition;
|
||||
hsQuat newRotation = fRotation;
|
||||
@ -457,7 +457,7 @@ bool plAvTaskSeek::ITryFinish(plArmatureMod *avatar, plAvBrainHuman *brain, doub
|
||||
return fStillPositioning || fStillRotating || !animsDone;
|
||||
}
|
||||
|
||||
hsBool plAvTaskSeek::IFinishPosition(hsPoint3 &newPosition,
|
||||
bool plAvTaskSeek::IFinishPosition(hsPoint3 &newPosition,
|
||||
plArmatureMod *avatar, plAvBrainHuman *brain,
|
||||
double time, float elapsed)
|
||||
{
|
||||
@ -493,7 +493,7 @@ hsBool plAvTaskSeek::IFinishPosition(hsPoint3 &newPosition,
|
||||
|
||||
// IFinishRotation --------------------------------------
|
||||
// ----------------
|
||||
hsBool plAvTaskSeek::IFinishRotation(hsQuat &newRotation,
|
||||
bool plAvTaskSeek::IFinishRotation(hsQuat &newRotation,
|
||||
plArmatureMod *avatar, plAvBrainHuman *brain,
|
||||
double time, float elapsed)
|
||||
{
|
||||
@ -504,7 +504,7 @@ hsBool plAvTaskSeek::IFinishRotation(hsQuat &newRotation,
|
||||
|
||||
// IUpdateObjective ----------------------------------------
|
||||
// -----------------
|
||||
hsBool plAvTaskSeek::IUpdateObjective(plArmatureMod *avatar)
|
||||
bool plAvTaskSeek::IUpdateObjective(plArmatureMod *avatar)
|
||||
{
|
||||
// This is an entirely valid case. It just means our goal is fixed.
|
||||
if (fSeekObject == nil)
|
||||
|
@ -56,7 +56,7 @@ class plSceneObject;
|
||||
class plAvTaskSeek : public plAvTask
|
||||
{
|
||||
public:
|
||||
static hsBool fLogProcess;
|
||||
static bool fLogProcess;
|
||||
|
||||
enum State {
|
||||
kSeekRunNormal,
|
||||
@ -82,12 +82,12 @@ public:
|
||||
|
||||
/** Initiate the task; make sure we're running on the right type of brain, save off
|
||||
user input state, and turn off any other running behaviors.*/
|
||||
virtual hsBool Start(plArmatureMod *avatar, plArmatureBrain *brain, double time, float elapsed);
|
||||
virtual bool Start(plArmatureMod *avatar, plArmatureBrain *brain, double time, float elapsed);
|
||||
|
||||
/** Progress towards the goal using a combination of walking and cheating-via-sliding.
|
||||
Returns true if we're still working on it; false if we're done. */
|
||||
|
||||
virtual hsBool Process(plArmatureMod *avatar, plArmatureBrain *brain, double time, float elapsed);
|
||||
virtual bool Process(plArmatureMod *avatar, plArmatureBrain *brain, double time, float elapsed);
|
||||
|
||||
/** Restore user input state, etc. */
|
||||
virtual void Finish(plArmatureMod *avatar, plArmatureBrain *brain, double time, float elapsed);
|
||||
@ -116,27 +116,27 @@ protected:
|
||||
|
||||
/** Make some observations about our current relation to our target.
|
||||
Done every frame. */
|
||||
hsBool IAnalyze(plArmatureMod *avatar);
|
||||
bool IAnalyze(plArmatureMod *avatar);
|
||||
|
||||
/** Progress towards the goal. We get as close as we can by just pushing the same
|
||||
buttons as the user (forward, turn, etc.) when we're really close we slide
|
||||
around a bit so we can wind up on the *exact* initial orientation. */
|
||||
hsBool IMoveTowardsGoal(plArmatureMod *avatar, plAvBrainHuman *brain, double time, float elapsed);
|
||||
bool IMoveTowardsGoal(plArmatureMod *avatar, plAvBrainHuman *brain, double time, float elapsed);
|
||||
|
||||
/** Okay, we're in the pure cheating mode now. Try to wrap it up;
|
||||
returns true when it's finally there. */
|
||||
bool ITryFinish(plArmatureMod *avatar, plAvBrainHuman *brain, double time, float elapsed);
|
||||
|
||||
/** Final cheating for position */
|
||||
hsBool IFinishPosition(hsPoint3 &newPosition, plArmatureMod *avatar, plAvBrainHuman *brain,
|
||||
bool IFinishPosition(hsPoint3 &newPosition, plArmatureMod *avatar, plAvBrainHuman *brain,
|
||||
double time, float elapsed);
|
||||
|
||||
/** Final cheating for rotation */
|
||||
hsBool IFinishRotation(hsQuat &newRotation, plArmatureMod *avatar, plAvBrainHuman *brain,
|
||||
bool IFinishRotation(hsQuat &newRotation, plArmatureMod *avatar, plAvBrainHuman *brain,
|
||||
double time, float elapsed);
|
||||
|
||||
/** If our target's moving, cache its new position and orientation for later math */
|
||||
hsBool IUpdateObjective(plArmatureMod *avatar);
|
||||
bool IUpdateObjective(plArmatureMod *avatar);
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
@ -163,11 +163,11 @@ protected:
|
||||
// These are set to true once we EVER get close enough to the goal, so that if we fall out
|
||||
// of range from the anim blend out, we don't later try and correct again, and get in a fun
|
||||
// little back-and-forth loop.
|
||||
hsBool fPosGoalHit;
|
||||
hsBool fRotGoalHit;
|
||||
bool fPosGoalHit;
|
||||
bool fRotGoalHit;
|
||||
|
||||
hsBool fStillPositioning; // haven't yet reached the final position
|
||||
hsBool fStillRotating; // haven't yet reached the final orientation
|
||||
bool fStillPositioning; // haven't yet reached the final position
|
||||
bool fStillRotating; // haven't yet reached the final orientation
|
||||
|
||||
hsVector3 fGoalVec; // vec from us to the goal
|
||||
float fDistance; // how far to the goal?
|
||||
|
@ -111,7 +111,7 @@ plClothingItem::~plClothingItem()
|
||||
delete [] fAccessoryName;
|
||||
}
|
||||
|
||||
hsBool plClothingItem::CanWearWith(plClothingItem *item)
|
||||
bool plClothingItem::CanWearWith(plClothingItem *item)
|
||||
{
|
||||
// For now, you can only wear one shirt, one pair of pants, etc.
|
||||
// Except accessories, of which you're allowed one per tileset.
|
||||
@ -121,7 +121,7 @@ hsBool plClothingItem::CanWearWith(plClothingItem *item)
|
||||
//&& item->fTileset != fTileset));
|
||||
}
|
||||
|
||||
hsBool plClothingItem::WearBefore(plClothingItem *item)
|
||||
bool plClothingItem::WearBefore(plClothingItem *item)
|
||||
{
|
||||
// Accessories come last
|
||||
// Face comes first
|
||||
@ -142,7 +142,7 @@ hsBool plClothingItem::WearBefore(plClothingItem *item)
|
||||
return myPri < otherPri;
|
||||
}
|
||||
|
||||
hsBool plClothingItem::HasBaseAlpha()
|
||||
bool plClothingItem::HasBaseAlpha()
|
||||
{
|
||||
int i;
|
||||
for (i = 0; i < fElements.GetCount(); i++)
|
||||
@ -155,7 +155,7 @@ hsBool plClothingItem::HasBaseAlpha()
|
||||
return false;
|
||||
}
|
||||
|
||||
hsBool plClothingItem::HasSameMeshes(plClothingItem *other)
|
||||
bool plClothingItem::HasSameMeshes(plClothingItem *other)
|
||||
{
|
||||
int i;
|
||||
for (i = 0; i < kMaxNumLODLevels; i++)
|
||||
@ -293,7 +293,7 @@ void plClothingItem::Write(hsStream *s, hsResMgr *mgr)
|
||||
}
|
||||
}
|
||||
|
||||
hsBool plClothingItem::MsgReceive(plMessage* msg)
|
||||
bool plClothingItem::MsgReceive(plMessage* msg)
|
||||
{
|
||||
plElementRefMsg *eMsg = plElementRefMsg::ConvertNoRef(msg);
|
||||
if (eMsg)
|
||||
@ -371,7 +371,7 @@ hsBool plClothingItem::MsgReceive(plMessage* msg)
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
hsBool plClosetItem::IsMatch(plClosetItem *other)
|
||||
bool plClosetItem::IsMatch(plClosetItem *other)
|
||||
{
|
||||
return (fItem == other->fItem && fOptions.IsMatch(&other->fOptions));
|
||||
}
|
||||
@ -407,7 +407,7 @@ void plClothingBase::Write(hsStream* s, hsResMgr* mgr)
|
||||
s->WriteSafeString(fLayoutName);
|
||||
}
|
||||
|
||||
hsBool plClothingBase::MsgReceive(plMessage* msg)
|
||||
bool plClothingBase::MsgReceive(plMessage* msg)
|
||||
{
|
||||
plGenRefMsg *refMsg = plGenRefMsg::ConvertNoRef(msg);
|
||||
if (refMsg)
|
||||
@ -450,7 +450,7 @@ plClothingOutfit::~plClothingOutfit()
|
||||
plgDispatch::Dispatch()->UnRegisterForExactType(plPreResourceMsg::Index(), GetKey());
|
||||
}
|
||||
|
||||
void plClothingOutfit::AddItem(plClothingItem *item, hsBool update /* = true */, hsBool broadcast /* = true */, hsBool netForce /* = false */)
|
||||
void plClothingOutfit::AddItem(plClothingItem *item, bool update /* = true */, bool broadcast /* = true */, bool netForce /* = false */)
|
||||
{
|
||||
if (fItems.Find(item) != fItems.kMissingIndex)
|
||||
return;
|
||||
@ -483,7 +483,7 @@ void plClothingOutfit::ForceUpdate(bool retry)
|
||||
msg->Send(GetKey());
|
||||
}
|
||||
|
||||
void plClothingOutfit::RemoveItem(plClothingItem *item, hsBool update /* = true */, hsBool netForce /* = false */)
|
||||
void plClothingOutfit::RemoveItem(plClothingItem *item, bool update /* = true */, bool netForce /* = false */)
|
||||
{
|
||||
if (fItems.Find(item) == fItems.kMissingIndex)
|
||||
return;
|
||||
@ -502,8 +502,8 @@ void plClothingOutfit::RemoveItem(plClothingItem *item, hsBool update /* = true
|
||||
}
|
||||
|
||||
void plClothingOutfit::TintItem(plClothingItem *item, float red, float green, float blue,
|
||||
hsBool update /* = true */, hsBool broadcast /* = true */, hsBool netForce /* = false */,
|
||||
hsBool retry /* = true */, uint8_t layer /* = kLayerTint1 */)
|
||||
bool update /* = true */, bool broadcast /* = true */, bool netForce /* = false */,
|
||||
bool retry /* = true */, uint8_t layer /* = kLayerTint1 */)
|
||||
{
|
||||
plClothingMsg *msg = new plClothingMsg();
|
||||
msg->AddReceiver(GetKey());
|
||||
@ -526,7 +526,7 @@ void plClothingOutfit::TintItem(plClothingItem *item, float red, float green, fl
|
||||
}
|
||||
|
||||
void plClothingOutfit::TintSkin(float red, float green, float blue,
|
||||
hsBool update /* = true */, hsBool broadcast /* = true */)
|
||||
bool update /* = true */, bool broadcast /* = true */)
|
||||
{
|
||||
plClothingMsg *msg = new plClothingMsg();
|
||||
msg->AddReceiver(GetKey());
|
||||
@ -541,7 +541,7 @@ void plClothingOutfit::TintSkin(float red, float green, float blue,
|
||||
}
|
||||
|
||||
void plClothingOutfit::MorphItem(plClothingItem *item, uint8_t layer, uint8_t delta, float weight,
|
||||
hsBool retry /* = true */)
|
||||
bool retry /* = true */)
|
||||
{
|
||||
plClothingMsg *msg = new plClothingMsg();
|
||||
msg->AddReceiver(GetKey());
|
||||
@ -555,12 +555,12 @@ void plClothingOutfit::MorphItem(plClothingItem *item, uint8_t layer, uint8_t de
|
||||
plgDispatch::MsgSend(msg);
|
||||
}
|
||||
|
||||
void plClothingOutfit::SetAge(float age, hsBool update /* = true */, hsBool broadcast /* = true */)
|
||||
void plClothingOutfit::SetAge(float age, bool update /* = true */, bool broadcast /* = true */)
|
||||
{
|
||||
SetSkinBlend(age, plClothingElement::kLayerSkinBlend1, update, broadcast);
|
||||
}
|
||||
|
||||
void plClothingOutfit::SetSkinBlend(float blend, uint8_t layer, hsBool update /* = true */, hsBool broadcast /* = true */)
|
||||
void plClothingOutfit::SetSkinBlend(float blend, uint8_t layer, bool update /* = true */, bool broadcast /* = true */)
|
||||
{
|
||||
plClothingMsg *msg = new plClothingMsg();
|
||||
msg->AddReceiver(GetKey());
|
||||
@ -661,7 +661,7 @@ void plClothingOutfit::IRemoveItem(plClothingItem *item)
|
||||
}
|
||||
}
|
||||
|
||||
hsBool plClothingOutfit::ITintItem(plClothingItem *item, hsColorRGBA color, uint8_t layer)
|
||||
bool plClothingOutfit::ITintItem(plClothingItem *item, hsColorRGBA color, uint8_t layer)
|
||||
{
|
||||
uint32_t index = fItems.Find(item);
|
||||
if (index != fItems.kMissingIndex)
|
||||
@ -711,7 +711,7 @@ hsColorRGBA plClothingOutfit::GetItemTint(plClothingItem *item, uint8_t layer /*
|
||||
return color;
|
||||
}
|
||||
|
||||
hsBool plClothingOutfit::IMorphItem(plClothingItem *item, uint8_t layer, uint8_t delta, float weight)
|
||||
bool plClothingOutfit::IMorphItem(plClothingItem *item, uint8_t layer, uint8_t delta, float weight)
|
||||
{
|
||||
uint32_t index = fItems.Find(item);
|
||||
if (index != fItems.kMissingIndex)
|
||||
@ -846,7 +846,7 @@ void plClothingOutfit::ReadFromVault()
|
||||
rvn->DecRef();
|
||||
}
|
||||
|
||||
void plClothingOutfit::SaveCustomizations(hsBool retry /* = true */)
|
||||
void plClothingOutfit::SaveCustomizations(bool retry /* = true */)
|
||||
{
|
||||
plClothingMsg *msg = new plClothingMsg();
|
||||
msg->AddReceiver(GetKey());
|
||||
@ -1180,9 +1180,9 @@ void plClothingOutfit::WearRandomOutfit()
|
||||
TintSkin(sRandom.RandZeroToOne(), sRandom.RandZeroToOne(), sRandom.RandZeroToOne());
|
||||
}
|
||||
|
||||
hsBool plClothingOutfit::ReadItems(hsStream* s, hsResMgr* mgr, hsBool broadcast /* = true */)
|
||||
bool plClothingOutfit::ReadItems(hsStream* s, hsResMgr* mgr, bool broadcast /* = true */)
|
||||
{
|
||||
hsBool result = true;
|
||||
bool result = true;
|
||||
uint32_t numItems = s->ReadLE32();
|
||||
int i;
|
||||
for (i = 0; i < numItems; i++)
|
||||
@ -1223,7 +1223,7 @@ void plClothingOutfit::WriteItems(hsStream *s, hsResMgr *mgr)
|
||||
}
|
||||
}
|
||||
|
||||
hsBool plClothingOutfit::MsgReceive(plMessage* msg)
|
||||
bool plClothingOutfit::MsgReceive(plMessage* msg)
|
||||
{
|
||||
plPreResourceMsg *preMsg = plPreResourceMsg::ConvertNoRef(msg);
|
||||
if (preMsg)
|
||||
@ -1409,7 +1409,7 @@ hsBool plClothingOutfit::MsgReceive(plMessage* msg)
|
||||
// TESTING SDL
|
||||
// Send clothing sendState msg to object's plClothingSDLModifier
|
||||
//
|
||||
hsBool plClothingOutfit::DirtySynchState(const char* SDLStateName, uint32_t synchFlags)
|
||||
bool plClothingOutfit::DirtySynchState(const char* SDLStateName, uint32_t synchFlags)
|
||||
{
|
||||
plSynchEnabler ps(true); // make sure synching is enabled, since this happens during load
|
||||
synchFlags |= plSynchedObject::kForceFullSend; // TEMP
|
||||
@ -1427,7 +1427,7 @@ void plClothingOutfit::IInstanceSharedMeshes(plClothingItem *item)
|
||||
if (fAvatar)
|
||||
fAvatar->ValidateMesh();
|
||||
|
||||
hsBool partialSort = item->fCustomText && strstr(item->fCustomText, "NeedsSort");
|
||||
bool partialSort = item->fCustomText && strstr(item->fCustomText, "NeedsSort");
|
||||
int i;
|
||||
for (i = 0; i < plClothingItem::kMaxNumLODLevels; i++)
|
||||
{
|
||||
@ -1702,7 +1702,7 @@ plClothingItem *plClothingMgr::GetLRMatch(plClothingItem *item)
|
||||
return nil;
|
||||
}
|
||||
|
||||
hsBool plClothingMgr::IsLRMatch(plClothingItem *item1, plClothingItem *item2)
|
||||
bool plClothingMgr::IsLRMatch(plClothingItem *item1, plClothingItem *item2)
|
||||
{
|
||||
if (!item1 || !item2)
|
||||
return false;
|
||||
@ -1775,7 +1775,7 @@ void plClothingMgr::DeInit()
|
||||
}
|
||||
}
|
||||
|
||||
hsBool plClothingMgr::MsgReceive(plMessage* msg)
|
||||
bool plClothingMgr::MsgReceive(plMessage* msg)
|
||||
{
|
||||
plGenRefMsg *refMsg = plGenRefMsg::ConvertNoRef(msg);
|
||||
if (refMsg)
|
||||
@ -1800,7 +1800,7 @@ hsBool plClothingMgr::MsgReceive(plMessage* msg)
|
||||
|
||||
void plClothingMgr::IAddItem(plClothingItem *item)
|
||||
{
|
||||
hsBool allFound = true;
|
||||
bool allFound = true;
|
||||
int i, j;
|
||||
for (i = 0; i < item->fElementNames.GetCount(); i++)
|
||||
{
|
||||
|
@ -69,7 +69,7 @@ public:
|
||||
|
||||
plClothingItemOptions() { fTint1.Set(1.f, 1.f, 1.f, 1.f); fTint2.Set(1.f, 1.f, 1.f, 1.f); }
|
||||
|
||||
hsBool IsMatch(plClothingItemOptions *other) { return fTint1 == other->fTint1 && fTint2 == other->fTint2; }
|
||||
bool IsMatch(plClothingItemOptions *other) { return fTint1 == other->fTint1 && fTint2 == other->fTint2; }
|
||||
};
|
||||
|
||||
class plClothingItem : public hsKeyedObject
|
||||
@ -113,15 +113,15 @@ public:
|
||||
|
||||
void SetName(char *name) { delete fName; fName = hsStrcpy(name); }
|
||||
const char* GetName() { return fName; }
|
||||
hsBool CanWearWith(plClothingItem *item);
|
||||
hsBool WearBefore(plClothingItem *item); // Should we come before the arg item? (texture gen order)
|
||||
hsBool HasBaseAlpha();
|
||||
hsBool HasSameMeshes(plClothingItem *other);
|
||||
bool CanWearWith(plClothingItem *item);
|
||||
bool WearBefore(plClothingItem *item); // Should we come before the arg item? (texture gen order)
|
||||
bool HasBaseAlpha();
|
||||
bool HasSameMeshes(plClothingItem *other);
|
||||
|
||||
virtual void Read(hsStream* s, hsResMgr* mgr);
|
||||
virtual void Write(hsStream* s, hsResMgr* mgr);
|
||||
|
||||
virtual hsBool MsgReceive(plMessage* msg);
|
||||
virtual bool MsgReceive(plMessage* msg);
|
||||
};
|
||||
|
||||
class plClosetItem
|
||||
@ -132,7 +132,7 @@ public:
|
||||
plClothingItem *fItem;
|
||||
plClothingItemOptions fOptions;
|
||||
|
||||
hsBool IsMatch(plClosetItem *other);
|
||||
bool IsMatch(plClosetItem *other);
|
||||
};
|
||||
|
||||
class plClothingBase : public hsKeyedObject
|
||||
@ -153,7 +153,7 @@ public:
|
||||
virtual void Read(hsStream* s, hsResMgr* mgr);
|
||||
virtual void Write(hsStream* s, hsResMgr* mgr);
|
||||
|
||||
virtual hsBool MsgReceive(plMessage* msg);
|
||||
virtual bool MsgReceive(plMessage* msg);
|
||||
};
|
||||
|
||||
class plClothingOutfit : public plSynchedObject
|
||||
@ -178,16 +178,16 @@ public:
|
||||
CLASSNAME_REGISTER( plClothingOutfit );
|
||||
GETINTERFACE_ANY( plClothingOutfit, plSynchedObject );
|
||||
|
||||
void SaveCustomizations(hsBool retry = true);
|
||||
void AddItem(plClothingItem *item, hsBool update = true, hsBool broadcast = true, hsBool netForce=false);
|
||||
void RemoveItem(plClothingItem *item, hsBool update = true, hsBool netForce=false);
|
||||
void TintItem(plClothingItem *item, float red, float green, float blue, hsBool update = true, hsBool broadcast = true,
|
||||
hsBool netForce = false, hsBool retry = true, uint8_t fLayer = plClothingElement::kLayerTint1);
|
||||
void SaveCustomizations(bool retry = true);
|
||||
void AddItem(plClothingItem *item, bool update = true, bool broadcast = true, bool netForce=false);
|
||||
void RemoveItem(plClothingItem *item, bool update = true, bool netForce=false);
|
||||
void TintItem(plClothingItem *item, float red, float green, float blue, bool update = true, bool broadcast = true,
|
||||
bool netForce = false, bool retry = true, uint8_t fLayer = plClothingElement::kLayerTint1);
|
||||
void TintSkin(float red, float green, float blue,
|
||||
hsBool update = true, hsBool broadcast = true);
|
||||
void MorphItem(plClothingItem *item, uint8_t layer, uint8_t delta, float weight, hsBool retry = true);
|
||||
void SetAge(float age, hsBool update = true, hsBool broadcast = true);
|
||||
void SetSkinBlend(float blend, uint8_t layer, hsBool update = true, hsBool broadcast = true);
|
||||
bool update = true, bool broadcast = true);
|
||||
void MorphItem(plClothingItem *item, uint8_t layer, uint8_t delta, float weight, bool retry = true);
|
||||
void SetAge(float age, bool update = true, bool broadcast = true);
|
||||
void SetSkinBlend(float blend, uint8_t layer, bool update = true, bool broadcast = true);
|
||||
float GetSkinBlend(uint8_t layer);
|
||||
hsColorRGBA GetItemTint(plClothingItem *item, uint8_t layer = 2) const;
|
||||
float GetAge() const { return fSkinBlends[0]; }
|
||||
@ -196,7 +196,7 @@ public:
|
||||
|
||||
virtual void Read(hsStream* s, hsResMgr* mgr);
|
||||
virtual void Write(hsStream* s, hsResMgr* mgr);
|
||||
hsBool DirtySynchState(const char* SDLStateName, uint32_t synchFlags);
|
||||
bool DirtySynchState(const char* SDLStateName, uint32_t synchFlags);
|
||||
|
||||
void StripAccessories();
|
||||
void WearDefaultClothing();
|
||||
@ -205,12 +205,12 @@ public:
|
||||
void WearRandomOutfit();
|
||||
void RemoveMaintainerOutfit();
|
||||
|
||||
hsBool ReadItems(hsStream* s, hsResMgr* mgr, hsBool broadcast = true);
|
||||
bool ReadItems(hsStream* s, hsResMgr* mgr, bool broadcast = true);
|
||||
void WriteItems(hsStream* s, hsResMgr* mgr);
|
||||
|
||||
void ForceUpdate(bool retry); // send updateTexture msg
|
||||
|
||||
virtual hsBool MsgReceive(plMessage* msg);
|
||||
virtual bool MsgReceive(plMessage* msg);
|
||||
|
||||
void IInstanceSharedMeshes(plClothingItem *item);
|
||||
void IRemoveSharedMeshes(plClothingItem *item);
|
||||
@ -226,13 +226,13 @@ public:
|
||||
|
||||
protected:
|
||||
hsBitVector fDirtyItems;
|
||||
hsBool fVaultSaveEnabled;
|
||||
bool fVaultSaveEnabled;
|
||||
bool fMorphsInitDone;
|
||||
|
||||
void IAddItem(plClothingItem *item);
|
||||
void IRemoveItem(plClothingItem *item);
|
||||
hsBool ITintItem(plClothingItem *item, hsColorRGBA color, uint8_t layer);
|
||||
hsBool IMorphItem(plClothingItem *item, uint8_t layer, uint8_t delta, float weight);
|
||||
bool ITintItem(plClothingItem *item, hsColorRGBA color, uint8_t layer);
|
||||
bool IMorphItem(plClothingItem *item, uint8_t layer, uint8_t delta, float weight);
|
||||
void IHandleMorphSDR(plStateDataRecord *sdr);
|
||||
|
||||
void IUpdate();
|
||||
@ -279,7 +279,7 @@ public:
|
||||
|
||||
// For a pair of items that go together (ie gloves) give us one, we'll give you the other
|
||||
plClothingItem *GetLRMatch(plClothingItem *item);
|
||||
hsBool IsLRMatch(plClothingItem *item1, plClothingItem *item2);
|
||||
bool IsLRMatch(plClothingItem *item1, plClothingItem *item2);
|
||||
|
||||
static void ChangeAvatar(char *name);
|
||||
|
||||
@ -290,7 +290,7 @@ public:
|
||||
//virtual void Read(hsStream* s, hsResMgr* mgr);
|
||||
//virtual void Write(hsStream* s, hsResMgr* mgr);
|
||||
|
||||
virtual hsBool MsgReceive(plMessage* msg);
|
||||
virtual bool MsgReceive(plMessage* msg);
|
||||
|
||||
|
||||
// NOTE:
|
||||
|
@ -239,7 +239,7 @@ void plAvatarMgr::PropagateLocalPlayer(int spawnPoint)
|
||||
{
|
||||
plKey requestor = GetKey();
|
||||
bool isPlayer = true;
|
||||
hsBool isLoading = true;
|
||||
bool isLoading = true;
|
||||
plLoadAvatarMsg *msg = new plLoadAvatarMsg(playerKey, requestor, 0, isPlayer, isLoading);
|
||||
|
||||
if (spawnPoint >= 0)
|
||||
@ -268,7 +268,7 @@ bool plAvatarMgr::UnPropagateLocalPlayer()
|
||||
{
|
||||
plKey requestor = GetKey();
|
||||
bool isPlayer = true;
|
||||
hsBool isLoading = false;
|
||||
bool isLoading = false;
|
||||
plLoadAvatarMsg *msg = new plLoadAvatarMsg(playerKey, requestor, 0, isPlayer, isLoading);
|
||||
msg->SetBCastFlag(plMessage::kLocalPropagate, false);
|
||||
msg->Send();
|
||||
@ -285,14 +285,14 @@ void plAvatarMgr::UnLoadLocalPlayer()
|
||||
{
|
||||
plKey mgrKey = GetKey();
|
||||
bool isPlayer = true;
|
||||
hsBool isLoading = false;
|
||||
bool isLoading = false;
|
||||
plLoadAvatarMsg *msg = new plLoadAvatarMsg(playerKey, mgrKey, 0, isPlayer, isLoading);
|
||||
msg->Send();
|
||||
}
|
||||
}
|
||||
|
||||
// MSGRECEIVE
|
||||
hsBool plAvatarMgr::MsgReceive(plMessage *msg)
|
||||
bool plAvatarMgr::MsgReceive(plMessage *msg)
|
||||
{
|
||||
plLoadAvatarMsg *cloneM = plLoadAvatarMsg::ConvertNoRef(msg);
|
||||
if(cloneM)
|
||||
@ -354,7 +354,7 @@ hsBool plAvatarMgr::MsgReceive(plMessage *msg)
|
||||
return false;
|
||||
}
|
||||
|
||||
hsBool plAvatarMgr::HandleCoopMsg(plAvCoopMsg *msg)
|
||||
bool plAvatarMgr::HandleCoopMsg(plAvCoopMsg *msg)
|
||||
{
|
||||
plAvCoopMsg::Command cmd = msg->fCommand;
|
||||
|
||||
@ -388,7 +388,7 @@ hsBool plAvatarMgr::HandleCoopMsg(plAvCoopMsg *msg)
|
||||
}
|
||||
}
|
||||
|
||||
hsBool plAvatarMgr::HandleNotifyMsg(plNotifyMsg *msg)
|
||||
bool plAvatarMgr::HandleNotifyMsg(plNotifyMsg *msg)
|
||||
{
|
||||
proCoopEventData *ed = static_cast<proCoopEventData *>(msg->FindEventRecord(proEventData::kCoop));
|
||||
if(ed)
|
||||
@ -400,7 +400,7 @@ hsBool plAvatarMgr::HandleNotifyMsg(plNotifyMsg *msg)
|
||||
return false;
|
||||
}
|
||||
|
||||
hsBool plAvatarMgr::IPassMessageToActiveCoop(plMessage *msg, uint32_t id, uint16_t serial)
|
||||
bool plAvatarMgr::IPassMessageToActiveCoop(plMessage *msg, uint32_t id, uint16_t serial)
|
||||
{
|
||||
plCoopMap::iterator i = fActiveCoops.find(id);
|
||||
while(i != fActiveCoops.end() && (*i).first == id)
|
||||
@ -793,7 +793,7 @@ int plAvatarMgr::FindSpawnPoint( const char *name ) const
|
||||
return -1;
|
||||
}
|
||||
|
||||
int plAvatarMgr::WarpPlayerToAnother(hsBool iMove, uint32_t remoteID)
|
||||
int plAvatarMgr::WarpPlayerToAnother(bool iMove, uint32_t remoteID)
|
||||
{
|
||||
plNetTransport &mgr = plNetClientMgr::GetInstance()->TransportMgr();
|
||||
plNetTransportMember *mbr = mgr.GetMember(mgr.FindMember(remoteID));
|
||||
|
@ -155,7 +155,7 @@ public:
|
||||
int NumSpawnPoints() { return fSpawnPoints.size(); }
|
||||
int FindSpawnPoint( const char *name ) const;
|
||||
// \}
|
||||
static int WarpPlayerToAnother(hsBool iMove, uint32_t remoteID);
|
||||
static int WarpPlayerToAnother(bool iMove, uint32_t remoteID);
|
||||
static int WarpPlayerToXYZ(float x, float y, float z);
|
||||
static int WarpPlayerToXYZ(int pid, float x, float y, float z);
|
||||
|
||||
@ -163,10 +163,10 @@ public:
|
||||
static void ShutDown();
|
||||
|
||||
|
||||
hsBool MsgReceive(plMessage *msg);
|
||||
hsBool HandleCoopMsg(plAvCoopMsg *msg);
|
||||
hsBool HandleNotifyMsg(plNotifyMsg *msg);
|
||||
hsBool IPassMessageToActiveCoop(plMessage *msg, uint32_t id, uint16_t serial);
|
||||
bool MsgReceive(plMessage *msg);
|
||||
bool HandleCoopMsg(plAvCoopMsg *msg);
|
||||
bool HandleNotifyMsg(plNotifyMsg *msg);
|
||||
bool IPassMessageToActiveCoop(plMessage *msg, uint32_t id, uint16_t serial);
|
||||
|
||||
// similar to a spawn point, maintainers markers are used
|
||||
// to generate your position in Dni coordinates
|
||||
|
@ -347,7 +347,7 @@ void plAvatarSDLModifier::IPutGenericBrainIn(plArmatureMod * avMod, plAvBrainGen
|
||||
bool plAvatarSDLModifier::ISetGenericBrainFrom(plArmatureMod *avMod, const plStateDataRecord* srcState)
|
||||
{
|
||||
int i;
|
||||
hsBool success = true;
|
||||
bool success = true;
|
||||
int numStages=0;
|
||||
plSDStateVariable* stagesVar = srcState->FindSDVar(GenericBrainVarNames::kStrStages);
|
||||
if (stagesVar->IsUsed())
|
||||
|
@ -74,7 +74,7 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
|
||||
#include "pfMessage/pfKIMsg.h"
|
||||
|
||||
// for console hack
|
||||
hsBool plAvOneShotTask::fForce3rdPerson = true;
|
||||
bool plAvOneShotTask::fForce3rdPerson = true;
|
||||
#include "pnMessage/plCameraMsg.h"
|
||||
|
||||
/////////////
|
||||
@ -88,13 +88,13 @@ plAvTask::plAvTask()
|
||||
}
|
||||
|
||||
// START
|
||||
hsBool plAvTask::Start(plArmatureMod *avatar, plArmatureBrain *brain, double time, float elapsed)
|
||||
bool plAvTask::Start(plArmatureMod *avatar, plArmatureBrain *brain, double time, float elapsed)
|
||||
{
|
||||
return true; // true indicates the task has started succesfully
|
||||
}
|
||||
|
||||
// PROCESS
|
||||
hsBool plAvTask::Process(plArmatureMod *avatar, plArmatureBrain *brain, double time, float elapsed)
|
||||
bool plAvTask::Process(plArmatureMod *avatar, plArmatureBrain *brain, double time, float elapsed)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
@ -213,7 +213,7 @@ void GetPositionAndRotation(hsMatrix44 transform, hsScalarTriple *position, hsQu
|
||||
|
||||
// START
|
||||
// Adjust our goal time based on our duration and the current time
|
||||
hsBool plAvSeekTask::Start(plArmatureMod *avatar, plArmatureBrain *brain, double time, float elapsed)
|
||||
bool plAvSeekTask::Start(plArmatureMod *avatar, plArmatureBrain *brain, double time, float elapsed)
|
||||
{
|
||||
fTargetTime = time + fDuration; // clock starts now....
|
||||
fPhysicalAtStart = avatar->IsPhysicsEnabled();
|
||||
@ -280,7 +280,7 @@ void CalcHandleTargetPosition(hsMatrix44 &result, plSceneObject *insert, plScene
|
||||
|
||||
// PROCESS
|
||||
// Move closer to the goal position and orientation
|
||||
hsBool plAvSeekTask::Process(plArmatureMod *avatar, plArmatureBrain *brain, double time, float elapsed)
|
||||
bool plAvSeekTask::Process(plArmatureMod *avatar, plArmatureBrain *brain, double time, float elapsed)
|
||||
{
|
||||
hsQuat rotation;
|
||||
hsPoint3 position;
|
||||
@ -351,9 +351,9 @@ plAvAnimTask::plAvAnimTask(const plString &animName,
|
||||
float targetBlend,
|
||||
float fadeSpeed,
|
||||
float setTime,
|
||||
hsBool start,
|
||||
hsBool loop,
|
||||
hsBool attach)
|
||||
bool start,
|
||||
bool loop,
|
||||
bool attach)
|
||||
: fAnimName(animName),
|
||||
fInitialBlend(initialBlend),
|
||||
fTargetBlend(targetBlend),
|
||||
@ -367,7 +367,7 @@ plAvAnimTask::plAvAnimTask(const plString &animName,
|
||||
}
|
||||
|
||||
// CTOR animName, fadeSpeed, attach
|
||||
plAvAnimTask::plAvAnimTask(const plString &animName, float fadeSpeed, hsBool attach)
|
||||
plAvAnimTask::plAvAnimTask(const plString &animName, float fadeSpeed, bool attach)
|
||||
: fAnimName(animName),
|
||||
fInitialBlend(0.0f),
|
||||
fTargetBlend(0.0f),
|
||||
@ -384,9 +384,9 @@ plAvAnimTask::plAvAnimTask(const plString &animName, float fadeSpeed, hsBool att
|
||||
|
||||
|
||||
// START
|
||||
hsBool plAvAnimTask::Start(plArmatureMod *avatar, plArmatureBrain *brain, double time, float elapsed)
|
||||
bool plAvAnimTask::Start(plArmatureMod *avatar, plArmatureBrain *brain, double time, float elapsed)
|
||||
{
|
||||
hsBool result = false;
|
||||
bool result = false;
|
||||
if(fAttach)
|
||||
{
|
||||
plAGAnimInstance * aInstance = avatar->FindOrAttachInstance(fAnimName, fInitialBlend);
|
||||
@ -426,10 +426,10 @@ hsBool plAvAnimTask::Start(plArmatureMod *avatar, plArmatureBrain *brain, double
|
||||
}
|
||||
|
||||
// PROCESS
|
||||
hsBool plAvAnimTask::Process(plArmatureMod *avatar, plArmatureBrain *brain, double time, float elapsed)
|
||||
bool plAvAnimTask::Process(plArmatureMod *avatar, plArmatureBrain *brain, double time, float elapsed)
|
||||
{
|
||||
// the only reason we need this function is to watch the animation until it fades out
|
||||
hsBool result = false;
|
||||
bool result = false;
|
||||
if(fAttach)
|
||||
{
|
||||
// we finished in the Start() function
|
||||
@ -523,7 +523,7 @@ plAvOneShotTask::plAvOneShotTask()
|
||||
// this construct is typically used when you want to create a one-shot task as part of a sequence
|
||||
// of tasks
|
||||
// it's different than the message-based constructor in that fDetachAnimation and fMoveHandle default to false
|
||||
plAvOneShotTask::plAvOneShotTask(const plString &animName, hsBool drivable, hsBool reversible, plOneShotCallbacks *callbacks)
|
||||
plAvOneShotTask::plAvOneShotTask(const plString &animName, bool drivable, bool reversible, plOneShotCallbacks *callbacks)
|
||||
{
|
||||
InitDefaults();
|
||||
|
||||
@ -562,9 +562,9 @@ plAvOneShotTask::~plAvOneShotTask()
|
||||
|
||||
|
||||
// START
|
||||
hsBool plAvOneShotTask::Start(plArmatureMod *avatar, plArmatureBrain *brain, double time, float elapsed)
|
||||
bool plAvOneShotTask::Start(plArmatureMod *avatar, plArmatureBrain *brain, double time, float elapsed)
|
||||
{
|
||||
hsBool result = false;
|
||||
bool result = false;
|
||||
|
||||
if (fIgnore)
|
||||
return true;
|
||||
@ -646,7 +646,7 @@ hsBool plAvOneShotTask::Start(plArmatureMod *avatar, plArmatureBrain *brain, dou
|
||||
}
|
||||
|
||||
// PROCESS
|
||||
hsBool plAvOneShotTask::Process(plArmatureMod *avatar, plArmatureBrain *brain, double time, float elapsed)
|
||||
bool plAvOneShotTask::Process(plArmatureMod *avatar, plArmatureBrain *brain, double time, float elapsed)
|
||||
{
|
||||
// *** if we are under mouse control, adjust it here
|
||||
|
||||
@ -757,9 +757,9 @@ plAvOneShotLinkTask::~plAvOneShotLinkTask()
|
||||
}
|
||||
|
||||
// task protocol
|
||||
hsBool plAvOneShotLinkTask::Start(plArmatureMod *avatar, plArmatureBrain *brain, double time, float elapsed)
|
||||
bool plAvOneShotLinkTask::Start(plArmatureMod *avatar, plArmatureBrain *brain, double time, float elapsed)
|
||||
{
|
||||
hsBool result = plAvOneShotTask::Start(avatar, brain, time, elapsed);
|
||||
bool result = plAvOneShotTask::Start(avatar, brain, time, elapsed);
|
||||
fStartTime = time;
|
||||
|
||||
if (fAnimInstance && !fMarkerName.IsNull())
|
||||
@ -774,9 +774,9 @@ hsBool plAvOneShotLinkTask::Start(plArmatureMod *avatar, plArmatureBrain *brain,
|
||||
return result;
|
||||
}
|
||||
|
||||
hsBool plAvOneShotLinkTask::Process(plArmatureMod *avatar, plArmatureBrain *brain, double time, float elapsed)
|
||||
bool plAvOneShotLinkTask::Process(plArmatureMod *avatar, plArmatureBrain *brain, double time, float elapsed)
|
||||
{
|
||||
hsBool result = plAvOneShotTask::Process(avatar, brain, time, elapsed);
|
||||
bool result = plAvOneShotTask::Process(avatar, brain, time, elapsed);
|
||||
if (fIgnore)
|
||||
return result;
|
||||
|
||||
|
@ -85,16 +85,16 @@ public:
|
||||
\param attach Are we attaching or detaching the animation?
|
||||
*/
|
||||
plAvAnimTask(const plString &animName, float initialBlend, float targetBlend, float fadeSpeed,
|
||||
float setTime, hsBool start, hsBool loop, hsBool attach);
|
||||
float setTime, bool start, bool loop, bool attach);
|
||||
|
||||
/** Canonical constructor form form for detaching
|
||||
\param animName The name of the animation we're detaching
|
||||
\param fadeSpeed How fast to fade it out. */
|
||||
plAvAnimTask(const plString &animName, float fadeSpeed, hsBool attach = false);
|
||||
plAvAnimTask(const plString &animName, float fadeSpeed, bool attach = false);
|
||||
|
||||
// task protocol
|
||||
virtual hsBool Start(plArmatureMod *avatar, plArmatureBrain *brain, double time, float elapsed);
|
||||
virtual hsBool Process(plArmatureMod *avatar, plArmatureBrain *brain, double time, float elapsed);
|
||||
virtual bool Start(plArmatureMod *avatar, plArmatureBrain *brain, double time, float elapsed);
|
||||
virtual bool Process(plArmatureMod *avatar, plArmatureBrain *brain, double time, float elapsed);
|
||||
virtual void LeaveAge(plArmatureMod *avatar);
|
||||
|
||||
// plasma protocol
|
||||
@ -111,9 +111,9 @@ protected:
|
||||
float fTargetBlend; // the blend to achieve eventually (attaching only)
|
||||
float fFadeSpeed; // how fast to achieve the blend
|
||||
float fSetTime; // set the animation to this time
|
||||
hsBool fStart; // start the animation playing? (attaching only)
|
||||
hsBool fLoop; // turn on looping? (attaching only)
|
||||
hsBool fAttach; // attach? (otherwise detach)
|
||||
bool fStart; // start the animation playing? (attaching only)
|
||||
bool fLoop; // turn on looping? (attaching only)
|
||||
bool fAttach; // attach? (otherwise detach)
|
||||
plAGAnimInstance *fAnimInstance; // the animation we're monitoring (detaching only)
|
||||
};
|
||||
|
||||
@ -135,8 +135,8 @@ public:
|
||||
plAvSeekTask(plKey target, plAvAlignment alignType, const char *animName);
|
||||
|
||||
// task protocol
|
||||
virtual hsBool Start(plArmatureMod *avatar, plArmatureBrain *brain, double time, float elapsed);
|
||||
virtual hsBool Process(plArmatureMod *avatar, plArmatureBrain *brain, double time, float elapsed);
|
||||
virtual bool Start(plArmatureMod *avatar, plArmatureBrain *brain, double time, float elapsed);
|
||||
virtual bool Process(plArmatureMod *avatar, plArmatureBrain *brain, double time, float elapsed);
|
||||
virtual void LeaveAge(plArmatureMod *avatar);
|
||||
|
||||
// plasma protocol
|
||||
@ -156,8 +156,8 @@ protected:
|
||||
hsPoint3 fTargetPosition; // the position we're seeking
|
||||
hsQuat fTargetRotation; // the orientation we're seeking
|
||||
double fTargetTime; // the time we want to be done with the task (start + duration)
|
||||
hsBool fPhysicalAtStart; // was the avatar physical before we started?
|
||||
hsBool fCleanup; // last frame of processing
|
||||
bool fPhysicalAtStart; // was the avatar physical before we started?
|
||||
bool fCleanup; // last frame of processing
|
||||
};
|
||||
|
||||
// ---- THE CUTOFF ----
|
||||
@ -182,7 +182,7 @@ public:
|
||||
\param reversable Unused. Allows the oneshot to be backed up by keyboard input
|
||||
\param callbacks A vector of callback messages to be sent at specific times during the animation
|
||||
*/
|
||||
plAvOneShotTask(const plString &animName, hsBool drivable, hsBool reversible, plOneShotCallbacks *callbacks);
|
||||
plAvOneShotTask(const plString &animName, bool drivable, bool reversible, plOneShotCallbacks *callbacks);
|
||||
/** Construct from a oneshot message.
|
||||
\param msg The message to copy our parameters from
|
||||
\param brain The brain to attach the task to.
|
||||
@ -191,32 +191,32 @@ public:
|
||||
virtual ~plAvOneShotTask();
|
||||
|
||||
// task protocol
|
||||
virtual hsBool Start(plArmatureMod *avatar, plArmatureBrain *brain, double time, float elapsed);
|
||||
virtual hsBool Process(plArmatureMod *avatar, plArmatureBrain *brain, double time, float elapsed);
|
||||
virtual bool Start(plArmatureMod *avatar, plArmatureBrain *brain, double time, float elapsed);
|
||||
virtual bool Process(plArmatureMod *avatar, plArmatureBrain *brain, double time, float elapsed);
|
||||
virtual void LeaveAge(plArmatureMod *avatar);
|
||||
|
||||
void SetAnimName(const plString &name);
|
||||
|
||||
static hsBool fForce3rdPerson;
|
||||
static bool fForce3rdPerson;
|
||||
|
||||
// plasma protocol
|
||||
CLASSNAME_REGISTER( plAvOneShotTask );
|
||||
GETINTERFACE_ANY( plAvOneShotTask, plAvTask );
|
||||
|
||||
hsBool fBackwards; // play the anim backwards
|
||||
hsBool fDisableLooping; // explicitly kill looping on this anim;
|
||||
hsBool fDisablePhysics; // disable physics when we play this oneshot
|
||||
bool fBackwards; // play the anim backwards
|
||||
bool fDisableLooping; // explicitly kill looping on this anim;
|
||||
bool fDisablePhysics; // disable physics when we play this oneshot
|
||||
|
||||
// *** implement reader and writer if needed for network propagation
|
||||
protected:
|
||||
plString fAnimName; // the name of the one-shot animation we want to use
|
||||
hsBool fMoveHandle; // move the handle after the oneshot's done playing?
|
||||
bool fMoveHandle; // move the handle after the oneshot's done playing?
|
||||
plAGAnimInstance *fAnimInstance; // the animation instance (available only after it starts playing)
|
||||
hsBool fDrivable; // the user can control the animation with the mouse
|
||||
hsBool fReversible; // the user can back up the animation with the mouse
|
||||
hsBool fEnablePhysicsAtEnd; // was the avatar physical before we started (and did we disable physics?)
|
||||
hsBool fDetachAnimation; // should we detach the animation when we're done?
|
||||
hsBool fIgnore; // if this gets set before we start, we just finish without doing anything.
|
||||
bool fDrivable; // the user can control the animation with the mouse
|
||||
bool fReversible; // the user can back up the animation with the mouse
|
||||
bool fEnablePhysicsAtEnd; // was the avatar physical before we started (and did we disable physics?)
|
||||
bool fDetachAnimation; // should we detach the animation when we're done?
|
||||
bool fIgnore; // if this gets set before we start, we just finish without doing anything.
|
||||
|
||||
plOneShotCallbacks *fCallbacks; // a set of callbacks to set up on our animation
|
||||
|
||||
@ -244,8 +244,8 @@ public:
|
||||
virtual ~plAvOneShotLinkTask();
|
||||
|
||||
// task protocol
|
||||
virtual hsBool Start(plArmatureMod *avatar, plArmatureBrain *brain, double time, float elapsed);
|
||||
virtual hsBool Process(plArmatureMod *avatar, plArmatureBrain *brain, double time, float elapsed);
|
||||
virtual bool Start(plArmatureMod *avatar, plArmatureBrain *brain, double time, float elapsed);
|
||||
virtual bool Process(plArmatureMod *avatar, plArmatureBrain *brain, double time, float elapsed);
|
||||
|
||||
CLASSNAME_REGISTER( plAvOneShotLinkTask );
|
||||
GETINTERFACE_ANY( plAvOneShotLinkTask, plAvOneShotTask );
|
||||
@ -261,7 +261,7 @@ protected:
|
||||
plString fMarkerName;
|
||||
double fStartTime;
|
||||
float fMarkerTime;
|
||||
hsBool fLinkFired;
|
||||
bool fLinkFired;
|
||||
};
|
||||
|
||||
|
||||
|
@ -143,7 +143,7 @@ plCoopCoordinator::plCoopCoordinator(plKey host, plKey guest,
|
||||
|
||||
// MsgReceive --------------------------------------
|
||||
// -----------
|
||||
hsBool plCoopCoordinator::MsgReceive(plMessage *msg)
|
||||
bool plCoopCoordinator::MsgReceive(plMessage *msg)
|
||||
{
|
||||
plNotifyMsg *notify = plNotifyMsg::ConvertNoRef(msg);
|
||||
if(notify)
|
||||
@ -392,13 +392,13 @@ void plCoopCoordinator::Read(hsStream *stream, hsResMgr *mgr)
|
||||
fHostOfferStage = stream->ReadByte();
|
||||
fGuestAcceptStage = stream->ReadBool();
|
||||
|
||||
if(stream->Readbool())
|
||||
if(stream->ReadBool())
|
||||
fGuestAcceptMsg = plMessage::ConvertNoRef(mgr->ReadCreatable(stream));
|
||||
else
|
||||
fGuestAcceptMsg = nil;
|
||||
|
||||
fSynchBone = stream->ReadSafeString_TEMP();
|
||||
fAutoStartGuest = stream->Readbool();
|
||||
fAutoStartGuest = stream->ReadBool();
|
||||
|
||||
fInitiatorID = fHostBrain->GetInitiatorID();
|
||||
fInitiatorSerial = fHostBrain->GetInitiatorSerial();
|
||||
@ -417,11 +417,11 @@ void plCoopCoordinator::Write(hsStream *stream, hsResMgr *mgr)
|
||||
stream->WriteByte((uint8_t)fHostOfferStage);
|
||||
stream->WriteByte((uint8_t)fGuestAcceptStage);
|
||||
|
||||
stream->Writebool(fGuestAcceptMsg != nil);
|
||||
stream->WriteBool(fGuestAcceptMsg != nil);
|
||||
if(fGuestAcceptMsg)
|
||||
mgr->WriteCreatable(stream, fGuestAcceptMsg);
|
||||
|
||||
stream->WriteSafeString(fSynchBone);
|
||||
stream->Writebool(fAutoStartGuest);
|
||||
stream->WriteBool(fAutoStartGuest);
|
||||
}
|
||||
|
||||
|
@ -83,7 +83,7 @@ public:
|
||||
plMessage *guestAcceptMsg,
|
||||
bool autoStartGuest);
|
||||
|
||||
virtual hsBool MsgReceive(plMessage *msg);
|
||||
virtual bool MsgReceive(plMessage *msg);
|
||||
|
||||
void Run();
|
||||
|
||||
|
@ -250,7 +250,7 @@ plMatrixTimeScale::~plMatrixTimeScale()
|
||||
|
||||
// IsStoppedAt ----------------------------
|
||||
// ------------
|
||||
hsBool plMatrixTimeScale::IsStoppedAt(double time)
|
||||
bool plMatrixTimeScale::IsStoppedAt(double time)
|
||||
{
|
||||
return fTimeSource->IsStoppedAt(time);
|
||||
}
|
||||
@ -374,7 +374,7 @@ uint16_t plMatrixBlend::GetPriority() {
|
||||
return fPriority;
|
||||
}
|
||||
|
||||
hsBool plMatrixBlend::IsStoppedAt(double time)
|
||||
bool plMatrixBlend::IsStoppedAt(double time)
|
||||
{
|
||||
float blend = fChannelBias->Value(time);
|
||||
if (blend == 0)
|
||||
@ -788,7 +788,7 @@ void plMatrixDelayedCorrectionApplicator::SetCorrection(hsMatrix44 &cor)
|
||||
|
||||
|
||||
// CANBLEND
|
||||
hsBool plMatrixDelayedCorrectionApplicator::CanBlend(plAGApplicator *app)
|
||||
bool plMatrixDelayedCorrectionApplicator::CanBlend(plAGApplicator *app)
|
||||
{
|
||||
plMatrixChannelApplicator *matChannelApp = plMatrixChannelApplicator::ConvertNoRef(app);
|
||||
|
||||
@ -870,7 +870,7 @@ void plMatrixDifferenceApp::Reset(double time)
|
||||
|
||||
// CanBlend -----------------------------------------------
|
||||
// ---------
|
||||
hsBool plMatrixDifferenceApp::CanBlend(plAGApplicator *app)
|
||||
bool plMatrixDifferenceApp::CanBlend(plAGApplicator *app)
|
||||
{
|
||||
plMatrixChannelApplicator *matChannelApp = plMatrixChannelApplicator::ConvertNoRef(app);
|
||||
|
||||
|
@ -137,7 +137,7 @@ public:
|
||||
plMatrixTimeScale(plMatrixChannel *channel, plScalarChannel *timeSource);
|
||||
virtual ~plMatrixTimeScale();
|
||||
|
||||
virtual hsBool IsStoppedAt(double time);
|
||||
virtual bool IsStoppedAt(double time);
|
||||
virtual const hsMatrix44 & Value(double time, bool peek = false);
|
||||
virtual const hsAffineParts & AffineValue(double time, bool peek = false);
|
||||
|
||||
@ -188,7 +188,7 @@ public:
|
||||
//virtual void SetBlend(float blend) { fBlend = blend; };
|
||||
//virtual float GetBlend() { return fBlend; };
|
||||
|
||||
virtual hsBool IsStoppedAt(double time);
|
||||
virtual bool IsStoppedAt(double time);
|
||||
|
||||
// AG PROTOCOL
|
||||
virtual const hsMatrix44 & Value(double time, bool peek = false);
|
||||
@ -316,7 +316,7 @@ public:
|
||||
CLASSNAME_REGISTER( plMatrixChannelApplicator );
|
||||
GETINTERFACE_ANY( plMatrixChannelApplicator, plAGApplicator );
|
||||
|
||||
virtual hsBool CanCombine(plAGApplicator *app) { return false; }
|
||||
virtual bool CanCombine(plAGApplicator *app) { return false; }
|
||||
virtual plAGPinType GetPinType() { return kAGPinTransform; }
|
||||
};
|
||||
|
||||
@ -341,13 +341,13 @@ public:
|
||||
GETINTERFACE_ANY( plMatrixDelayedCorrectionApplicator, plMatrixChannelApplicator );
|
||||
|
||||
void SetCorrection(hsMatrix44 &correction);
|
||||
virtual hsBool AutoDelete() { return false; } // should we remove it when its input channel is gone?
|
||||
virtual bool AutoDelete() { return false; } // should we remove it when its input channel is gone?
|
||||
|
||||
// applicator arbitration...
|
||||
virtual plAGPinType GetPinType() { return kAGPinTransform; }
|
||||
virtual hsBool CanBlend(plAGApplicator *app);
|
||||
virtual bool CanBlend(plAGApplicator *app);
|
||||
|
||||
hsBool fIgnoreNextCorrection;
|
||||
bool fIgnoreNextCorrection;
|
||||
static const float fDelayLength; // static var for now.
|
||||
};
|
||||
|
||||
@ -364,11 +364,11 @@ public:
|
||||
void Reset(double time);
|
||||
|
||||
/** Should this applicator be automatically removed when its channel goes away? */
|
||||
virtual hsBool AutoDelete() { return false; }
|
||||
virtual bool AutoDelete() { return false; }
|
||||
|
||||
// applicator arbitration
|
||||
virtual plAGPinType GetPinType() { return kAGPinTransform; }
|
||||
virtual hsBool CanBlend(plAGApplicator *app);
|
||||
virtual bool CanBlend(plAGApplicator *app);
|
||||
|
||||
CLASSNAME_REGISTER(plMatrixDifferenceApp);
|
||||
GETINTERFACE_ANY(plMatrixDifferenceApp, plMatrixChannelApplicator);
|
||||
|
@ -118,7 +118,7 @@ void plMultistageBehMod::IDeleteStageVec()
|
||||
}
|
||||
}
|
||||
|
||||
hsBool plMultistageBehMod::MsgReceive(plMessage* msg)
|
||||
bool plMultistageBehMod::MsgReceive(plMessage* msg)
|
||||
{
|
||||
plMultistageModMsg *multiMsg = nil;
|
||||
plNotifyMsg* notifyMsg = plNotifyMsg::ConvertNoRef(msg);
|
||||
@ -140,7 +140,7 @@ hsBool plMultistageBehMod::MsgReceive(plMessage* msg)
|
||||
int numStages = fStages->size();
|
||||
stages->reserve(numStages);
|
||||
// hack hack hack
|
||||
hsBool ladder = false;
|
||||
bool ladder = false;
|
||||
for (int i = 0; i < numStages; i++)
|
||||
{
|
||||
plAnimStage* stage = new plAnimStage;
|
||||
@ -205,9 +205,9 @@ void plMultistageBehMod::Read(hsStream *stream, hsResMgr *mgr)
|
||||
{
|
||||
plSingleModifier::Read(stream, mgr);
|
||||
|
||||
fFreezePhys = stream->Readbool();
|
||||
fSmartSeek = stream->Readbool();
|
||||
fReverseFBControlsOnRelease = stream->Readbool();
|
||||
fFreezePhys = stream->ReadBool();
|
||||
fSmartSeek = stream->ReadBool();
|
||||
fReverseFBControlsOnRelease = stream->ReadBool();
|
||||
|
||||
IDeleteStageVec();
|
||||
fStages = new plAnimStageVec;
|
||||
@ -237,9 +237,9 @@ void plMultistageBehMod::Write(hsStream *stream, hsResMgr *mgr)
|
||||
{
|
||||
plSingleModifier::Write(stream, mgr);
|
||||
|
||||
stream->Writebool(fFreezePhys);
|
||||
stream->Writebool(fSmartSeek);
|
||||
stream->Writebool(fReverseFBControlsOnRelease);
|
||||
stream->WriteBool(fFreezePhys);
|
||||
stream->WriteBool(fSmartSeek);
|
||||
stream->WriteBool(fReverseFBControlsOnRelease);
|
||||
|
||||
int numStages = fStages->size();
|
||||
stream->WriteLE32(numStages);
|
||||
|
@ -61,7 +61,7 @@ protected:
|
||||
std::vector<plKey> fReceivers;
|
||||
|
||||
void IDeleteStageVec();
|
||||
virtual hsBool IEval(double secs, float del, uint32_t dirty) { return true; }
|
||||
virtual bool IEval(double secs, float del, uint32_t dirty) { return true; }
|
||||
|
||||
public:
|
||||
plMultistageBehMod();
|
||||
@ -71,13 +71,13 @@ public:
|
||||
CLASSNAME_REGISTER( plMultistageBehMod );
|
||||
GETINTERFACE_ANY( plMultistageBehMod, plSingleModifier );
|
||||
|
||||
hsBool NetProp() { return fNetProp; }
|
||||
hsBool NetForce() { return fNetForce; }
|
||||
bool NetProp() { return fNetProp; }
|
||||
bool NetForce() { return fNetForce; }
|
||||
|
||||
void SetNetProp(hsBool netProp) { fNetProp = netProp; }
|
||||
void SetNetForce(hsBool netForce) { fNetForce = netForce; }
|
||||
void SetNetProp(bool netProp) { fNetProp = netProp; }
|
||||
void SetNetForce(bool netForce) { fNetForce = netForce; }
|
||||
|
||||
hsBool MsgReceive(plMessage* msg);
|
||||
bool MsgReceive(plMessage* msg);
|
||||
|
||||
virtual void Init(plAnimStageVec *stages, bool freezePhys, bool smartSeek, bool reverseFBControlsOnRelease, std::vector<plKey>* receivers);
|
||||
|
||||
|
@ -142,8 +142,8 @@ void plNPCSpawnMod::Read(hsStream *stream, hsResMgr *mgr)
|
||||
|
||||
fModelName = stream->ReadSafeString();
|
||||
fAccountName = stream->ReadSafeString();
|
||||
fAutoSpawn = stream->Readbool();
|
||||
if(stream->Readbool())
|
||||
fAutoSpawn = stream->ReadBool();
|
||||
if(stream->ReadBool())
|
||||
fNotify = plNotifyMsg::ConvertNoRef(mgr->ReadCreatable(stream));
|
||||
}
|
||||
|
||||
@ -154,19 +154,19 @@ void plNPCSpawnMod::Write(hsStream *stream, hsResMgr *mgr)
|
||||
|
||||
stream->WriteSafeString(fModelName);
|
||||
stream->WriteSafeString(fAccountName);
|
||||
stream->Writebool(fAutoSpawn);
|
||||
stream->WriteBool(fAutoSpawn);
|
||||
if(fNotify)
|
||||
{
|
||||
stream->Writebool(true);
|
||||
stream->WriteBool(true);
|
||||
mgr->WriteCreatable(stream, fNotify);
|
||||
} else {
|
||||
stream->Writebool(false);
|
||||
stream->WriteBool(false);
|
||||
}
|
||||
}
|
||||
|
||||
// IEVAL
|
||||
// attack of the bogons
|
||||
hsBool plNPCSpawnMod::IEval(double secs, float del, uint32_t dirty)
|
||||
bool plNPCSpawnMod::IEval(double secs, float del, uint32_t dirty)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
@ -58,13 +58,13 @@ public:
|
||||
GETINTERFACE_ANY( plNPCSpawnMod, plSingleModifier );
|
||||
|
||||
virtual void AddTarget(plSceneObject* so);
|
||||
// hsBool MsgReceive(plMessage* msg);
|
||||
// bool MsgReceive(plMessage* msg);
|
||||
|
||||
virtual void Read(hsStream *stream, hsResMgr *mgr);
|
||||
virtual void Write(hsStream *stream, hsResMgr *mgr);
|
||||
|
||||
protected:
|
||||
virtual hsBool IEval(double secs, float del, uint32_t dirty);
|
||||
virtual bool IEval(double secs, float del, uint32_t dirty);
|
||||
void ISendNotify(plKey &avatarKey); // send our notification message
|
||||
|
||||
private:
|
||||
|
@ -69,11 +69,11 @@ plOneShotMod::plOneShotMod()
|
||||
|
||||
// CTOR(char *)
|
||||
plOneShotMod::plOneShotMod(const char *animName,
|
||||
hsBool drivable,
|
||||
hsBool reversable,
|
||||
bool drivable,
|
||||
bool reversable,
|
||||
float seekDuration,
|
||||
hsBool smartSeek,
|
||||
hsBool noSeek)
|
||||
bool smartSeek,
|
||||
bool noSeek)
|
||||
: fDrivable(drivable),
|
||||
fReversable(reversable),
|
||||
fSeekDuration(seekDuration),
|
||||
@ -85,11 +85,11 @@ plOneShotMod::plOneShotMod(const char *animName,
|
||||
|
||||
// INIT
|
||||
void plOneShotMod::Init(const char *animName,
|
||||
hsBool drivable,
|
||||
hsBool reversable,
|
||||
bool drivable,
|
||||
bool reversable,
|
||||
float seekDuration,
|
||||
hsBool smartSeek,
|
||||
hsBool noSeek)
|
||||
bool smartSeek,
|
||||
bool noSeek)
|
||||
{
|
||||
fAnimName = hsStrcpy(animName);
|
||||
fDrivable = drivable;
|
||||
@ -110,7 +110,7 @@ plOneShotMod::~plOneShotMod()
|
||||
|
||||
|
||||
// MSGRECEIVE
|
||||
hsBool plOneShotMod::MsgReceive(plMessage* msg)
|
||||
bool plOneShotMod::MsgReceive(plMessage* msg)
|
||||
{
|
||||
plOneShotMsg *oneShotMsg = plOneShotMsg::ConvertNoRef(msg);
|
||||
if (oneShotMsg)
|
||||
@ -133,7 +133,7 @@ hsBool plOneShotMod::MsgReceive(plMessage* msg)
|
||||
plString animName = avMod->MakeAnimationName(fAnimName);
|
||||
|
||||
plAvOneShotMsg *avOSmsg = new plAvOneShotMsg(myKey, oneShotMsg->fPlayerKey, objKey,
|
||||
fSeekDuration, (hsBool)fSmartSeek, animName, fDrivable,
|
||||
fSeekDuration, (bool)fSmartSeek, animName, fDrivable,
|
||||
fReversable);
|
||||
|
||||
avOSmsg->fNoSeek = fNoSeek;
|
||||
@ -180,6 +180,6 @@ void plOneShotMod::Write(hsStream *stream, hsResMgr *mgr)
|
||||
stream->WriteLEScalar(fSeekDuration);
|
||||
stream->WriteBool(fDrivable);
|
||||
stream->WriteBool(fReversable);
|
||||
stream->WriteBool((hsBool)fSmartSeek);
|
||||
stream->WriteBool((bool)fSmartSeek);
|
||||
stream->WriteBool(fNoSeek);
|
||||
}
|
||||
|
@ -55,25 +55,25 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
|
||||
class plOneShotMod : public plMultiModifier
|
||||
{
|
||||
protected:
|
||||
virtual hsBool IEval(double secs, float del, uint32_t dirty) {return true;}
|
||||
virtual bool IEval(double secs, float del, uint32_t dirty) {return true;}
|
||||
char * fAnimName; // the name of the animation associated with this one-shot
|
||||
hsBool fDrivable; // whether the user can control the position of the animation
|
||||
hsBool fReversable; // whether the user can back up the animation (fDrivable must be true as well)
|
||||
bool fDrivable; // whether the user can control the position of the animation
|
||||
bool fReversable; // whether the user can back up the animation (fDrivable must be true as well)
|
||||
float fSeekDuration; // how long to take to get to the seek point (??? should this be speed instead?)
|
||||
float fSmartSeek; // use smart seek to walk to the seek point?
|
||||
hsBool fNoSeek;
|
||||
bool fNoSeek;
|
||||
public:
|
||||
plOneShotMod();
|
||||
plOneShotMod(const char *animName, hsBool drivable, hsBool reversable, float seekDuration, hsBool smartSeek,hsBool noSeek = false);
|
||||
plOneShotMod(const char *animName, bool drivable, bool reversable, float seekDuration, bool smartSeek,bool noSeek = false);
|
||||
virtual ~plOneShotMod();
|
||||
|
||||
void Init(const char *animName, hsBool drivable, hsBool reversable, float seekDuration, hsBool smartSeek, hsBool noSeek = false);
|
||||
void Init(const char *animName, bool drivable, bool reversable, float seekDuration, bool smartSeek, bool noSeek = false);
|
||||
|
||||
CLASSNAME_REGISTER( plOneShotMod );
|
||||
GETINTERFACE_ANY( plOneShotMod, plMultiModifier );
|
||||
|
||||
virtual void AddTarget(plSceneObject* so);
|
||||
hsBool MsgReceive(plMessage* msg);
|
||||
bool MsgReceive(plMessage* msg);
|
||||
|
||||
virtual void Read(hsStream *stream, hsResMgr *mgr);
|
||||
virtual void Write(hsStream *stream, hsResMgr *mgr);
|
||||
|
@ -747,7 +747,7 @@ void plRidingAnimatedPhysicalStrategy::Apply(float delSecs)
|
||||
|
||||
for(curRecord = GroundHitRecords.begin(); curRecord != GroundHitRecords.end(); curRecord++)
|
||||
{
|
||||
hsBool groundlike=false;
|
||||
bool groundlike=false;
|
||||
if((curRecord->locHit.fZ - startPos.fZ)<= .2) groundlike= true;
|
||||
if(groundlike)
|
||||
{
|
||||
|
@ -189,14 +189,14 @@ public:
|
||||
{
|
||||
fAchievedLinearVelocity.Set(0.f,0.f,0.f);
|
||||
}
|
||||
virtual int SweepControllerPath(const hsPoint3& startPos,const hsPoint3& endPos, hsBool vsDynamics, hsBool vsStatics, uint32_t& vsSimGroups, std::multiset< plControllerSweepRecord >& WhatWasHitOut)=0;
|
||||
virtual int SweepControllerPath(const hsPoint3& startPos,const hsPoint3& endPos, bool vsDynamics, bool vsStatics, uint32_t& vsSimGroups, std::multiset< plControllerSweepRecord >& WhatWasHitOut)=0;
|
||||
//this should only be used to force a move it could place your head into a wall and that would be good
|
||||
virtual float GetHeight() {return fHeight;}
|
||||
virtual float GetRadius() {return fRadius;}
|
||||
//Wether the avatar thing has mass and forces things down or not, and changes the way things move
|
||||
//This is an attempt fix things like riding on an animated physical
|
||||
virtual void BehaveLikeAnimatedPhysical(hsBool actLikeAnAnimatedPhys)=0;
|
||||
virtual hsBool BehavingLikeAnAnimatedPhysical()=0;
|
||||
virtual void BehaveLikeAnimatedPhysical(bool actLikeAnAnimatedPhys)=0;
|
||||
virtual bool BehavingLikeAnAnimatedPhysical()=0;
|
||||
protected:
|
||||
|
||||
plKey fOwner;
|
||||
@ -256,7 +256,7 @@ public:
|
||||
virtual void ResetAirTime() { fTimeInAir = 0.f; }
|
||||
|
||||
protected:
|
||||
virtual hsBool IRequireBehaviourLikeAnAnimatedPhysical()=0;
|
||||
virtual bool IRequireBehaviourLikeAnAnimatedPhysical()=0;
|
||||
virtual void IApplyKinematic();
|
||||
plPhysicalControllerCore* fCore;
|
||||
hsVector3 fLinearAcceleration;
|
||||
@ -302,7 +302,7 @@ protected:
|
||||
bool fHitHead;
|
||||
bool fOnTopOfAnimatedPhysLastFrame;
|
||||
hsTArray<hsVector3> fPrevSlidingNormals;
|
||||
virtual hsBool IRequireBehaviourLikeAnAnimatedPhysical(){return true;}
|
||||
virtual bool IRequireBehaviourLikeAnAnimatedPhysical(){return true;}
|
||||
|
||||
};
|
||||
class plSwimStrategy: public plMovementStrategy
|
||||
@ -314,16 +314,16 @@ public:
|
||||
virtual void Apply(float delSecs);
|
||||
virtual void Update(float delSecs);
|
||||
float GetBuoyancy() { return fBuoyancy; }
|
||||
hsBool IsOnGround() { return fOnGround; }
|
||||
hsBool HadContacts() { return fHadContacts; }
|
||||
bool IsOnGround() { return fOnGround; }
|
||||
bool HadContacts() { return fHadContacts; }
|
||||
virtual void IAddContactNormals(hsVector3& vec);
|
||||
protected:
|
||||
virtual hsBool IRequireBehaviourLikeAnAnimatedPhysical(){return true;}
|
||||
virtual bool IRequireBehaviourLikeAnAnimatedPhysical(){return true;}
|
||||
private:
|
||||
void IAdjustBuoyancy();
|
||||
float fBuoyancy;
|
||||
hsBool fOnGround;
|
||||
hsBool fHadContacts;
|
||||
bool fOnGround;
|
||||
bool fHadContacts;
|
||||
float fSurfaceHeight;
|
||||
plSwimRegionInterface *fCurrentRegion;
|
||||
};
|
||||
@ -341,9 +341,9 @@ public:
|
||||
void GroundHit() { fGroundHit = true; }
|
||||
virtual void StartJump(){fStartJump = true;}
|
||||
protected:
|
||||
virtual hsBool IRequireBehaviourLikeAnAnimatedPhysical(){return false;}
|
||||
virtual bool IRequireBehaviourLikeAnAnimatedPhysical(){return false;}
|
||||
bool ICheckMove(const hsPoint3& startPos, const hsPoint3& desiredPos);
|
||||
hsBool fNeedVelocityOverride;
|
||||
bool fNeedVelocityOverride;
|
||||
hsVector3 fOverrideVelocity;
|
||||
bool fStartJump;
|
||||
};
|
||||
|
@ -173,7 +173,7 @@ plPointTimeScale::~plPointTimeScale()
|
||||
|
||||
// IsStoppedAt ---------------------------
|
||||
// ------------
|
||||
hsBool plPointTimeScale::IsStoppedAt(double time)
|
||||
bool plPointTimeScale::IsStoppedAt(double time)
|
||||
{
|
||||
return fTimeSource->IsStoppedAt(time);
|
||||
}
|
||||
@ -240,7 +240,7 @@ plPointBlend::~plPointBlend()
|
||||
|
||||
// IsStoppedAt ------------------------------
|
||||
// ------------
|
||||
hsBool plPointBlend::IsStoppedAt(double time)
|
||||
bool plPointBlend::IsStoppedAt(double time)
|
||||
{
|
||||
float blend = fChannelBias->Value(time);
|
||||
if (blend == 0)
|
||||
|
@ -138,7 +138,7 @@ public:
|
||||
plPointTimeScale(plPointChannel *channel, plScalarChannel *timeSource);
|
||||
virtual ~plPointTimeScale();
|
||||
|
||||
virtual hsBool IsStoppedAt(double time);
|
||||
virtual bool IsStoppedAt(double time);
|
||||
virtual const hsPoint3 & Value(double time);
|
||||
|
||||
virtual plAGChannel * Detach(plAGChannel * channel);
|
||||
@ -171,7 +171,7 @@ public:
|
||||
|
||||
//float GetBlend() const { return fBlend; }
|
||||
//void SetBlend(float the_blend) { fBlend = the_blend; }
|
||||
virtual hsBool IsStoppedAt(double time);
|
||||
virtual bool IsStoppedAt(double time);
|
||||
|
||||
// AG PROTOCOL
|
||||
virtual const hsPoint3 &Value(double time);
|
||||
|
@ -80,7 +80,7 @@ void plQuatChannel::Value(hsQuat &quat, double time)
|
||||
}
|
||||
|
||||
// CANCOMBINE
|
||||
hsBool plQuatChannel::CanCombine(plAGChannel *channelA)
|
||||
bool plQuatChannel::CanCombine(plAGChannel *channelA)
|
||||
{
|
||||
return false;
|
||||
if(plPointChannel::ConvertNoRef(channelA))
|
||||
@ -186,7 +186,7 @@ plQuatTimeScale::~plQuatTimeScale()
|
||||
{
|
||||
}
|
||||
|
||||
hsBool plQuatTimeScale::IsStoppedAt(double time)
|
||||
bool plQuatTimeScale::IsStoppedAt(double time)
|
||||
{
|
||||
return fTimeSource->IsStoppedAt(time);
|
||||
}
|
||||
@ -244,7 +244,7 @@ plQuatBlend::~plQuatBlend()
|
||||
fChannelBias = nil;
|
||||
}
|
||||
|
||||
hsBool plQuatBlend::IsStoppedAt(double time)
|
||||
bool plQuatBlend::IsStoppedAt(double time)
|
||||
{
|
||||
float blend = fChannelBias->Value(time);
|
||||
if (blend == 0)
|
||||
|
@ -64,7 +64,7 @@ public:
|
||||
virtual void Value(hsQuat &quaternion, double time);
|
||||
|
||||
// can this channel combine with the given channel?
|
||||
virtual hsBool CanCombine(plAGChannel * channelB);
|
||||
virtual bool CanCombine(plAGChannel * channelB);
|
||||
// combine it (allocates combine object)
|
||||
virtual plAGChannel * MakeCombine(plAGChannel * channelB);
|
||||
|
||||
@ -117,7 +117,7 @@ public:
|
||||
plQuatTimeScale(plQuatChannel *channel, plScalarChannel *timeSource);
|
||||
virtual ~plQuatTimeScale();
|
||||
|
||||
virtual hsBool IsStoppedAt(double time);
|
||||
virtual bool IsStoppedAt(double time);
|
||||
virtual const hsQuat & Value(double time);
|
||||
|
||||
virtual plAGChannel * Detach(plAGChannel * channel);
|
||||
@ -149,7 +149,7 @@ public:
|
||||
|
||||
//float GetBlend() const { return fBlend; }
|
||||
//void SetBlend(float the_blend) { fBlend = the_blend; }
|
||||
virtual hsBool IsStoppedAt(double time);
|
||||
virtual bool IsStoppedAt(double time);
|
||||
|
||||
// AG PROTOCOL
|
||||
virtual const hsQuat &Value(double time);
|
||||
|
@ -80,14 +80,14 @@ plScalarChannel::~plScalarChannel()
|
||||
|
||||
// value --------------------------------------------------------
|
||||
// ------
|
||||
const float & plScalarChannel::Value(double time, hsBool peek)
|
||||
const float & plScalarChannel::Value(double time, bool peek)
|
||||
{
|
||||
return fResult;
|
||||
}
|
||||
|
||||
// value --------------------------------------------------------------
|
||||
// ------
|
||||
void plScalarChannel::Value(float &scalar, double time, hsBool peek)
|
||||
void plScalarChannel::Value(float &scalar, double time, bool peek)
|
||||
{
|
||||
scalar = Value(time, peek);
|
||||
}
|
||||
@ -196,13 +196,13 @@ plScalarTimeScale::~plScalarTimeScale()
|
||||
{
|
||||
}
|
||||
|
||||
hsBool plScalarTimeScale::IsStoppedAt(double time)
|
||||
bool plScalarTimeScale::IsStoppedAt(double time)
|
||||
{
|
||||
return fTimeSource->IsStoppedAt(time);
|
||||
}
|
||||
|
||||
// VALUE
|
||||
const float & plScalarTimeScale::Value(double time, hsBool peek)
|
||||
const float & plScalarTimeScale::Value(double time, bool peek)
|
||||
{
|
||||
fResult = fChannelIn->Value(fTimeSource->Value(time, peek));
|
||||
|
||||
@ -263,7 +263,7 @@ plScalarBlend::~plScalarBlend()
|
||||
|
||||
// IsStoppedAt -------------------------------
|
||||
// ------------
|
||||
hsBool plScalarBlend::IsStoppedAt(double time)
|
||||
bool plScalarBlend::IsStoppedAt(double time)
|
||||
{
|
||||
float blend = fChannelBias->Value(time);
|
||||
if (blend == 0)
|
||||
@ -276,7 +276,7 @@ hsBool plScalarBlend::IsStoppedAt(double time)
|
||||
|
||||
// Value ------------------------------------------------------
|
||||
// ------
|
||||
const float & plScalarBlend::Value(double time, hsBool peek)
|
||||
const float & plScalarBlend::Value(double time, bool peek)
|
||||
{
|
||||
float curBlend = fChannelBias->Value(time, peek);
|
||||
if(curBlend == 0) {
|
||||
@ -353,14 +353,14 @@ plScalarControllerChannel::~plScalarControllerChannel()
|
||||
|
||||
// Value ------------------------------------------------------------------
|
||||
// ------
|
||||
const float & plScalarControllerChannel::Value(double time, hsBool peek)
|
||||
const float & plScalarControllerChannel::Value(double time, bool peek)
|
||||
{
|
||||
return Value(time, peek, nil);
|
||||
}
|
||||
|
||||
// Value ------------------------------------------------------------------
|
||||
// ------
|
||||
const float & plScalarControllerChannel::Value(double time, hsBool peek,
|
||||
const float & plScalarControllerChannel::Value(double time, bool peek,
|
||||
plControllerCacheInfo *cache)
|
||||
{
|
||||
fController->Interp((float)time, &fResult, cache);
|
||||
@ -479,14 +479,14 @@ plATCChannel::~plATCChannel()
|
||||
|
||||
// IsStoppedAt ------------------------------
|
||||
// ------------
|
||||
hsBool plATCChannel::IsStoppedAt(double time)
|
||||
bool plATCChannel::IsStoppedAt(double time)
|
||||
{
|
||||
return fConvert->IsStoppedAt(time);
|
||||
}
|
||||
|
||||
// Value -----------------------------------------------------
|
||||
// ------
|
||||
const float & plATCChannel::Value(double time, hsBool peek)
|
||||
const float & plATCChannel::Value(double time, bool peek)
|
||||
{
|
||||
fResult = (peek ? fConvert->WorldToAnimTimeNoUpdate(time) : fConvert->WorldToAnimTime(time));
|
||||
return fResult;
|
||||
@ -519,14 +519,14 @@ plScalarSDLChannel::~plScalarSDLChannel()
|
||||
|
||||
// IsStoppedAt ------------------------------------
|
||||
// ------------
|
||||
hsBool plScalarSDLChannel::IsStoppedAt(double time)
|
||||
bool plScalarSDLChannel::IsStoppedAt(double time)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
// Value -----------------------------------------------------------
|
||||
// ------
|
||||
const float & plScalarSDLChannel::Value(double time, hsBool peek)
|
||||
const float & plScalarSDLChannel::Value(double time, bool peek)
|
||||
{
|
||||
if (fVar)
|
||||
fVar->Get(&fResult);
|
||||
|
@ -81,8 +81,8 @@ public:
|
||||
virtual ~plScalarChannel();
|
||||
|
||||
// AG PROTOCOL
|
||||
virtual const float & Value(double time, hsBool peek = false);
|
||||
virtual void Value(float &result, double time, hsBool peek = false);
|
||||
virtual const float & Value(double time, bool peek = false);
|
||||
virtual void Value(float &result, double time, bool peek = false);
|
||||
|
||||
// combine it (allocates combine object)
|
||||
virtual plAGChannel * MakeCombine(plAGChannel * channelB);
|
||||
@ -140,8 +140,8 @@ public:
|
||||
plScalarTimeScale(plScalarChannel *channel, plScalarChannel *timeSource);
|
||||
virtual ~plScalarTimeScale();
|
||||
|
||||
virtual hsBool IsStoppedAt(double time);
|
||||
virtual const float & Value(double time, hsBool peek = false);
|
||||
virtual bool IsStoppedAt(double time);
|
||||
virtual const float & Value(double time, bool peek = false);
|
||||
virtual plAGChannel * Detach(plAGChannel * channel);
|
||||
|
||||
// PLASMA PROTOCOL
|
||||
@ -176,10 +176,10 @@ public:
|
||||
const plScalarChannel * GetChannelBias() const { return fChannelBias; }
|
||||
void SetChannelBias(plScalarChannel * channel) { fChannelBias = channel; }
|
||||
|
||||
virtual hsBool IsStoppedAt(double time);
|
||||
virtual bool IsStoppedAt(double time);
|
||||
|
||||
// AG PROTOCOL
|
||||
virtual const float & Value(double time, hsBool peek = false);
|
||||
virtual const float & Value(double time, bool peek = false);
|
||||
|
||||
// remove the specified channel from our graph
|
||||
virtual plAGChannel * Detach(plAGChannel * channel);
|
||||
@ -205,8 +205,8 @@ public:
|
||||
virtual ~plScalarControllerChannel();
|
||||
|
||||
// AG PROTOCOL
|
||||
virtual const float & Value(double time, hsBool peek = false);
|
||||
virtual const float & Value(double time, hsBool peek, plControllerCacheInfo *cache);
|
||||
virtual const float & Value(double time, bool peek = false);
|
||||
virtual const float & Value(double time, bool peek, plControllerCacheInfo *cache);
|
||||
|
||||
virtual plAGChannel *MakeCacheChannel(plAnimTimeConvert *atc);
|
||||
|
||||
@ -260,8 +260,8 @@ public:
|
||||
plATCChannel(plAnimTimeConvert *convert);
|
||||
virtual ~plATCChannel();
|
||||
|
||||
virtual hsBool IsStoppedAt(double time);
|
||||
virtual const float & Value(double time, hsBool peek = false);
|
||||
virtual bool IsStoppedAt(double time);
|
||||
virtual const float & Value(double time, bool peek = false);
|
||||
|
||||
// PLASMA PROTOCOL
|
||||
CLASSNAME_REGISTER( plATCChannel );
|
||||
@ -283,8 +283,8 @@ public:
|
||||
plScalarSDLChannel(float length);
|
||||
virtual ~plScalarSDLChannel();
|
||||
|
||||
virtual hsBool IsStoppedAt(double time);
|
||||
virtual const float & Value(double time, hsBool peek = false);
|
||||
virtual bool IsStoppedAt(double time);
|
||||
virtual const float & Value(double time, bool peek = false);
|
||||
|
||||
void SetVar(plSimpleStateVariable *var) { fVar = var; }
|
||||
|
||||
|
@ -69,7 +69,7 @@ plSeekPointMod::~plSeekPointMod()
|
||||
}
|
||||
|
||||
// MSGRECEIVE
|
||||
hsBool plSeekPointMod::MsgReceive(plMessage* msg)
|
||||
bool plSeekPointMod::MsgReceive(plMessage* msg)
|
||||
{
|
||||
return plMultiModifier::MsgReceive(msg);
|
||||
}
|
||||
|
@ -52,7 +52,7 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
|
||||
class plSeekPointMod : public plMultiModifier
|
||||
{
|
||||
protected:
|
||||
virtual hsBool IEval(double secs, float del, uint32_t dirty) {return true;}
|
||||
virtual bool IEval(double secs, float del, uint32_t dirty) {return true;}
|
||||
char * fName; // public because you can't change it
|
||||
|
||||
public:
|
||||
@ -69,7 +69,7 @@ public:
|
||||
|
||||
virtual void AddTarget(plSceneObject* so);
|
||||
|
||||
hsBool MsgReceive(plMessage* msg);
|
||||
bool MsgReceive(plMessage* msg);
|
||||
|
||||
virtual void Read(hsStream *stream, hsResMgr *mgr);
|
||||
virtual void Write(hsStream *stream, hsResMgr *mgr);
|
||||
|
@ -135,9 +135,9 @@ void plSittingModifier::ISetupNotify(plNotifyMsg *notifyMsg, plNotifyMsg *origin
|
||||
|
||||
// MsgReceive --------------------------------------
|
||||
// -----------
|
||||
hsBool plSittingModifier::MsgReceive(plMessage *msg)
|
||||
bool plSittingModifier::MsgReceive(plMessage *msg)
|
||||
{
|
||||
hsBool result = false;
|
||||
bool result = false;
|
||||
|
||||
plNotifyMsg* notifyMsg = plNotifyMsg::ConvertNoRef(msg);
|
||||
if(notifyMsg)
|
||||
|
@ -92,7 +92,7 @@ public:
|
||||
virtual void Read(hsStream* stream, hsResMgr* mgr);
|
||||
virtual void Write(hsStream* stream, hsResMgr* mgr);
|
||||
|
||||
virtual hsBool MsgReceive(plMessage *msg);
|
||||
virtual bool MsgReceive(plMessage *msg);
|
||||
|
||||
void AddNotifyKey(plKey key) { fNotifyKeys.Append(key); }
|
||||
|
||||
@ -102,7 +102,7 @@ public:
|
||||
protected:
|
||||
/** We've been triggered: go ahead and send the seek and brain tasks to the
|
||||
triggering avatar. */
|
||||
hsBool IEmitCommand(plKey playerKey, plMessage *enterCallback, plMessage *exitCallback);
|
||||
bool IEmitCommand(plKey playerKey, plMessage *enterCallback, plMessage *exitCallback);
|
||||
|
||||
/** Set up generic notification messages which were passed in by the responder /
|
||||
max authoring stuff. */
|
||||
@ -113,13 +113,13 @@ protected:
|
||||
plAvBrainGeneric * IBuildSitBrain(plKey avModKey, plKey seekKey,char **pAnimName, plNotifyMsg *enterNotify, plNotifyMsg *exitNotify);
|
||||
|
||||
/** Unused. */
|
||||
virtual hsBool IEval(double secs, float del, uint32_t dirty) { return true; }
|
||||
virtual bool IEval(double secs, float del, uint32_t dirty) { return true; }
|
||||
|
||||
/** An array of keys to objects that are interested in receiving our sit messages. */
|
||||
hsTArray<plKey> fNotifyKeys;
|
||||
|
||||
/** The chair in question is in use. It will untrigger when the avatar leaves it. */
|
||||
//hsBool fTriggered;
|
||||
//bool fTriggered;
|
||||
plKey fTriggeredAvatarKey;
|
||||
};
|
||||
|
||||
|
@ -106,7 +106,7 @@ void plSwimCircularCurrentRegion::Write(hsStream* stream, hsResMgr* mgr)
|
||||
mgr->WriteKey(stream, fCurrentSO);
|
||||
}
|
||||
|
||||
hsBool plSwimCircularCurrentRegion::MsgReceive(plMessage* msg)
|
||||
bool plSwimCircularCurrentRegion::MsgReceive(plMessage* msg)
|
||||
{
|
||||
plGenRefMsg *refMsg = plGenRefMsg::ConvertNoRef(msg);
|
||||
if (refMsg)
|
||||
@ -150,7 +150,7 @@ void plSwimCircularCurrentRegion::GetCurrent(plPhysicalControllerCore *physical,
|
||||
|
||||
physical->GetPositionSim(pos);
|
||||
|
||||
hsBool applyPull = true;
|
||||
bool applyPull = true;
|
||||
hsVector3 pos2Center(center.fX - pos.fX, center.fY - pos.fY, 0.f);
|
||||
float pullVel;
|
||||
float distSq = pos2Center.MagnitudeSquared();
|
||||
@ -223,7 +223,7 @@ void plSwimStraightCurrentRegion::Write(hsStream* stream, hsResMgr* mgr)
|
||||
mgr->WriteKey(stream, fCurrentSO);
|
||||
}
|
||||
|
||||
hsBool plSwimStraightCurrentRegion::MsgReceive(plMessage* msg)
|
||||
bool plSwimStraightCurrentRegion::MsgReceive(plMessage* msg)
|
||||
{
|
||||
plGenRefMsg *refMsg = plGenRefMsg::ConvertNoRef(msg);
|
||||
if (refMsg)
|
||||
|
@ -87,7 +87,7 @@ public:
|
||||
virtual void Write(hsStream* stream, hsResMgr* mgr);
|
||||
|
||||
virtual void GetCurrent(plPhysicalControllerCore *physical, hsVector3 &linearResult, float &angularResult, float elapsed);
|
||||
virtual hsBool MsgReceive(plMessage* msg);
|
||||
virtual bool MsgReceive(plMessage* msg);
|
||||
|
||||
float fRotation;
|
||||
float fPullNearDistSq;
|
||||
@ -112,7 +112,7 @@ public:
|
||||
virtual void Write(hsStream* stream, hsResMgr* mgr);
|
||||
|
||||
virtual void GetCurrent(plPhysicalControllerCore *physical, hsVector3 &linearResult, float &angularResult, float elapsed);
|
||||
virtual hsBool MsgReceive(plMessage* msg);
|
||||
virtual bool MsgReceive(plMessage* msg);
|
||||
|
||||
float fNearDist;
|
||||
float fNearVel;
|
||||
|
Reference in New Issue
Block a user