1
0
mirror of https://foundry.openuru.org/gitblit/r/CWE-ou-minkata.git synced 2025-07-18 03:09:13 +00:00

Eliminate hsScalar and hsFixed

Modern CPUs support floats just fine... hsFixed was crazy.
This commit is contained in:
2012-01-21 02:03:37 -05:00
parent 5027b5a4ac
commit e020651e4b
584 changed files with 5401 additions and 6399 deletions

View File

@ -54,7 +54,7 @@ protected:
hsTArray<plKey> fReceivers;// Keys to notify when the anim event happens
plMessage* fCallback; // The callback setup message we send when the anim loads
virtual hsBool IEval(double secs, hsScalar del, uint32_t dirty) { return false; }
virtual hsBool IEval(double secs, float del, uint32_t dirty) { return false; }
void ISendNotify(bool triggered);
hsBool fDisabled;

View File

@ -88,7 +88,7 @@ void plAnimTimeConvertSDLModifier::ISetCurrentATC(const plStateDataRecord* atcSt
plStateDataRecord::SimpleVarsList vars;
int num=atcStateDataRec->GetUsedVars(&vars);
int j;
hsScalar lastStateAnimTime = 0;
float lastStateAnimTime = 0;
double lastStateChange = 0;
for(j=0;j<num;j++)
{

View File

@ -122,7 +122,7 @@ plAxisAnimModifier::~plAxisAnimModifier()
}
hsBool plAxisAnimModifier::IEval(double secs, hsScalar del, uint32_t dirty)
hsBool plAxisAnimModifier::IEval(double secs, float del, uint32_t dirty)
{
if (!fActive)
return true;
@ -144,7 +144,7 @@ hsBool plAxisAnimModifier::MsgReceive(plMessage* msg)
if (pCall)
{
// Send our notification to whomever cares;
hsScalar time = 0.0f;
float time = 0.0f;
if (pCall->fEvent == kEnd)
time = 1.0f;
fNotify->ClearEvents();

View File

@ -66,8 +66,8 @@ protected:
plKey fYAnim;
plKey fNotificationKey;
hsScalar fXPos;
hsScalar fYPos;
float fXPos;
float fYPos;
hsBool fActive;
hsBool fAllOrNothing;
@ -78,7 +78,7 @@ protected:
plAxisInputInterface *fInputIface;
virtual hsBool IEval(double secs, hsScalar del, uint32_t dirty);
virtual hsBool IEval(double secs, float del, uint32_t dirty);
public:
plAxisAnimModifier();

View File

@ -50,7 +50,7 @@ protected:
char* fTemplateName;
bool fExportTime;
virtual hsBool IEval(double secs, hsScalar del, uint32_t dirty) { return true; }
virtual hsBool IEval(double secs, float del, uint32_t dirty) { return true; }
public:
plCloneSpawnModifier();

View File

@ -53,9 +53,9 @@ protected:
hsTArray<plKey> fDecalMgrs;
hsScalar fWetLength;
float fWetLength;
virtual hsBool IEval(double secs, hsScalar del, uint32_t dirty) { return false; }
virtual hsBool IEval(double secs, float del, uint32_t dirty) { return false; }
public:
plDecalEnableMod();
@ -69,8 +69,8 @@ public:
virtual void Read(hsStream* stream, hsResMgr* mgr);
virtual void Write(hsStream* stream, hsResMgr* mgr);
void SetWetLength(hsScalar t) { fWetLength = t; }
hsScalar GetWetLength() const { return fWetLength; }
void SetWetLength(float t) { fWetLength = t; }
float GetWetLength() const { return fWetLength; }
void AddDecalKey(const plKey& k) { fDecalMgrs.Append(k); }
uint32_t GetNumDecalKeys() const { return fDecalMgrs.GetCount(); }

View File

@ -63,8 +63,8 @@ protected:
hsTArray<plKey> fContainedAvatars; // Avatars inside our volume
plExcludeRegionSDLModifier *fSDLModifier;
hsBool fSeek; // use smart seek or teleport?
hsScalar fSeekTime; // how long to seek for
virtual hsBool IEval(double secs, hsScalar del, uint32_t dirty) { return true; }
float fSeekTime; // how long to seek for
virtual hsBool IEval(double secs, float del, uint32_t dirty) { return true; }
void ISetPhysicalState(bool cleared);
@ -91,7 +91,7 @@ public:
void AddSafePoint(plKey& key);
void UseSmartSeek() { fSeek = true; }
void SetSeekTime(hsScalar s) { fSeekTime = s; }
void SetSeekTime(float s) { fSeekTime = s; }
void SetBlockCameras(bool block) { fFlags.SetBit(kBlockCameras, block); }
};

View File

@ -54,7 +54,7 @@ protected:
uint16_t fPlaceSndIdx;
uint16_t fHitSndIdx;
virtual hsBool IEval(double secs, hsScalar del, uint32_t dirty) { return true; }
virtual hsBool IEval(double secs, float del, uint32_t dirty) { return true; }
plKey IFindCloneKey(plKey baseKey);

View File

@ -54,7 +54,7 @@ protected:
hsTArray<plBitmap *> fImages;
virtual hsBool IEval(double secs, hsScalar del, uint32_t dirty) { return false; }
virtual hsBool IEval(double secs, float del, uint32_t dirty) { return false; }
public:
plImageLibMod();

View File

@ -52,7 +52,7 @@ class plInterfaceInfoModifier : public plSingleModifier
protected:
hsTArray<plKey> fKeyList;
virtual hsBool IEval(double secs, hsScalar del, uint32_t dirty){ return true; }
virtual hsBool IEval(double secs, float del, uint32_t dirty){ return true; }
public:
plInterfaceInfoModifier();

View File

@ -57,7 +57,7 @@ public:
kCalibrated,
};
protected:
virtual hsBool IEval(double secs, hsScalar del, uint32_t dirty) {return true;}
virtual hsBool IEval(double secs, float del, uint32_t dirty) {return true;}
int fCalibrated;
public:

View File

@ -103,7 +103,7 @@ protected:
int8_t ICmdFromWait(int8_t waitIdx);
virtual hsBool IEval(double secs, hsScalar del, uint32_t dirty) { return true; }
virtual hsBool IEval(double secs, float del, uint32_t dirty) { return true; }
static bool fDebugAnimBox; // Draws a box on screen when an animation is started
static void IDebugAnimBox(bool start);

View File

@ -60,7 +60,7 @@ protected:
virtual void IPutCurrentStateIn(plStateDataRecord* dstState) = 0;
virtual void ISetCurrentStateFrom(const plStateDataRecord* srcState) = 0;
virtual void ISentState(const plStateDataRecord* sentState) {}
hsBool IEval(double secs, hsScalar del, uint32_t dirty) {return false;}
hsBool IEval(double secs, float del, uint32_t dirty) {return false;}
virtual uint32_t IApplyModFlags(uint32_t sendFlags);

View File

@ -114,7 +114,7 @@ void plSimpleModifier::IEnd()
}
}
hsBool plSimpleModifier::IEval(double secs, hsScalar del, uint32_t dirty)
hsBool plSimpleModifier::IEval(double secs, float del, uint32_t dirty)
{
return IHandleTime(secs, del);
}
@ -180,13 +180,13 @@ hsBool plSimpleModifier::IHandleCmd(plAnimCmdMsg* modMsg)
return true;
}
hsBool plSimpleModifier::IHandleTime(double wSecs, hsScalar del)
hsBool plSimpleModifier::IHandleTime(double wSecs, float del)
{
if( !fTarget )
return true;
hsScalar secs = fTimeConvert.WorldToAnimTime(wSecs);
float secs = fTimeConvert.WorldToAnimTime(wSecs);
if( secs != fCurrentTime )
{

View File

@ -71,9 +71,9 @@ protected:
plAnimTimeConvert fTimeConvert;
// The following are in animation time.
hsScalar fCurrentTime;
float fCurrentTime;
hsBool IHandleTime(double wSecs, hsScalar del);
hsBool IHandleTime(double wSecs, float del);
hsBool IHandleRef(plRefMsg* refMsg);
virtual hsBool IHandleCmd(plAnimCmdMsg* modMsg);
@ -83,7 +83,7 @@ protected:
virtual void IBegin();
virtual void IEnd();
virtual hsBool IEval(double secs, hsScalar del, uint32_t dirty);
virtual hsBool IEval(double secs, float del, uint32_t dirty);
public:
plSimpleModifier();

View File

@ -116,7 +116,7 @@ void plSoundSDLModifier::ISetCurrentStateFrom(const plStateDataRecord* srcState)
{
//double timeStarted;
/*if (soundState->FindVar(kStrTime)->Get(&timeStarted))
sound->SynchedPlay((hsScalar)timeStarted);
sound->SynchedPlay((float)timeStarted);
else
{
// Can't get the time we're supposed to start at, so we'll just try to play normally,

View File

@ -49,7 +49,7 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
class plSpawnModifier : public plMultiModifier
{
protected:
virtual hsBool IEval(double secs, hsScalar del, uint32_t dirty) {return true;}
virtual hsBool IEval(double secs, float del, uint32_t dirty) {return true;}
public:
plSpawnModifier(){;}