mirror of
https://foundry.openuru.org/gitblit/r/CWE-ou-minkata.git
synced 2025-07-18 19:29:09 +00:00
Obliterate hsBool
This commit is contained in:
@ -400,7 +400,7 @@ static inline hsKeyFrame* GetKey(int32_t i, void *keys, int32_t size)
|
||||
// for the next search.
|
||||
//
|
||||
void hsInterp::GetBoundaryKeyFrames(float time, uint32_t numKeys, void *keys, uint32_t size,
|
||||
hsKeyFrame **kF1, hsKeyFrame **kF2, uint32_t *lastKeyIdx, float *p, hsBool forwards)
|
||||
hsKeyFrame **kF1, hsKeyFrame **kF2, uint32_t *lastKeyIdx, float *p, bool forwards)
|
||||
{
|
||||
hsAssert(numKeys>1, "Must have more than 1 keyframe");
|
||||
int k1, k2;
|
||||
|
@ -87,7 +87,7 @@ public:
|
||||
|
||||
// Given a time value, find the enclosing keyframes and normalize time (0-1)
|
||||
static void GetBoundaryKeyFrames(float time, uint32_t numKeys, void *keys,
|
||||
uint32_t keySize, hsKeyFrame **kF1, hsKeyFrame **kF2, uint32_t *lastKeyIdx, float *p, hsBool forwards);
|
||||
uint32_t keySize, hsKeyFrame **kF1, hsKeyFrame **kF2, uint32_t *lastKeyIdx, float *p, bool forwards);
|
||||
|
||||
};
|
||||
|
||||
|
@ -59,7 +59,7 @@ void hsPoint3Key::Write(hsStream *stream)
|
||||
fValue.Write(stream);
|
||||
}
|
||||
|
||||
hsBool hsPoint3Key::CompareValue(hsPoint3Key *key)
|
||||
bool hsPoint3Key::CompareValue(hsPoint3Key *key)
|
||||
{
|
||||
return hsABS(fValue.fX - key->fValue.fX) < .01 &&
|
||||
hsABS(fValue.fY - key->fValue.fY) < .01 &&
|
||||
@ -82,7 +82,7 @@ void hsBezPoint3Key::Write(hsStream *stream)
|
||||
fValue.Write(stream);
|
||||
}
|
||||
|
||||
hsBool hsBezPoint3Key::CompareValue(hsBezPoint3Key *key)
|
||||
bool hsBezPoint3Key::CompareValue(hsBezPoint3Key *key)
|
||||
{
|
||||
return hsABS(fValue.fX - key->fValue.fX) < .01 &&
|
||||
hsABS(fValue.fY - key->fValue.fY) < .01 &&
|
||||
@ -103,7 +103,7 @@ void hsScalarKey::Write(hsStream *stream)
|
||||
stream->WriteLEScalar(fValue);
|
||||
}
|
||||
|
||||
hsBool hsScalarKey::CompareValue(hsScalarKey *key)
|
||||
bool hsScalarKey::CompareValue(hsScalarKey *key)
|
||||
{
|
||||
return fValue == key->fValue;
|
||||
}
|
||||
@ -124,7 +124,7 @@ void hsBezScalarKey::Write(hsStream *stream)
|
||||
stream->WriteLEScalar(fValue);
|
||||
}
|
||||
|
||||
hsBool hsBezScalarKey::CompareValue(hsBezScalarKey *key)
|
||||
bool hsBezScalarKey::CompareValue(hsBezScalarKey *key)
|
||||
{
|
||||
return fValue == key->fValue;
|
||||
}
|
||||
@ -143,7 +143,7 @@ void hsQuatKey::Write(hsStream *stream)
|
||||
fValue.Write(stream);
|
||||
}
|
||||
|
||||
hsBool hsQuatKey::CompareValue(hsQuatKey *key)
|
||||
bool hsQuatKey::CompareValue(hsQuatKey *key)
|
||||
{
|
||||
return fValue == key->fValue;
|
||||
}
|
||||
@ -165,7 +165,7 @@ void hsCompressedQuatKey32::Write(hsStream *stream)
|
||||
stream->WriteLE32(fData);
|
||||
}
|
||||
|
||||
hsBool hsCompressedQuatKey32::CompareValue(hsCompressedQuatKey32 *key)
|
||||
bool hsCompressedQuatKey32::CompareValue(hsCompressedQuatKey32 *key)
|
||||
{
|
||||
return fData == key->fData;
|
||||
}
|
||||
@ -308,7 +308,7 @@ void hsCompressedQuatKey64::Write(hsStream *stream)
|
||||
stream->WriteLE32(fData[1]);
|
||||
}
|
||||
|
||||
hsBool hsCompressedQuatKey64::CompareValue(hsCompressedQuatKey64 *key)
|
||||
bool hsCompressedQuatKey64::CompareValue(hsCompressedQuatKey64 *key)
|
||||
{
|
||||
return (fData[0] == key->fData[0]) && (fData[1] == key->fData[1]);
|
||||
}
|
||||
@ -467,7 +467,7 @@ void hsScaleKey::Write(hsStream *stream)
|
||||
fValue.Write(stream);
|
||||
}
|
||||
|
||||
hsBool hsScaleKey::CompareValue(hsScaleKey *key)
|
||||
bool hsScaleKey::CompareValue(hsScaleKey *key)
|
||||
{
|
||||
return fValue == key->fValue;
|
||||
}
|
||||
@ -488,7 +488,7 @@ void hsBezScaleKey::Write(hsStream *stream)
|
||||
fValue.Write(stream);
|
||||
}
|
||||
|
||||
hsBool hsBezScaleKey::CompareValue(hsBezScaleKey *key)
|
||||
bool hsBezScaleKey::CompareValue(hsBezScaleKey *key)
|
||||
{
|
||||
return fValue == key->fValue;
|
||||
}
|
||||
@ -521,7 +521,7 @@ void hsG3DSMaxKeyFrame::Write(hsStream *stream)
|
||||
fParts.Write(stream);
|
||||
}
|
||||
|
||||
hsBool hsG3DSMaxKeyFrame::CompareValue(hsG3DSMaxKeyFrame *key)
|
||||
bool hsG3DSMaxKeyFrame::CompareValue(hsG3DSMaxKeyFrame *key)
|
||||
{
|
||||
return fParts == key->fParts;
|
||||
}
|
||||
@ -546,7 +546,7 @@ void hsMatrix33Key::Write(hsStream *stream)
|
||||
stream->WriteLEScalar(fValue.fMap[j][i]);
|
||||
}
|
||||
|
||||
hsBool hsMatrix33Key::CompareValue(hsMatrix33Key *key)
|
||||
bool hsMatrix33Key::CompareValue(hsMatrix33Key *key)
|
||||
{
|
||||
return fValue == key->fValue;
|
||||
}
|
||||
@ -565,7 +565,7 @@ void hsMatrix44Key::Write(hsStream *stream)
|
||||
fValue.Write(stream);
|
||||
}
|
||||
|
||||
hsBool hsMatrix44Key::CompareValue(hsMatrix44Key *key)
|
||||
bool hsMatrix44Key::CompareValue(hsMatrix44Key *key)
|
||||
{
|
||||
return fValue == key->fValue;
|
||||
}
|
||||
|
@ -81,7 +81,7 @@ struct hsPoint3Key : public hsKeyFrame
|
||||
void Read(hsStream *stream);
|
||||
void Write(hsStream *stream);
|
||||
|
||||
hsBool CompareValue(hsPoint3Key *key);
|
||||
bool CompareValue(hsPoint3Key *key);
|
||||
};
|
||||
|
||||
struct hsBezPoint3Key : public hsKeyFrame
|
||||
@ -93,7 +93,7 @@ struct hsBezPoint3Key : public hsKeyFrame
|
||||
void Read(hsStream *stream);
|
||||
void Write(hsStream *stream);
|
||||
|
||||
hsBool CompareValue(hsBezPoint3Key *key);
|
||||
bool CompareValue(hsBezPoint3Key *key);
|
||||
};
|
||||
|
||||
struct hsScalarKey : public hsKeyFrame
|
||||
@ -103,7 +103,7 @@ struct hsScalarKey : public hsKeyFrame
|
||||
void Read(hsStream *stream);
|
||||
void Write(hsStream *stream);
|
||||
|
||||
hsBool CompareValue(hsScalarKey *key);
|
||||
bool CompareValue(hsScalarKey *key);
|
||||
};
|
||||
|
||||
struct hsBezScalarKey : public hsKeyFrame
|
||||
@ -115,7 +115,7 @@ struct hsBezScalarKey : public hsKeyFrame
|
||||
void Read(hsStream *stream);
|
||||
void Write(hsStream *stream);
|
||||
|
||||
hsBool CompareValue(hsBezScalarKey *key);
|
||||
bool CompareValue(hsBezScalarKey *key);
|
||||
};
|
||||
|
||||
struct hsQuatKey : public hsKeyFrame
|
||||
@ -125,7 +125,7 @@ struct hsQuatKey : public hsKeyFrame
|
||||
void Read(hsStream *stream);
|
||||
void Write(hsStream *stream);
|
||||
|
||||
hsBool CompareValue(hsQuatKey *key);
|
||||
bool CompareValue(hsQuatKey *key);
|
||||
};
|
||||
|
||||
struct hsCompressedQuatKey32 : public hsKeyFrame
|
||||
@ -147,7 +147,7 @@ struct hsCompressedQuatKey32 : public hsKeyFrame
|
||||
void Read(hsStream *stream);
|
||||
void Write(hsStream *stream);
|
||||
|
||||
hsBool CompareValue(hsCompressedQuatKey32 *key);
|
||||
bool CompareValue(hsCompressedQuatKey32 *key);
|
||||
|
||||
protected:
|
||||
uint32_t fData;
|
||||
@ -173,7 +173,7 @@ struct hsCompressedQuatKey64 : public hsKeyFrame
|
||||
void Read(hsStream *stream);
|
||||
void Write(hsStream *stream);
|
||||
|
||||
hsBool CompareValue(hsCompressedQuatKey64 *key);
|
||||
bool CompareValue(hsCompressedQuatKey64 *key);
|
||||
|
||||
protected:
|
||||
uint32_t fData[2];
|
||||
@ -200,7 +200,7 @@ struct hsScaleKey : public hsKeyFrame
|
||||
void Read(hsStream *stream);
|
||||
void Write(hsStream *stream);
|
||||
|
||||
hsBool CompareValue(hsScaleKey *key);
|
||||
bool CompareValue(hsScaleKey *key);
|
||||
};
|
||||
|
||||
struct hsBezScaleKey : public hsKeyFrame
|
||||
@ -212,7 +212,7 @@ struct hsBezScaleKey : public hsKeyFrame
|
||||
void Read(hsStream *stream);
|
||||
void Write(hsStream *stream);
|
||||
|
||||
hsBool CompareValue(hsBezScaleKey *key);
|
||||
bool CompareValue(hsBezScaleKey *key);
|
||||
};
|
||||
|
||||
struct hsG3DSMaxKeyFrame : public hsKeyFrame
|
||||
@ -229,7 +229,7 @@ struct hsG3DSMaxKeyFrame : public hsKeyFrame
|
||||
void Read(hsStream *stream);
|
||||
void Write(hsStream *stream);
|
||||
|
||||
hsBool CompareValue(hsG3DSMaxKeyFrame *key);
|
||||
bool CompareValue(hsG3DSMaxKeyFrame *key);
|
||||
};
|
||||
|
||||
struct hsMatrix33Key : public hsKeyFrame
|
||||
@ -239,7 +239,7 @@ struct hsMatrix33Key : public hsKeyFrame
|
||||
void Read(hsStream *stream);
|
||||
void Write(hsStream *stream);
|
||||
|
||||
hsBool CompareValue(hsMatrix33Key *key);
|
||||
bool CompareValue(hsMatrix33Key *key);
|
||||
};
|
||||
|
||||
struct hsMatrix44Key : public hsKeyFrame
|
||||
@ -249,7 +249,7 @@ struct hsMatrix44Key : public hsKeyFrame
|
||||
void Read(hsStream *stream);
|
||||
void Write(hsStream *stream);
|
||||
|
||||
hsBool CompareValue(hsMatrix44Key *key);
|
||||
bool CompareValue(hsMatrix44Key *key);
|
||||
};
|
||||
|
||||
#endif
|
||||
|
@ -70,7 +70,7 @@ public:
|
||||
void SetDuration(float duration);
|
||||
float GetDuration() const { return fDuration; }
|
||||
|
||||
hsBool32 operator==(const hsTimedValue<T>& v);
|
||||
bool32 operator==(const hsTimedValue<T>& v);
|
||||
hsTimedValue<T>& operator=(const T& v) { SetValue(v); return *this; }
|
||||
hsTimedValue<T>& operator+=(const T& v) { SetValue(v + fValue); return *this; }
|
||||
|
||||
@ -176,7 +176,7 @@ void hsTimedValue<T>::SetDuration(float duration)
|
||||
}
|
||||
|
||||
template <class T>
|
||||
hsBool32 hsTimedValue<T>::operator==(const hsTimedValue<T>& v)
|
||||
bool32 hsTimedValue<T>::operator==(const hsTimedValue<T>& v)
|
||||
{
|
||||
if ((fFlags == v.fFlags) &&
|
||||
(fDuration == v.fDuration) &&
|
||||
|
@ -55,7 +55,7 @@ plATCEaseCurve *plATCEaseCurve::CreateEaseCurve(uint8_t type, float minLength, f
|
||||
return nil;
|
||||
}
|
||||
|
||||
void plATCEaseCurve::RecalcToSpeed(float startSpeed, float goalSpeed, hsBool preserveRate /* = false */)
|
||||
void plATCEaseCurve::RecalcToSpeed(float startSpeed, float goalSpeed, bool preserveRate /* = false */)
|
||||
{
|
||||
float rate = 1;
|
||||
|
||||
@ -233,7 +233,7 @@ plATCEaseCurve *plSplineEaseCurve::Clone() const
|
||||
return curve;
|
||||
}
|
||||
|
||||
void plSplineEaseCurve::RecalcToSpeed(float startSpeed, float goalSpeed, hsBool preserveRate /* = false */)
|
||||
void plSplineEaseCurve::RecalcToSpeed(float startSpeed, float goalSpeed, bool preserveRate /* = false */)
|
||||
{
|
||||
plATCEaseCurve::RecalcToSpeed(startSpeed, goalSpeed, preserveRate);
|
||||
|
||||
|
@ -230,7 +230,7 @@ void plAnimPath::Write(hsStream* stream, hsResMgr* mgr)
|
||||
stream->WriteLEScalar(fMinDistSq);
|
||||
}
|
||||
|
||||
hsBool plAnimPath::OutOfRange(hsPoint3 &worldPt, float range) const
|
||||
bool plAnimPath::OutOfRange(hsPoint3 &worldPt, float range) const
|
||||
{
|
||||
hsPoint3 pt = fWorldToLocal * worldPt;
|
||||
|
||||
@ -603,7 +603,7 @@ void plAnimPath::MakeDrawList(hsTArray<uint16_t>& idx, hsTArray<hsPoint3>& pos)
|
||||
GetPosition(&p1);
|
||||
|
||||
time += timeInc;
|
||||
hsBool quit=false;
|
||||
bool quit=false;
|
||||
while(! quit && time < animLen+timeInc)
|
||||
{
|
||||
if (time > animLen)
|
||||
@ -651,7 +651,7 @@ void plAnimPath::ComputeArcLenDeltas(int32_t numSamples)
|
||||
fArcLenDeltas[cnt++]=aldi;
|
||||
time += timeInc;
|
||||
|
||||
hsBool quit=false;
|
||||
bool quit=false;
|
||||
while(!quit && time<animLen+timeInc)
|
||||
{
|
||||
if (time > animLen || cnt+1 == numSamples)
|
||||
@ -677,7 +677,7 @@ void plAnimPath::ComputeArcLenDeltas(int32_t numSamples)
|
||||
// Returns time of point (at least) arcLength units away from point at startTime.
|
||||
// Also sets strtSrchIdx for incremental searching.
|
||||
//
|
||||
float plAnimPath::GetLookAheadTime(float startTime, float arcLengthIn, hsBool bwd,
|
||||
float plAnimPath::GetLookAheadTime(float startTime, float arcLengthIn, bool bwd,
|
||||
int32_t* startSrchIdx)
|
||||
{
|
||||
if (arcLengthIn==0)
|
||||
@ -700,7 +700,7 @@ float plAnimPath::GetLookAheadTime(float startTime, float arcLengthIn, hsBool bw
|
||||
SetCurTime(startTime, kCalcPosOnly);
|
||||
|
||||
// find nearest (forward) arcLen sample point, use starting srch index provided
|
||||
hsBool found=false;
|
||||
bool found=false;
|
||||
int32_t i;
|
||||
for(i=(*startSrchIdx); i<fArcLenDeltas.GetCount()-1; i++)
|
||||
{
|
||||
@ -748,7 +748,7 @@ float plAnimPath::GetLookAheadTime(float startTime, float arcLengthIn, hsBool bw
|
||||
|
||||
float curArcLen = hsVector3(&pos2, &pos).Magnitude();
|
||||
float curTime=0;
|
||||
hsBool quit=false;
|
||||
bool quit=false;
|
||||
float timeOut = 0;
|
||||
int32_t inc = bwd ? -1 : 1;
|
||||
// now sum distance deltas until we exceed the desired arcLen
|
||||
|
@ -147,11 +147,11 @@ public:
|
||||
void SetAnimPathFlags(uint32_t f) { fAnimPathFlags=f; }
|
||||
uint32_t GetAnimPathFlags() const { return fAnimPathFlags; }
|
||||
|
||||
void SetWrap(hsBool on) { if(on)fAnimPathFlags |= kWrap; else fAnimPathFlags &= ~kWrap; }
|
||||
hsBool GetWrap() const { return 0 != (fAnimPathFlags & kWrap); }
|
||||
void SetWrap(bool on) { if(on)fAnimPathFlags |= kWrap; else fAnimPathFlags &= ~kWrap; }
|
||||
bool GetWrap() const { return 0 != (fAnimPathFlags & kWrap); }
|
||||
|
||||
void SetFarthest(hsBool on) { if(on)fAnimPathFlags |= kFarthest; else fAnimPathFlags &= ~kFarthest; }
|
||||
hsBool GetFarthest() const { return 0 != (fAnimPathFlags & kFarthest); }
|
||||
void SetFarthest(bool on) { if(on)fAnimPathFlags |= kFarthest; else fAnimPathFlags &= ~kFarthest; }
|
||||
bool GetFarthest() const { return 0 != (fAnimPathFlags & kFarthest); }
|
||||
|
||||
void SetCurTime(float t, uint32_t calcFlags=0);
|
||||
float GetCurTime() const { return fTime; }
|
||||
@ -170,7 +170,7 @@ public:
|
||||
hsVector3* GetUp(hsVector3* uOut) const { uOut->Set(fXform.fMap[0][1], fXform.fMap[1][1], fXform.fMap[2][1]); return uOut; }
|
||||
hsVector3* GetAcceleration(hsVector3* aOut) const { *aOut = fAccel; return aOut; }
|
||||
|
||||
hsBool OutOfRange(hsPoint3 &pt, float range) const;
|
||||
bool OutOfRange(hsPoint3 &pt, float range) const;
|
||||
const hsAffineParts* Parts() const { return &fParts; }
|
||||
void InitParts(const hsAffineParts& p) { fParts = p; }
|
||||
|
||||
@ -179,7 +179,7 @@ public:
|
||||
|
||||
// for arclen usage
|
||||
void ComputeArcLenDeltas(int32_t numSamples=256);
|
||||
float GetLookAheadTime(float startTime, float arcLength, hsBool bwd, int32_t* startSrchIdx);
|
||||
float GetLookAheadTime(float startTime, float arcLength, bool bwd, int32_t* startSrchIdx);
|
||||
|
||||
virtual void Read(hsStream* s, hsResMgr* mgr);
|
||||
virtual void Write(hsStream* s, hsResMgr* mgr);
|
||||
|
@ -262,7 +262,7 @@ void plAnimTimeConvert::ICheckTimeCallbacks(float frameStart, float frameStop)
|
||||
}
|
||||
}
|
||||
|
||||
hsBool plAnimTimeConvert::ITimeInFrame(float secs, float start, float stop)
|
||||
bool plAnimTimeConvert::ITimeInFrame(float secs, float start, float stop)
|
||||
{
|
||||
if (secs == start && secs == stop)
|
||||
return true;
|
||||
@ -446,7 +446,7 @@ void plAnimTimeConvert::SetOwner(plSynchedObject* o)
|
||||
fOwner = o;
|
||||
}
|
||||
|
||||
hsBool plAnimTimeConvert::IIsStoppedAt(const double &wSecs, const uint32_t &flags,
|
||||
bool plAnimTimeConvert::IIsStoppedAt(const double &wSecs, const uint32_t &flags,
|
||||
const plATCEaseCurve *curve) const
|
||||
{
|
||||
if (flags & kStopped)
|
||||
@ -455,7 +455,7 @@ hsBool plAnimTimeConvert::IIsStoppedAt(const double &wSecs, const uint32_t &flag
|
||||
return false;
|
||||
}
|
||||
|
||||
hsBool plAnimTimeConvert::IsStoppedAt(double wSecs) const
|
||||
bool plAnimTimeConvert::IsStoppedAt(double wSecs) const
|
||||
{
|
||||
if (wSecs > fLastStateChange)
|
||||
return IIsStoppedAt(wSecs, fFlags, fCurrentEaseCurve);
|
||||
@ -536,11 +536,11 @@ float plAnimTimeConvert::WorldToAnimTime(double wSecs)
|
||||
|
||||
// if our speed is < 0, then checking for the kBackwards flag isn't enough
|
||||
// so we base our decision on the direction of the actual change we've computed.
|
||||
hsBool forewards = delSecs >= 0;
|
||||
bool forewards = delSecs >= 0;
|
||||
|
||||
if (fFlags & kLoop)
|
||||
{
|
||||
hsBool wrapped = false;
|
||||
bool wrapped = false;
|
||||
|
||||
if (forewards)
|
||||
{
|
||||
@ -654,11 +654,11 @@ float plAnimTimeConvert::IWorldToAnimTimeNoUpdate(double wSecs, plATCState *stat
|
||||
secs = state->fStartAnimTime + delSecs;
|
||||
// At this point, "secs" is the pre-wrapped (before looping) anim time.
|
||||
// "delSecs" is the change in anim time
|
||||
hsBool forewards = delSecs >= 0;
|
||||
bool forewards = delSecs >= 0;
|
||||
|
||||
if (state->fFlags & kLoop)
|
||||
{
|
||||
hsBool wrapped = false;
|
||||
bool wrapped = false;
|
||||
|
||||
if (forewards)
|
||||
{
|
||||
@ -725,7 +725,7 @@ float plAnimTimeConvert::IWorldToAnimTimeBeforeState(double wSecs) const
|
||||
return IWorldToAnimTimeNoUpdate(wSecs, IGetState(wSecs));
|
||||
}
|
||||
|
||||
void plAnimTimeConvert::SetCurrentAnimTime(float s, hsBool jump /* = false */)
|
||||
void plAnimTimeConvert::SetCurrentAnimTime(float s, bool jump /* = false */)
|
||||
{
|
||||
// We're setting the anim value for whenever we last evaluated.
|
||||
fFlags |= kForcedMove;
|
||||
@ -743,7 +743,7 @@ void plAnimTimeConvert::SetCurrentAnimTime(float s, hsBool jump /* = false */)
|
||||
IProcessStateChange(hsTimer::GetSysSeconds(), fCurrentAnimTime);
|
||||
}
|
||||
|
||||
void plAnimTimeConvert::SetEase(hsBool easeIn, uint8_t type, float minLength, float maxLength, float normLength)
|
||||
void plAnimTimeConvert::SetEase(bool easeIn, uint8_t type, float minLength, float maxLength, float normLength)
|
||||
{
|
||||
if (easeIn)
|
||||
{
|
||||
@ -960,7 +960,7 @@ plAnimTimeConvert& plAnimTimeConvert::InitStop()
|
||||
return IStop(hsTimer::GetSysSeconds(), fCurrentAnimTime);
|
||||
}
|
||||
|
||||
plAnimTimeConvert& plAnimTimeConvert::Stop(hsBool on)
|
||||
plAnimTimeConvert& plAnimTimeConvert::Stop(bool on)
|
||||
{
|
||||
if( on )
|
||||
return Stop();
|
||||
@ -1058,7 +1058,7 @@ plAnimTimeConvert& plAnimTimeConvert::Start(double startTime)
|
||||
return IProcessStateChange(startTime);
|
||||
}
|
||||
|
||||
plAnimTimeConvert& plAnimTimeConvert::Backwards(hsBool on)
|
||||
plAnimTimeConvert& plAnimTimeConvert::Backwards(bool on)
|
||||
{
|
||||
return on ? Backwards() : Forewards();
|
||||
}
|
||||
@ -1109,7 +1109,7 @@ plAnimTimeConvert& plAnimTimeConvert::Forewards()
|
||||
return *this;
|
||||
}
|
||||
|
||||
plAnimTimeConvert& plAnimTimeConvert::Loop(hsBool on)
|
||||
plAnimTimeConvert& plAnimTimeConvert::Loop(bool on)
|
||||
{
|
||||
SetFlag(kLoop, on);
|
||||
|
||||
@ -1159,7 +1159,7 @@ void plAnimTimeConvert::RemoveCallback(plEventCallbackMsg* pMsg)
|
||||
}
|
||||
}
|
||||
|
||||
hsBool plAnimTimeConvert::HandleCmd(plAnimCmdMsg* modMsg)
|
||||
bool plAnimTimeConvert::HandleCmd(plAnimCmdMsg* modMsg)
|
||||
{
|
||||
if (fFlags & kNeedsReset)
|
||||
ResetWrap();
|
||||
@ -1338,7 +1338,7 @@ void plAnimTimeConvert::ClearCallbacks()
|
||||
fCallbackMsgs.Reset();
|
||||
}
|
||||
|
||||
void plAnimTimeConvert::EnableCallbacks(hsBool val)
|
||||
void plAnimTimeConvert::EnableCallbacks(bool val)
|
||||
{
|
||||
SetFlag(kNoCallbacks, !val);
|
||||
}
|
||||
|
@ -101,18 +101,18 @@ protected:
|
||||
void IClearSpeedEase();
|
||||
|
||||
void ICheckTimeCallbacks(float frameStart, float frameStop);
|
||||
hsBool ITimeInFrame(float secs, float start, float stop);
|
||||
bool ITimeInFrame(float secs, float start, float stop);
|
||||
void ISendCallback(int i);
|
||||
|
||||
plAnimTimeConvert& IStop(double time, float animTime);
|
||||
hsBool IIsStoppedAt(const double &wSecs, const uint32_t &flags, const plATCEaseCurve *curve) const;
|
||||
bool IIsStoppedAt(const double &wSecs, const uint32_t &flags, const plATCEaseCurve *curve) const;
|
||||
plAnimTimeConvert& IProcessStateChange(double worldTime, float animTime = -1);
|
||||
void IFlushOldStates();
|
||||
void IClearAllStates();
|
||||
plATCState *IGetState(double wSecs) const;
|
||||
plATCState *IGetLatestState() const;
|
||||
|
||||
plAnimTimeConvert& SetFlag(uint8_t f, hsBool on) { if(on)fFlags |= f; else fFlags &= ~f; return *this; }
|
||||
plAnimTimeConvert& SetFlag(uint8_t f, bool on) { if(on)fFlags |= f; else fFlags &= ~f; return *this; }
|
||||
|
||||
public:
|
||||
plAnimTimeConvert();
|
||||
@ -127,7 +127,7 @@ public:
|
||||
const plSynchedObject* GetOwner() const { return fOwner; }
|
||||
|
||||
// ALL WorldToAnimTime functions are only valid if called with a time >= fLastEvalWorldTime.
|
||||
hsBool IsStoppedAt(double wSecs) const;
|
||||
bool IsStoppedAt(double wSecs) const;
|
||||
float WorldToAnimTime(double wSecs);
|
||||
float WorldToAnimTimeNoUpdate(double wSecs) const; // convert time but don't fire triggers or set state
|
||||
|
||||
@ -142,7 +142,7 @@ public:
|
||||
void SetLoopPoints(float begin, float end) { SetLoopBegin(begin); SetLoopEnd(end); }
|
||||
void SetLoopBegin(float s) { fLoopBegin = s; }
|
||||
void SetLoopEnd(float s) { fLoopEnd = s; }
|
||||
void SetEase(hsBool easeIn, uint8_t inType, float minLength, float maxLength, float inLength);
|
||||
void SetEase(bool easeIn, uint8_t inType, float minLength, float maxLength, float inLength);
|
||||
void SetCurrentEaseCurve(int x); // 0=nil, 1=easeIn, 2=easeOut, 3=speed
|
||||
|
||||
float GetBegin() const { return fBegin; }
|
||||
@ -158,40 +158,40 @@ public:
|
||||
void ResetWrap();
|
||||
|
||||
plAnimTimeConvert& ClearFlags() { fFlags = kNone; return *this; }
|
||||
hsBool GetFlag(uint8_t f) const { return (fFlags & f) ? true : false; }
|
||||
bool GetFlag(uint8_t f) const { return (fFlags & f) ? true : false; }
|
||||
|
||||
plAnimTimeConvert& InitStop(); // Called when initializing an anim that doesn't autostart
|
||||
plAnimTimeConvert& Stop(hsBool on);
|
||||
plAnimTimeConvert& Stop(bool on);
|
||||
plAnimTimeConvert& Stop(double s = -1.0);
|
||||
plAnimTimeConvert& Start(double s = -1.0);
|
||||
plAnimTimeConvert& PlayToTime(float time);
|
||||
plAnimTimeConvert& PlayToPercentage(float percent); // zero to one.
|
||||
|
||||
plAnimTimeConvert& Loop(hsBool on);
|
||||
plAnimTimeConvert& Loop(bool on);
|
||||
plAnimTimeConvert& Loop() { return Loop(true); }
|
||||
plAnimTimeConvert& NoLoop() { return Loop(false); }
|
||||
|
||||
plAnimTimeConvert& Backwards(hsBool on);
|
||||
plAnimTimeConvert& Backwards(bool on);
|
||||
plAnimTimeConvert& Backwards();
|
||||
plAnimTimeConvert& Forewards();
|
||||
|
||||
hsBool IsStopped() const { return 0 != (fFlags & kStopped); }
|
||||
hsBool IsLooped() const { return 0 != (fFlags & kLoop); }
|
||||
hsBool IsBackwards() const { return 0 != (fFlags & kBackwards); }
|
||||
hsBool IsForewards() const { return !(fFlags & kBackwards); }
|
||||
bool IsStopped() const { return 0 != (fFlags & kStopped); }
|
||||
bool IsLooped() const { return 0 != (fFlags & kLoop); }
|
||||
bool IsBackwards() const { return 0 != (fFlags & kBackwards); }
|
||||
bool IsForewards() const { return !(fFlags & kBackwards); }
|
||||
|
||||
double LastEvalWorldTime() const { return fLastEvalWorldTime; }
|
||||
float CurrentAnimTime() const { return fCurrentAnimTime; }
|
||||
void SetCurrentAnimTime(float s, hsBool jump = false);
|
||||
void SetCurrentAnimTime(float s, bool jump = false);
|
||||
|
||||
virtual void Read(hsStream* s, hsResMgr* mgr);
|
||||
virtual void Write(hsStream* s, hsResMgr* mgr);
|
||||
|
||||
hsBool HandleCmd(plAnimCmdMsg* msg);
|
||||
bool HandleCmd(plAnimCmdMsg* msg);
|
||||
void AddCallback(plEventCallbackMsg* pMsg);
|
||||
void RemoveCallback(plEventCallbackMsg* pMsg);
|
||||
void ClearCallbacks();
|
||||
void EnableCallbacks(hsBool val);
|
||||
void EnableCallbacks(bool val);
|
||||
|
||||
enum plAnimTimeFlags {
|
||||
kNone = 0x0,
|
||||
@ -246,7 +246,7 @@ public:
|
||||
virtual void Read(hsStream *s, hsResMgr *mgr);
|
||||
virtual void Write(hsStream *s, hsResMgr *mgr);
|
||||
|
||||
virtual void RecalcToSpeed(float startSpeed, float goalSpeed, hsBool preserveRate = false);
|
||||
virtual void RecalcToSpeed(float startSpeed, float goalSpeed, bool preserveRate = false);
|
||||
virtual void SetLengthOnRate(float rate);
|
||||
virtual void SetLengthOnDistance(float dist) = 0;
|
||||
virtual float PositionGivenTime(float time) const = 0;
|
||||
@ -288,7 +288,7 @@ public:
|
||||
virtual void Write(hsStream *s, hsResMgr *mgr);
|
||||
|
||||
virtual plATCEaseCurve *Clone() const;
|
||||
virtual void RecalcToSpeed(float startSpeed, float goalSpeed, hsBool preserveRate = false);
|
||||
virtual void RecalcToSpeed(float startSpeed, float goalSpeed, bool preserveRate = false);
|
||||
virtual void SetLengthOnDistance(float dist);
|
||||
virtual float PositionGivenTime(float time) const;
|
||||
virtual float VelocityGivenTime(float time) const;
|
||||
|
@ -83,7 +83,7 @@ void plLeafController::Interp(float time, float* result, plControllerCacheInfo *
|
||||
{
|
||||
hsAssert(fType == hsKeyFrame::kScalarKeyFrame || fType == hsKeyFrame::kBezScalarKeyFrame, kInvalidInterpString);
|
||||
|
||||
hsBool tryForward = (cache? cache->fAtc->IsForewards() : true);
|
||||
bool tryForward = (cache? cache->fAtc->IsForewards() : true);
|
||||
if (fType == hsKeyFrame::kScalarKeyFrame)
|
||||
{
|
||||
hsScalarKey *k1, *k2;
|
||||
@ -106,7 +106,7 @@ void plLeafController::Interp(float time, hsScalarTriple* result, plControllerCa
|
||||
{
|
||||
hsAssert(fType == hsKeyFrame::kPoint3KeyFrame || fType == hsKeyFrame::kBezPoint3KeyFrame, kInvalidInterpString);
|
||||
|
||||
hsBool tryForward = (cache? cache->fAtc->IsForewards() : true);
|
||||
bool tryForward = (cache? cache->fAtc->IsForewards() : true);
|
||||
if (fType == hsKeyFrame::kPoint3KeyFrame)
|
||||
{
|
||||
hsPoint3Key *k1, *k2;
|
||||
@ -129,7 +129,7 @@ void plLeafController::Interp(float time, hsScaleValue* result, plControllerCach
|
||||
{
|
||||
hsAssert(fType == hsKeyFrame::kScaleKeyFrame || fType == hsKeyFrame::kBezScaleKeyFrame, kInvalidInterpString);
|
||||
|
||||
hsBool tryForward = (cache? cache->fAtc->IsForewards() : true);
|
||||
bool tryForward = (cache? cache->fAtc->IsForewards() : true);
|
||||
if (fType == hsKeyFrame::kScaleKeyFrame)
|
||||
{
|
||||
hsScaleKey *k1, *k2;
|
||||
@ -154,7 +154,7 @@ void plLeafController::Interp(float time, hsQuat* result, plControllerCacheInfo
|
||||
fType == hsKeyFrame::kCompressedQuatKeyFrame32 ||
|
||||
fType == hsKeyFrame::kCompressedQuatKeyFrame64, kInvalidInterpString);
|
||||
|
||||
hsBool tryForward = (cache? cache->fAtc->IsForewards() : true);
|
||||
bool tryForward = (cache? cache->fAtc->IsForewards() : true);
|
||||
if (fType == hsKeyFrame::kQuatKeyFrame)
|
||||
{
|
||||
hsQuatKey *k1, *k2;
|
||||
@ -193,7 +193,7 @@ void plLeafController::Interp(float time, hsMatrix33* result, plControllerCacheI
|
||||
{
|
||||
hsAssert(fType == hsKeyFrame::kMatrix33KeyFrame, kInvalidInterpString);
|
||||
|
||||
hsBool tryForward = (cache? cache->fAtc->IsForewards() : true);
|
||||
bool tryForward = (cache? cache->fAtc->IsForewards() : true);
|
||||
hsMatrix33Key *k1, *k2;
|
||||
float t;
|
||||
uint32_t *idxStore = (cache ? &cache->fKeyIndex : &fLastKeyIdx);
|
||||
@ -205,7 +205,7 @@ void plLeafController::Interp(float time, hsMatrix44* result, plControllerCacheI
|
||||
{
|
||||
hsAssert(fType == hsKeyFrame::kMatrix44KeyFrame, kInvalidInterpString);
|
||||
|
||||
hsBool tryForward = (cache? cache->fAtc->IsForewards() : true);
|
||||
bool tryForward = (cache? cache->fAtc->IsForewards() : true);
|
||||
hsMatrix44Key *k1, *k2;
|
||||
float t;
|
||||
uint32_t *idxStore = (cache ? &cache->fKeyIndex : &fLastKeyIdx);
|
||||
@ -482,7 +482,7 @@ void plLeafController::QuickScalarController(int numKeys, float* times, float* v
|
||||
// If all the keys are the same, this controller is pretty useless.
|
||||
// This situation actually comes up a lot because of the biped killer
|
||||
// trying to convert character studio animations.
|
||||
hsBool plLeafController::AllKeysMatch() const
|
||||
bool plLeafController::AllKeysMatch() const
|
||||
{
|
||||
if (fNumKeys <= 1)
|
||||
return true;
|
||||
@ -597,7 +597,7 @@ hsBool plLeafController::AllKeysMatch() const
|
||||
return true;
|
||||
}
|
||||
|
||||
hsBool plLeafController::PurgeRedundantSubcontrollers()
|
||||
bool plLeafController::PurgeRedundantSubcontrollers()
|
||||
{
|
||||
return AllKeysMatch();
|
||||
}
|
||||
@ -831,7 +831,7 @@ void plCompoundController::GetKeyTimes(hsTArray<float> &keyTimes) const
|
||||
fZController->GetKeyTimes(keyTimes);
|
||||
}
|
||||
|
||||
hsBool plCompoundController::AllKeysMatch() const
|
||||
bool plCompoundController::AllKeysMatch() const
|
||||
{
|
||||
return (!fXController || fXController->AllKeysMatch()) &&
|
||||
(!fYController || fYController->AllKeysMatch()) &&
|
||||
@ -854,7 +854,7 @@ hsBool plCompoundController::AllKeysMatch() const
|
||||
// At the moment, this doesn't seem likely to save us enough space
|
||||
// to be worth the effort. (This is why this function doesn't
|
||||
// recursively call purge on its subcontrollers.)
|
||||
hsBool plCompoundController::PurgeRedundantSubcontrollers()
|
||||
bool plCompoundController::PurgeRedundantSubcontrollers()
|
||||
{
|
||||
if (fXController && fXController->AllKeysMatch())
|
||||
{
|
||||
|
@ -110,12 +110,12 @@ public:
|
||||
virtual plControllerCacheInfo* CreateCache() const { return nil; } // Caller must handle deleting the pointer.
|
||||
virtual float GetLength() const = 0;
|
||||
virtual void GetKeyTimes(hsTArray<float> &keyTimes) const = 0;
|
||||
virtual hsBool AllKeysMatch() const = 0;
|
||||
virtual bool AllKeysMatch() const = 0;
|
||||
|
||||
// Checks each of our subcontrollers (if we have any) and deletes any that
|
||||
// are nothing but matching keys. Returns true if this controller itself
|
||||
// is redundant.
|
||||
virtual hsBool PurgeRedundantSubcontrollers() = 0;
|
||||
virtual bool PurgeRedundantSubcontrollers() = 0;
|
||||
};
|
||||
|
||||
//////////////////////////////////////////////////////////////
|
||||
@ -169,8 +169,8 @@ public:
|
||||
void GetKeyTimes(hsTArray<float> &keyTimes) const;
|
||||
void AllocKeys(uint32_t n, uint8_t type);
|
||||
void QuickScalarController(int numKeys, float* times, float* values, uint32_t valueStrides);
|
||||
hsBool AllKeysMatch() const;
|
||||
hsBool PurgeRedundantSubcontrollers();
|
||||
bool AllKeysMatch() const;
|
||||
bool PurgeRedundantSubcontrollers();
|
||||
|
||||
void Read(hsStream* s, hsResMgr* mgr);
|
||||
void Write(hsStream* s, hsResMgr* mgr);
|
||||
@ -211,8 +211,8 @@ public:
|
||||
plController *GetController(int32_t i) const;
|
||||
float GetLength() const;
|
||||
void GetKeyTimes(hsTArray<float> &keyTimes) const;
|
||||
hsBool AllKeysMatch() const;
|
||||
hsBool PurgeRedundantSubcontrollers();
|
||||
bool AllKeysMatch() const;
|
||||
bool PurgeRedundantSubcontrollers();
|
||||
|
||||
void SetXController(plController *c) { delete fXController; fXController = c; }
|
||||
void SetYController(plController *c) { delete fYController; fYController = c; }
|
||||
|
Reference in New Issue
Block a user