mirror of
https://foundry.openuru.org/gitblit/r/CWE-ou-minkata.git
synced 2025-07-17 10:52:46 +00:00
Eliminate hsScalar and hsFixed
Modern CPUs support floats just fine... hsFixed was crazy.
This commit is contained in:
@ -117,13 +117,13 @@ public:
|
||||
void SetLoopName(const char *name);
|
||||
const char *GetLoopName();
|
||||
|
||||
hsScalar fBegin;
|
||||
hsScalar fEnd;
|
||||
hsScalar fLoopEnd;
|
||||
hsScalar fLoopBegin;
|
||||
hsScalar fSpeed;
|
||||
hsScalar fSpeedChangeRate;
|
||||
hsScalar fTime;
|
||||
float fBegin;
|
||||
float fEnd;
|
||||
float fLoopEnd;
|
||||
float fLoopBegin;
|
||||
float fSpeed;
|
||||
float fSpeedChangeRate;
|
||||
float fTime;
|
||||
|
||||
// IO
|
||||
void Read(hsStream* stream, hsResMgr* mgr);
|
||||
@ -168,11 +168,11 @@ public:
|
||||
void SetAnimName(const char *name);
|
||||
const char *GetAnimName();
|
||||
|
||||
hsScalar fBlend;
|
||||
hsScalar fBlendRate;
|
||||
hsScalar fAmp;
|
||||
hsScalar fAmpRate;
|
||||
hsScalar fAnimTime;
|
||||
float fBlend;
|
||||
float fBlendRate;
|
||||
float fAmp;
|
||||
float fAmpRate;
|
||||
float fAnimTime;
|
||||
|
||||
// IO
|
||||
void Read(hsStream* stream, hsResMgr* mgr);
|
||||
@ -183,7 +183,7 @@ class plAGInstanceCallbackMsg : public plEventCallbackMsg
|
||||
{
|
||||
public:
|
||||
plAGInstanceCallbackMsg() : plEventCallbackMsg(), fInstance(nil) {}
|
||||
plAGInstanceCallbackMsg(plKey receiver, CallbackEvent e, int idx=0, hsScalar t=0, int16_t repeats=-1, uint16_t user=0) :
|
||||
plAGInstanceCallbackMsg(plKey receiver, CallbackEvent e, int idx=0, float t=0, int16_t repeats=-1, uint16_t user=0) :
|
||||
plEventCallbackMsg(receiver, e, idx, t, repeats, user), fInstance(nil) {}
|
||||
|
||||
CLASSNAME_REGISTER( plAGInstanceCallbackMsg );
|
||||
@ -203,7 +203,7 @@ protected:
|
||||
|
||||
public:
|
||||
plAGDetachCallbackMsg() : plEventCallbackMsg(), fAnimName(nil) {}
|
||||
plAGDetachCallbackMsg(plKey receiver, CallbackEvent e, int idx=0, hsScalar t=0, int16_t repeats=-1, uint16_t user=0) :
|
||||
plAGDetachCallbackMsg(plKey receiver, CallbackEvent e, int idx=0, float t=0, int16_t repeats=-1, uint16_t user=0) :
|
||||
plEventCallbackMsg(receiver, e, idx, t, repeats, user), fAnimName(nil) {}
|
||||
virtual ~plAGDetachCallbackMsg();
|
||||
|
||||
|
@ -416,7 +416,7 @@ plAvBrainGenericMsg::plAvBrainGenericMsg()
|
||||
|
||||
// canonical CTOR sender receiver type stage rewind transitionTime
|
||||
plAvBrainGenericMsg::plAvBrainGenericMsg(const plKey& sender, const plKey &receiver,
|
||||
plAvBrainGenericMsg::Type type, int stage, hsBool rewind, hsScalar transitionTime)
|
||||
plAvBrainGenericMsg::Type type, int stage, hsBool rewind, float transitionTime)
|
||||
: plAvatarMsg(sender, receiver),
|
||||
fType(type),
|
||||
fWhichStage(stage),
|
||||
@ -430,8 +430,8 @@ plAvBrainGenericMsg::plAvBrainGenericMsg(const plKey& sender, const plKey &recei
|
||||
}
|
||||
|
||||
plAvBrainGenericMsg::plAvBrainGenericMsg(const plKey& sender, const plKey &receiver,
|
||||
Type type, int stage, hsBool setTime, hsScalar newTime,
|
||||
hsBool setDirection, bool isForward, hsScalar transitiontime)
|
||||
Type type, int stage, hsBool setTime, float newTime,
|
||||
hsBool setDirection, bool isForward, float transitiontime)
|
||||
: plAvatarMsg(sender, receiver),
|
||||
fType(type),
|
||||
fWhichStage(stage),
|
||||
|
@ -282,9 +282,9 @@ public:
|
||||
}
|
||||
fType;
|
||||
int fWhichStage; // used only by goto stage
|
||||
hsScalar fTransitionTime; // for crossfade between stages
|
||||
float fTransitionTime; // for crossfade between stages
|
||||
hsBool fSetTime;
|
||||
hsScalar fNewTime;
|
||||
float fNewTime;
|
||||
hsBool fSetDirection;
|
||||
hsBool fNewDirection;
|
||||
int fNewLoopCount;
|
||||
@ -293,7 +293,7 @@ public:
|
||||
|
||||
//! Older constructor version, allowing simple rewinding only
|
||||
plAvBrainGenericMsg(const plKey& sender, const plKey &receiver,
|
||||
Type type, int stage, hsBool rewind, hsScalar transitionTime);
|
||||
Type type, int stage, hsBool rewind, float transitionTime);
|
||||
|
||||
/** Canonical constructor, allowing full control over time and direction of new stage.
|
||||
\param sender Message sender
|
||||
@ -307,8 +307,8 @@ public:
|
||||
\param transitionTime Time in seconds to transition between stages.
|
||||
*/
|
||||
plAvBrainGenericMsg(const plKey& sender, const plKey &receiver,
|
||||
Type type, int stage, hsBool setTime, hsScalar newTime,
|
||||
hsBool setDirection, bool isForward, hsScalar transitiontime);
|
||||
Type type, int stage, hsBool setTime, float newTime,
|
||||
hsBool setDirection, bool isForward, float transitiontime);
|
||||
|
||||
/** Constructor for setting the loop count in a particular stage.
|
||||
\param sender The sender of this message.
|
||||
@ -419,7 +419,7 @@ class plAvatarOpacityCallbackMsg : public plEventCallbackMsg
|
||||
{
|
||||
public:
|
||||
plAvatarOpacityCallbackMsg() : plEventCallbackMsg() {}
|
||||
plAvatarOpacityCallbackMsg(plKey receiver, CallbackEvent e, int idx=0, hsScalar t=0, int16_t repeats=-1, uint16_t user=0) :
|
||||
plAvatarOpacityCallbackMsg(plKey receiver, CallbackEvent e, int idx=0, float t=0, int16_t repeats=-1, uint16_t user=0) :
|
||||
plEventCallbackMsg(receiver, e, idx, t, repeats, user) {}
|
||||
|
||||
CLASSNAME_REGISTER( plAvatarOpacityCallbackMsg );
|
||||
@ -449,7 +449,7 @@ class plAvatarPhysicsEnableCallbackMsg : public plEventCallbackMsg
|
||||
{
|
||||
public:
|
||||
plAvatarPhysicsEnableCallbackMsg() : plEventCallbackMsg() {}
|
||||
plAvatarPhysicsEnableCallbackMsg(plKey receiver, CallbackEvent e, int idx=0, hsScalar t=0, int16_t repeats=-1, uint16_t user=0) :
|
||||
plAvatarPhysicsEnableCallbackMsg(plKey receiver, CallbackEvent e, int idx=0, float t=0, int16_t repeats=-1, uint16_t user=0) :
|
||||
plEventCallbackMsg(receiver, e, idx, t, repeats, user) {}
|
||||
|
||||
CLASSNAME_REGISTER( plAvatarPhysicsEnableCallbackMsg );
|
||||
|
@ -73,7 +73,7 @@ void plBulletMsg::Write(hsStream* stream, hsResMgr* mgr)
|
||||
stream->WriteLEScalar(fPartyTime);
|
||||
}
|
||||
|
||||
void plBulletMsg::FireShot(const hsPoint3& from, const hsVector3& dir, hsScalar radius, hsScalar range, hsScalar psecs)
|
||||
void plBulletMsg::FireShot(const hsPoint3& from, const hsVector3& dir, float radius, float range, float psecs)
|
||||
{
|
||||
fFrom = from;
|
||||
fDir = dir;
|
||||
@ -84,13 +84,13 @@ void plBulletMsg::FireShot(const hsPoint3& from, const hsVector3& dir, hsScalar
|
||||
fCmd = kShot;
|
||||
}
|
||||
|
||||
void plBulletMsg::FireShot(const hsPoint3& from, const hsPoint3& at, hsScalar radius, hsScalar psecs)
|
||||
void plBulletMsg::FireShot(const hsPoint3& from, const hsPoint3& at, float radius, float psecs)
|
||||
{
|
||||
hsVector3 dir(&at, &from);
|
||||
hsScalar invLen = hsFastMath::InvSqrt(dir.MagnitudeSquared());
|
||||
float invLen = hsFastMath::InvSqrt(dir.MagnitudeSquared());
|
||||
hsAssert(invLen > 0, "degenerate from and at to fire bullet");
|
||||
dir *= invLen;
|
||||
hsScalar range = 1.f / invLen;
|
||||
float range = 1.f / invLen;
|
||||
|
||||
FireShot(from, dir, radius, range, psecs);
|
||||
}
|
||||
|
@ -60,9 +60,9 @@ protected:
|
||||
|
||||
hsPoint3 fFrom;
|
||||
hsVector3 fDir;
|
||||
hsScalar fRange;
|
||||
hsScalar fRadius;
|
||||
hsScalar fPartyTime;
|
||||
float fRange;
|
||||
float fRadius;
|
||||
float fPartyTime;
|
||||
public:
|
||||
plBulletMsg() { SetBCastFlag(kNetPropagate | kBCastByType, true); }
|
||||
plBulletMsg(const plKey &s,
|
||||
@ -81,17 +81,17 @@ public:
|
||||
hsBool Spray() const { return fCmd == kSpray; }
|
||||
hsBool Stop() const { return fCmd == kStop; }
|
||||
|
||||
void FireShot(const hsPoint3& from, const hsVector3& dir, hsScalar radius, hsScalar range, hsScalar psecs=-1.f);
|
||||
void FireShot(const hsPoint3& from, const hsPoint3& at, hsScalar radius, hsScalar psecs=-1.f);
|
||||
void FireShot(const hsPoint3& from, const hsVector3& dir, float radius, float range, float psecs=-1.f);
|
||||
void FireShot(const hsPoint3& from, const hsPoint3& at, float radius, float psecs=-1.f);
|
||||
|
||||
Cmd GetCmd() const { return fCmd; }
|
||||
void SetCmd(Cmd c) { fCmd = c; }
|
||||
|
||||
const hsPoint3& From() const { return fFrom; }
|
||||
const hsVector3& Dir() const { return fDir; }
|
||||
hsScalar Range() const { return fRange; }
|
||||
hsScalar Radius() const { return fRadius; }
|
||||
hsScalar PartyTime() const { return fPartyTime; }
|
||||
float Range() const { return fRange; }
|
||||
float Radius() const { return fRadius; }
|
||||
float PartyTime() const { return fPartyTime; }
|
||||
};
|
||||
|
||||
#endif // plBulletMsg_inc
|
||||
|
@ -55,7 +55,7 @@ plDynaDecalEnableMsg::plDynaDecalEnableMsg()
|
||||
{
|
||||
}
|
||||
|
||||
plDynaDecalEnableMsg::plDynaDecalEnableMsg(const plKey& r, const plKey& a, double t, hsScalar w, hsBool end, uint32_t id, hsBool isArm)
|
||||
plDynaDecalEnableMsg::plDynaDecalEnableMsg(const plKey& r, const plKey& a, double t, float w, hsBool end, uint32_t id, hsBool isArm)
|
||||
: plMessage(nil, r, nil),
|
||||
fKey(a),
|
||||
fFlags(0),
|
||||
|
@ -58,12 +58,12 @@ protected:
|
||||
};
|
||||
plKey fKey;
|
||||
double fConTime;
|
||||
hsScalar fWetLength;
|
||||
float fWetLength;
|
||||
uint32_t fFlags;
|
||||
uint32_t fID;
|
||||
public:
|
||||
plDynaDecalEnableMsg();
|
||||
plDynaDecalEnableMsg(const plKey& r, const plKey& armOrShapeKey, double conTime, hsScalar wetLength, hsBool end, uint32_t id=uint32_t(-1), hsBool isArm=true);
|
||||
plDynaDecalEnableMsg(const plKey& r, const plKey& armOrShapeKey, double conTime, float wetLength, hsBool end, uint32_t id=uint32_t(-1), hsBool isArm=true);
|
||||
~plDynaDecalEnableMsg();
|
||||
|
||||
CLASSNAME_REGISTER( plDynaDecalEnableMsg );
|
||||
@ -85,8 +85,8 @@ public:
|
||||
double GetContactTime() const { return fConTime; }
|
||||
void SetContactTime(double t) { fConTime = t; }
|
||||
|
||||
hsScalar GetWetLength() const { return fWetLength; }
|
||||
void SetWetLength(hsScalar w) { fWetLength = w; }
|
||||
float GetWetLength() const { return fWetLength; }
|
||||
void SetWetLength(float w) { fWetLength = w; }
|
||||
|
||||
hsBool AtEnd() const { return 0 != (fFlags & kAtEnd); }
|
||||
void SetAtEnd(hsBool b) { if(b)fFlags |= kAtEnd; else fFlags &= ~kAtEnd; }
|
||||
|
@ -67,11 +67,11 @@ public:
|
||||
uint32_t fCmd;
|
||||
|
||||
hsPoint3 fPos;
|
||||
hsScalar fHither;
|
||||
hsScalar fYon;
|
||||
hsScalar fFogStart;
|
||||
float fHither;
|
||||
float fYon;
|
||||
float fFogStart;
|
||||
hsColorRGBA fColor;
|
||||
hsScalar fRefresh;
|
||||
float fRefresh;
|
||||
|
||||
public:
|
||||
plDynamicEnvMapMsg() : plMessage(nil, nil, nil), fCmd(0) {}
|
||||
|
@ -89,7 +89,7 @@ protected:
|
||||
ControlEventCode fControlCode;
|
||||
hsBool fControlActivated;
|
||||
hsPoint3 fTurnToPt;
|
||||
hsScalar fControlPct;
|
||||
float fControlPct;
|
||||
public:
|
||||
|
||||
plControlEventMsg();
|
||||
@ -105,12 +105,12 @@ public:
|
||||
void SetControlCode(ControlEventCode c) { fControlCode = c; }
|
||||
void SetControlActivated(hsBool b) { fControlActivated = b; }
|
||||
void SetTurnToPt(hsPoint3 pt) { fTurnToPt = pt; }
|
||||
void SetControlPct(hsScalar p) { fControlPct = p; }
|
||||
void SetControlPct(float p) { fControlPct = p; }
|
||||
|
||||
ControlEventCode GetControlCode() const { return fControlCode; }
|
||||
hsBool ControlActivated() { return fControlActivated; }
|
||||
hsPoint3 GetTurnToPt() { return fTurnToPt; }
|
||||
hsScalar GetPct() { return fControlPct; }
|
||||
float GetPct() { return fControlPct; }
|
||||
char* GetCmdString() { return fCmd; }
|
||||
|
||||
// IO
|
||||
|
@ -60,9 +60,9 @@ public:
|
||||
CLASSNAME_REGISTER( plInterestingModMsg );
|
||||
GETINTERFACE_ANY( plInterestingModMsg, plMessage );
|
||||
|
||||
hsScalar fWeight;
|
||||
hsScalar fRadius;
|
||||
hsScalar fSize;
|
||||
float fWeight;
|
||||
float fRadius;
|
||||
float fSize;
|
||||
hsPoint3 fPos;
|
||||
plKey fObj;
|
||||
uint8_t fType;
|
||||
|
@ -78,12 +78,12 @@ protected:
|
||||
hsColorRGBA fColor;
|
||||
|
||||
hsColorRGBA fFadeInColor;
|
||||
hsScalar fFadeInSecs;
|
||||
float fFadeInSecs;
|
||||
|
||||
hsColorRGBA fFadeOutColor;
|
||||
hsScalar fFadeOutSecs;
|
||||
float fFadeOutSecs;
|
||||
|
||||
hsScalar fVolume;
|
||||
float fVolume;
|
||||
|
||||
char* fFileName;
|
||||
|
||||
@ -135,25 +135,25 @@ public:
|
||||
|
||||
// Center 0,0 is center of screen, 1,1 is Upper-Right, -1,-1 is Lower-Left, etc.
|
||||
const hsPoint2& GetCenter() const { return fCenter; }
|
||||
hsScalar GetCenterX() const { return fCenter.fX; }
|
||||
hsScalar GetCenterY() const { return fCenter.fY; }
|
||||
float GetCenterX() const { return fCenter.fX; }
|
||||
float GetCenterY() const { return fCenter.fY; }
|
||||
|
||||
plMovieMsg& SetCenter(const hsPoint2& p) { fCenter = p; return *this; }
|
||||
plMovieMsg& SetCenter(hsScalar x, hsScalar y) { fCenter.Set(x, y); return *this; }
|
||||
plMovieMsg& SetCenterX(hsScalar x) { fCenter.fX = x; return *this; }
|
||||
plMovieMsg& SetCenterY(hsScalar y) { fCenter.fY = y; return *this; }
|
||||
plMovieMsg& SetCenter(float x, float y) { fCenter.Set(x, y); return *this; }
|
||||
plMovieMsg& SetCenterX(float x) { fCenter.fX = x; return *this; }
|
||||
plMovieMsg& SetCenterY(float y) { fCenter.fY = y; return *this; }
|
||||
|
||||
// Scale of 1.0 matches movie pixel to screen pixel (whatever the resolution).
|
||||
// Scale of 2.0 doubles each movie pixel across 2 screen pixels.
|
||||
// Etc.
|
||||
const hsPoint2& GetScale() const { return fScale; }
|
||||
hsScalar GetScaleX() const { return fScale.fX; }
|
||||
hsScalar GetScaleY() const { return fScale.fY; }
|
||||
float GetScaleX() const { return fScale.fX; }
|
||||
float GetScaleY() const { return fScale.fY; }
|
||||
|
||||
plMovieMsg& SetScale(const hsPoint2& p) { fScale = p; return *this; }
|
||||
plMovieMsg& SetScale(hsScalar x, hsScalar y) { fScale.Set(x, y); return *this; }
|
||||
plMovieMsg& SetScaleX(hsScalar x) { fScale.fX = x; return *this; }
|
||||
plMovieMsg& SetScaleY(hsScalar y) { fScale.fY = y; return *this; }
|
||||
plMovieMsg& SetScale(float x, float y) { fScale.Set(x, y); return *this; }
|
||||
plMovieMsg& SetScaleX(float x) { fScale.fX = x; return *this; }
|
||||
plMovieMsg& SetScaleY(float y) { fScale.fY = y; return *this; }
|
||||
|
||||
// Include the movie folder, e.g. "avi/porno.bik"
|
||||
// String is copied, not pointer copy.
|
||||
@ -163,27 +163,27 @@ public:
|
||||
// Color is mostly useful for alpha fade up and down.
|
||||
const hsColorRGBA& GetColor() const { return fColor; }
|
||||
plMovieMsg& SetColor(const hsColorRGBA& c) { fColor = c; return *this; }
|
||||
plMovieMsg& SetColor(hsScalar r, hsScalar g, hsScalar b, hsScalar a) { fColor.Set(r,g,b,a); return *this; }
|
||||
plMovieMsg& SetOpacity(hsScalar a) { return SetColor(1.f, 1.f, 1.f, a); }
|
||||
plMovieMsg& SetColor(float r, float g, float b, float a) { fColor.Set(r,g,b,a); return *this; }
|
||||
plMovieMsg& SetOpacity(float a) { return SetColor(1.f, 1.f, 1.f, a); }
|
||||
|
||||
// Or the auto matic fades
|
||||
const hsColorRGBA& GetFadeInColor() const { return fFadeInColor; }
|
||||
plMovieMsg& SetFadeInColor(const hsColorRGBA& c) { fFadeInColor = c; return *this; }
|
||||
plMovieMsg& SetFadeInColor(hsScalar r, hsScalar g, hsScalar b, hsScalar a) { fFadeInColor.Set(r,g,b,a); return *this; }
|
||||
plMovieMsg& SetFadeInColor(float r, float g, float b, float a) { fFadeInColor.Set(r,g,b,a); return *this; }
|
||||
|
||||
hsScalar GetFadeInSecs() const { return fFadeInSecs; }
|
||||
plMovieMsg& SetFadeInSecs(hsScalar s) { fFadeInSecs = s; return *this; }
|
||||
float GetFadeInSecs() const { return fFadeInSecs; }
|
||||
plMovieMsg& SetFadeInSecs(float s) { fFadeInSecs = s; return *this; }
|
||||
|
||||
const hsColorRGBA& GetFadeOutColor() const { return fFadeOutColor; }
|
||||
plMovieMsg& SetFadeOutColor(const hsColorRGBA& c) { fFadeOutColor = c; return *this; }
|
||||
plMovieMsg& SetFadeOutColor(hsScalar r, hsScalar g, hsScalar b, hsScalar a) { fFadeOutColor.Set(r,g,b,a); return *this; }
|
||||
plMovieMsg& SetFadeOutColor(float r, float g, float b, float a) { fFadeOutColor.Set(r,g,b,a); return *this; }
|
||||
|
||||
hsScalar GetFadeOutSecs() const { return fFadeOutSecs; }
|
||||
plMovieMsg& SetFadeOutSecs(hsScalar s) { fFadeOutSecs = s; return *this; }
|
||||
float GetFadeOutSecs() const { return fFadeOutSecs; }
|
||||
plMovieMsg& SetFadeOutSecs(float s) { fFadeOutSecs = s; return *this; }
|
||||
|
||||
// Volume is on scale of 0=muted to 1=full
|
||||
hsScalar GetVolume() const { return fVolume; }
|
||||
plMovieMsg& SetVolume(hsScalar v) { fVolume = v; return *this; }
|
||||
float GetVolume() const { return fVolume; }
|
||||
plMovieMsg& SetVolume(float v) { fVolume = v; return *this; }
|
||||
|
||||
plMovieMsg& AddCallback(plMessage* msg) { hsRefCnt_SafeRef(msg); fCallbacks.Append(msg); return *this; }
|
||||
uint32_t GetNumCallbacks() const { return fCallbacks.GetCount(); }
|
||||
|
@ -56,7 +56,7 @@ class plParticleUpdateMsg : public plMessage
|
||||
public:
|
||||
plParticleUpdateMsg()
|
||||
: plMessage(nil, nil, nil) {}
|
||||
plParticleUpdateMsg(const plKey &s, const plKey &r, const double* t, uint32_t paramID, hsScalar paramValue )
|
||||
plParticleUpdateMsg(const plKey &s, const plKey &r, const double* t, uint32_t paramID, float paramValue )
|
||||
: plMessage(s, r, t) { fParamID = paramID; fParamValue = paramValue; }
|
||||
virtual ~plParticleUpdateMsg() {}
|
||||
|
||||
@ -86,10 +86,10 @@ public:
|
||||
};
|
||||
|
||||
uint32_t fParamID;
|
||||
hsScalar fParamValue;
|
||||
float fParamValue;
|
||||
|
||||
uint32_t GetParamID() { return fParamID; }
|
||||
hsScalar GetParamValue() { return fParamValue; }
|
||||
float GetParamValue() { return fParamValue; }
|
||||
|
||||
// IO
|
||||
virtual void Read(hsStream* stream, hsResMgr* mgr)
|
||||
@ -155,8 +155,8 @@ public:
|
||||
class plParticleKillMsg : public plMessage
|
||||
{
|
||||
public:
|
||||
hsScalar fNumToKill;
|
||||
hsScalar fTimeLeft;
|
||||
float fNumToKill;
|
||||
float fTimeLeft;
|
||||
|
||||
uint8_t fFlags;
|
||||
enum
|
||||
@ -166,7 +166,7 @@ public:
|
||||
};
|
||||
|
||||
plParticleKillMsg() : plMessage(nil, nil, nil), fNumToKill(0.f), fTimeLeft(0.f), fFlags(kParticleKillImmortalOnly) {}
|
||||
plParticleKillMsg(const plKey &s, const plKey &r, const double* t, hsScalar numToKill, hsScalar timeLeft, uint8_t flags = kParticleKillImmortalOnly )
|
||||
plParticleKillMsg(const plKey &s, const plKey &r, const double* t, float numToKill, float timeLeft, uint8_t flags = kParticleKillImmortalOnly )
|
||||
: plMessage(s, r, t) { fNumToKill = numToKill; fTimeLeft = timeLeft; fFlags = flags; }
|
||||
virtual ~plParticleKillMsg() {}
|
||||
|
||||
@ -196,7 +196,7 @@ public:
|
||||
class plParticleFlockMsg : public plMessage
|
||||
{
|
||||
public:
|
||||
hsScalar fX, fY, fZ;
|
||||
float fX, fY, fZ;
|
||||
uint8_t fCmd;
|
||||
enum
|
||||
{
|
||||
@ -205,7 +205,7 @@ public:
|
||||
};
|
||||
|
||||
plParticleFlockMsg() : plMessage(nil, nil, nil), fCmd(0), fX(0.f), fY(0.f), fZ(0.f) {}
|
||||
plParticleFlockMsg(const plKey &s, const plKey &r, const double* t, uint8_t cmd, hsScalar x, hsScalar y, hsScalar z)
|
||||
plParticleFlockMsg(const plKey &s, const plKey &r, const double* t, uint8_t cmd, float x, float y, float z)
|
||||
: plMessage(s, r, t), fCmd(cmd), fX(x), fY(y), fZ(z) {}
|
||||
virtual ~plParticleFlockMsg() {}
|
||||
|
||||
|
@ -59,7 +59,7 @@ public:
|
||||
GETINTERFACE_ANY( plTimerCallbackMsg, plMessage );
|
||||
|
||||
uint32_t fID;
|
||||
hsScalar fTime;
|
||||
float fTime;
|
||||
|
||||
virtual void Read(hsStream* stream, hsResMgr* mgr)
|
||||
{
|
||||
|
@ -52,7 +52,7 @@ class plTransitionMsg : public plMessageWithCallbacks
|
||||
protected:
|
||||
|
||||
uint32_t fEffect;
|
||||
hsScalar fLengthInSecs;
|
||||
float fLengthInSecs;
|
||||
hsBool fHoldUntilNext;
|
||||
public:
|
||||
enum
|
||||
@ -64,7 +64,7 @@ public:
|
||||
};
|
||||
|
||||
plTransitionMsg() : plMessageWithCallbacks(nil, nil, nil), fEffect( 0 ) { SetBCastFlag(kBCastByExactType); }
|
||||
plTransitionMsg( uint32_t type, hsScalar lengthInSecs, hsBool holdUntilNext = false ) :
|
||||
plTransitionMsg( uint32_t type, float lengthInSecs, hsBool holdUntilNext = false ) :
|
||||
plMessageWithCallbacks(nil, nil, nil), fEffect( type ), fLengthInSecs( lengthInSecs ), fHoldUntilNext( holdUntilNext )
|
||||
{ SetBCastFlag( kBCastByExactType ); }
|
||||
|
||||
@ -74,7 +74,7 @@ public:
|
||||
GETINTERFACE_ANY( plTransitionMsg, plMessageWithCallbacks );
|
||||
|
||||
uint32_t GetEffect( void ) const { return fEffect; }
|
||||
hsScalar GetLengthInSecs( void ) const { return fLengthInSecs; }
|
||||
float GetLengthInSecs( void ) const { return fLengthInSecs; }
|
||||
hsBool GetHoldState( void ) const { return fHoldUntilNext; }
|
||||
|
||||
virtual void Read(hsStream* s, hsResMgr* mgr)
|
||||
|
Reference in New Issue
Block a user