mirror of
https://foundry.openuru.org/gitblit/r/CWE-ou-minkata.git
synced 2025-07-21 12:49:10 +00:00
Eliminate hsScalar and hsFixed
Modern CPUs support floats just fine... hsFixed was crazy.
This commit is contained in:
@ -176,10 +176,10 @@ hsBool plDynaRippleVSMgr::IRippleFromShape(const plPrintShape* shape, hsBool for
|
||||
|
||||
const hsMatrix44& shapeL2W = shape->GetOwner()->GetLocalToWorld();
|
||||
|
||||
plConst(hsScalar) kMinDist(2.0f);
|
||||
plConst(hsScalar) kMinTime(1.5f);
|
||||
plConst(float) kMinDist(2.0f);
|
||||
plConst(float) kMinTime(1.5f);
|
||||
double t = hsTimer::GetSysSeconds();
|
||||
hsScalar dt = hsScalar(t - info.fLastTime) * sRand.RandZeroToOne();
|
||||
float dt = float(t - info.fLastTime) * sRand.RandZeroToOne();
|
||||
hsBool longEnough = (dt >= kMinTime);
|
||||
hsPoint3 xlate = shapeL2W.GetTranslate();
|
||||
hsBool farEnough = (hsVector3(&info.fLastPos, &xlate).Magnitude() > kMinDist);
|
||||
@ -193,18 +193,18 @@ hsBool plDynaRippleVSMgr::IRippleFromShape(const plPrintShape* shape, hsBool for
|
||||
randPert.Normalize();
|
||||
if( !farEnough )
|
||||
{
|
||||
plConst(hsScalar) kRandPert = 0.5f;
|
||||
plConst(float) kRandPert = 0.5f;
|
||||
randPert *= kRandPert;
|
||||
}
|
||||
else
|
||||
{
|
||||
plConst(hsScalar) kRandPert = 0.15f;
|
||||
plConst(float) kRandPert = 0.15f;
|
||||
randPert *= kRandPert;
|
||||
}
|
||||
pos += randPert;
|
||||
|
||||
// Are we potentially touching the water?
|
||||
hsScalar waterHeight = fWaveSetBase->GetHeight();
|
||||
float waterHeight = fWaveSetBase->GetHeight();
|
||||
if( (pos.fZ - fScale.fZ * shape->GetHeight() < waterHeight)
|
||||
&&(pos.fZ + fScale.fZ * shape->GetHeight() > waterHeight) )
|
||||
{
|
||||
@ -212,9 +212,9 @@ hsBool plDynaRippleVSMgr::IRippleFromShape(const plPrintShape* shape, hsBool for
|
||||
hsVector3 dir(fWaveSetBase->GetWindDir());
|
||||
hsVector3 up(0.f, 0.f, 1.f);
|
||||
|
||||
hsScalar wid = hsMaximum(shape->GetWidth(), shape->GetLength());
|
||||
float wid = hsMaximum(shape->GetWidth(), shape->GetLength());
|
||||
|
||||
plConst(hsScalar) kMaxWaterDepth(1000.f);
|
||||
plConst(float) kMaxWaterDepth(1000.f);
|
||||
|
||||
hsVector3 size(wid * fScale.fX, wid * fScale.fY, kMaxWaterDepth);
|
||||
fCutter->SetLength(size);
|
||||
|
Reference in New Issue
Block a user