From 7a8f46b19f6bd89506fb1bb2858e499177c1cb82 Mon Sep 17 00:00:00 2001 From: cpusci Date: Sun, 4 Aug 2013 16:58:59 -0500 Subject: [PATCH] Update for float, double and unsigned char, unsigned short, short, etc. char was left alone: read why here http://msdn.microsoft.com/en-us/library/cc953fe1.aspx --- Engine/source/T3D/camera.cpp | 2 +- Engine/source/T3D/fx/particle.cpp | 10 +++++----- Engine/source/T3D/fx/particleEmitter.cpp | 6 +++--- Engine/source/T3D/projectile.h | 4 ++-- Engine/source/T3D/shapeImage.cpp | 2 +- Engine/source/core/util/tSignal.cpp | 2 +- Engine/source/environment/waterPlane.cpp | 2 +- .../source/forest/editor/forestBrushTool.cpp | 2 +- Engine/source/forest/editor/forestBrushTool.h | 2 +- Engine/source/gfx/gfxDevice.cpp | 2 +- Engine/source/gfx/util/triListOpt.cpp | 4 ++-- Engine/source/gui/3d/guiTSControl.cpp | 2 +- Engine/source/gui/controls/guiBitmapCtrl.cpp | 4 ++-- Engine/source/gui/editor/guiGraphCtrl.cpp | 2 +- .../gui/game/guiIdleCamFadeBitmapCtrl.cpp | 4 ++-- .../source/lighting/common/projectedShadow.cpp | 4 ++-- .../source/lighting/common/projectedShadow.h | 4 ++-- .../materials/processedShaderMaterial.cpp | 2 +- Engine/source/math/mMathAltivec.cpp | 6 +++--- Engine/source/math/mMathFn.h | 2 +- Engine/source/math/mQuat.cpp | 6 +++--- Engine/source/platform/input/event.cpp | 2 +- Engine/source/platform/input/event.h | 2 +- Engine/source/platform/platform.h | 2 +- Engine/source/platform/types.h | 8 ++++---- .../source/platformWin32/winDInputDevice.cpp | 6 +++--- Engine/source/platformWin32/winDInputDevice.h | 2 +- Engine/source/platformWin32/winDirectInput.cpp | 6 +++--- Engine/source/platformWin32/winDirectInput.h | 6 +++--- Engine/source/scene/reflector.cpp | 2 +- Engine/source/ts/collada/colladaUtils.cpp | 18 +++++++++--------- Engine/source/ts/collada/colladaUtils.h | 2 +- Engine/source/ts/loader/tsShapeLoader.cpp | 6 +++--- Engine/source/ts/loader/tsShapeLoader.h | 6 +++--- Engine/source/ts/tsLastDetail.h | 6 +++--- Engine/source/util/fpsTracker.cpp | 2 +- 36 files changed, 75 insertions(+), 75 deletions(-) diff --git a/Engine/source/T3D/camera.cpp b/Engine/source/T3D/camera.cpp index 0ba19ea29..a4ea95aa0 100644 --- a/Engine/source/T3D/camera.cpp +++ b/Engine/source/T3D/camera.cpp @@ -1546,7 +1546,7 @@ void Camera::_validateEyePoint(F32 pos, MatrixF *mat) float dot = mDot(dir, collision.normal); if (dot > 0.01f) { - float colDist = mDot(startPos - collision.point, dir) - (1 / dot) * CameraRadius; + F32 colDist = mDot(startPos - collision.point, dir) - (1 / dot) * CameraRadius; if (colDist > pos) colDist = pos; if (colDist < 0.0f) diff --git a/Engine/source/T3D/fx/particle.cpp b/Engine/source/T3D/fx/particle.cpp index 0f4d36cff..5b794748e 100644 --- a/Engine/source/T3D/fx/particle.cpp +++ b/Engine/source/T3D/fx/particle.cpp @@ -66,11 +66,11 @@ ConsoleDocClass( ParticleData, "@see ParticleEmitterNode\n" ); -static const float sgDefaultWindCoefficient = 0.0f; -static const float sgDefaultConstantAcceleration = 0.f; -static const float sgDefaultSpinSpeed = 1.f; -static const float sgDefaultSpinRandomMin = 0.f; -static const float sgDefaultSpinRandomMax = 0.f; +static const F32 sgDefaultWindCoefficient = 0.0f; +static const F32 sgDefaultConstantAcceleration = 0.f; +static const F32 sgDefaultSpinSpeed = 1.f; +static const F32 sgDefaultSpinRandomMin = 0.f; +static const F32 sgDefaultSpinRandomMax = 0.f; //----------------------------------------------------------------------------- diff --git a/Engine/source/T3D/fx/particleEmitter.cpp b/Engine/source/T3D/fx/particleEmitter.cpp index 598037233..642f80a1e 100644 --- a/Engine/source/T3D/fx/particleEmitter.cpp +++ b/Engine/source/T3D/fx/particleEmitter.cpp @@ -100,9 +100,9 @@ ConsoleDocClass( ParticleEmitterData, "@see ParticleEmitterNode\n" ); -static const float sgDefaultEjectionOffset = 0.f; -static const float sgDefaultPhiReferenceVel = 0.f; -static const float sgDefaultPhiVariance = 360.f; +static const F32 sgDefaultEjectionOffset = 0.f; +static const F32 sgDefaultPhiReferenceVel = 0.f; +static const F32 sgDefaultPhiVariance = 360.f; //----------------------------------------------------------------------------- // ParticleEmitterData diff --git a/Engine/source/T3D/projectile.h b/Engine/source/T3D/projectile.h index fa7c9ffbf..17c90cfbc 100644 --- a/Engine/source/T3D/projectile.h +++ b/Engine/source/T3D/projectile.h @@ -215,9 +215,9 @@ public: void updateSound(); - virtual bool calculateImpact( float simTime, + virtual bool calculateImpact( F32 simTime, Point3F &pointOfImpact, - float &impactTime ); + F32 &impactTime ); void setInitialPosition( const Point3F& pos ); void setInitialVelocity( const Point3F& vel ); diff --git a/Engine/source/T3D/shapeImage.cpp b/Engine/source/T3D/shapeImage.cpp index ee9eae312..509b31f0f 100644 --- a/Engine/source/T3D/shapeImage.cpp +++ b/Engine/source/T3D/shapeImage.cpp @@ -3061,7 +3061,7 @@ TICKAGAIN: if (image.spinThread[i]) { - float timeScale; + F32 timeScale; switch (stateData.spin) { diff --git a/Engine/source/core/util/tSignal.cpp b/Engine/source/core/util/tSignal.cpp index 8bc5e8164..30980a715 100644 --- a/Engine/source/core/util/tSignal.cpp +++ b/Engine/source/core/util/tSignal.cpp @@ -24,7 +24,7 @@ #include "core/util/tSignal.h" -void SignalBase::DelegateLink::insert(DelegateLink* node, float order) +void SignalBase::DelegateLink::insert(DelegateLink* node, F32 order) { // Note: can only legitimately be called on list head DelegateLink * walk = next; diff --git a/Engine/source/environment/waterPlane.cpp b/Engine/source/environment/waterPlane.cpp index c0158a61f..2b66f4f73 100644 --- a/Engine/source/environment/waterPlane.cpp +++ b/Engine/source/environment/waterPlane.cpp @@ -163,7 +163,7 @@ void WaterPlane::unpackUpdate(NetConnection* con, BitStream* stream) if( stream->readFlag() ) // UpdateMask { - float posZ; + F32 posZ; stream->read( &posZ ); Point3F newPos = getPosition(); newPos.z = posZ; diff --git a/Engine/source/forest/editor/forestBrushTool.cpp b/Engine/source/forest/editor/forestBrushTool.cpp index a32e28ed7..4dd1734df 100644 --- a/Engine/source/forest/editor/forestBrushTool.cpp +++ b/Engine/source/forest/editor/forestBrushTool.cpp @@ -650,7 +650,7 @@ void ForestBrushTool::_collectElements() } } -bool ForestBrushTool::getGroundAt( const Point3F &worldPt, float *zValueOut, VectorF *normalOut ) +bool ForestBrushTool::getGroundAt( const Point3F &worldPt, F32 *zValueOut, VectorF *normalOut ) { const U32 mask = TerrainObjectType | StaticShapeObjectType; diff --git a/Engine/source/forest/editor/forestBrushTool.h b/Engine/source/forest/editor/forestBrushTool.h index 510146ff4..0debad616 100644 --- a/Engine/source/forest/editor/forestBrushTool.h +++ b/Engine/source/forest/editor/forestBrushTool.h @@ -82,7 +82,7 @@ public: void setPressure( F32 val ); void setHardness( F32 val ); void collectElements() { _collectElements(); } - bool getGroundAt( const Point3F &worldPt, float *zValueOut, VectorF *normalOut ); + bool getGroundAt( const Point3F &worldPt, F32 *zValueOut, VectorF *normalOut ); protected: diff --git a/Engine/source/gfx/gfxDevice.cpp b/Engine/source/gfx/gfxDevice.cpp index d478da5cd..5d7d6f8c7 100644 --- a/Engine/source/gfx/gfxDevice.cpp +++ b/Engine/source/gfx/gfxDevice.cpp @@ -1260,7 +1260,7 @@ DefineEngineFunction( getPixelShaderVersion, F32, (),, return GFX->getPixelShaderVersion(); } -DefineEngineFunction( setPixelShaderVersion, void, ( float version ),, +DefineEngineFunction( setPixelShaderVersion, void, ( F32 version ),, "@brief Sets the pixel shader version for the active device.\n" "This can be used to force a lower pixel shader version than is supported by " "the device for testing or performance optimization.\n" diff --git a/Engine/source/gfx/util/triListOpt.cpp b/Engine/source/gfx/util/triListOpt.cpp index 2628d2941..95c8fd65e 100644 --- a/Engine/source/gfx/util/triListOpt.cpp +++ b/Engine/source/gfx/util/triListOpt.cpp @@ -378,7 +378,7 @@ F32 score(const VertData &vertexData) AssertFatal(vertexData.cachePosition < MaxSizeVertexCache, "Out of range cache position for vertex"); // Points for being high in the cache. - const float Scaler = 1.0f / (MaxSizeVertexCache - 3); + const F32 Scaler = 1.0f / (MaxSizeVertexCache - 3); Score = 1.0f - (vertexData.cachePosition - 3) * Scaler; Score = mPow(Score, FindVertexScore::CacheDecayPower); } @@ -387,7 +387,7 @@ F32 score(const VertData &vertexData) // Bonus points for having a low number of tris still to // use the vert, so we get rid of lone verts quickly. - float ValenceBoost = mPow(vertexData.numUnaddedReferences, -FindVertexScore::ValenceBoostPower); + F32 ValenceBoost = mPow(vertexData.numUnaddedReferences, -FindVertexScore::ValenceBoostPower); Score += FindVertexScore::ValenceBoostScale * ValenceBoost; return Score; diff --git a/Engine/source/gui/3d/guiTSControl.cpp b/Engine/source/gui/3d/guiTSControl.cpp index 95dc960c3..e7db0d30a 100644 --- a/Engine/source/gui/3d/guiTSControl.cpp +++ b/Engine/source/gui/3d/guiTSControl.cpp @@ -539,7 +539,7 @@ DefineEngineMethod( GuiTSCtrl, getWorldToScreenScale, Point2F, (),, //----------------------------------------------------------------------------- -DefineEngineMethod( GuiTSCtrl, calculateViewDistance, float, ( float radius ),, +DefineEngineMethod( GuiTSCtrl, calculateViewDistance, F32, ( F32 radius ),, "Given the camera's current FOV, get the distance from the camera's viewpoint at which the given radius will fit in the render area.\n" "@param radius Radius in world-space units which should fit in the view.\n" "@return The distance from the viewpoint at which the given radius would be fully visible." ) diff --git a/Engine/source/gui/controls/guiBitmapCtrl.cpp b/Engine/source/gui/controls/guiBitmapCtrl.cpp index e59b5e0e6..e95263701 100644 --- a/Engine/source/gui/controls/guiBitmapCtrl.cpp +++ b/Engine/source/gui/controls/guiBitmapCtrl.cpp @@ -178,8 +178,8 @@ void GuiBitmapCtrl::onRender(Point2I offset, const RectI &updateRect) GFXTextureObject* texture = mTextureObject; RectI srcRegion; RectI dstRegion; - float xdone = ((float)getExtent().x/(float)texture->mBitmapSize.x)+1; - float ydone = ((float)getExtent().y/(float)texture->mBitmapSize.y)+1; + F32 xdone = ((F32)getExtent().x/(F32)texture->mBitmapSize.x)+1; + F32 ydone = ((F32)getExtent().y/(F32)texture->mBitmapSize.y)+1; S32 xshift = mStartPoint.x%texture->mBitmapSize.x; S32 yshift = mStartPoint.y%texture->mBitmapSize.y; diff --git a/Engine/source/gui/editor/guiGraphCtrl.cpp b/Engine/source/gui/editor/guiGraphCtrl.cpp index eccd6ed27..e00998b0b 100644 --- a/Engine/source/gui/editor/guiGraphCtrl.cpp +++ b/Engine/source/gui/editor/guiGraphCtrl.cpp @@ -274,7 +274,7 @@ void GuiGraphCtrl::addDatum(S32 plotID, F32 v) //----------------------------------------------------------------------------- -float GuiGraphCtrl::getDatum( S32 plotID, S32 sample) +F32 GuiGraphCtrl::getDatum( S32 plotID, S32 sample) { AssertFatal(plotID > -1 && plotID < MaxPlots, "Invalid plot specified!"); AssertFatal(sample > -1 && sample < MaxDataPoints, "Invalid sample specified!"); diff --git a/Engine/source/gui/game/guiIdleCamFadeBitmapCtrl.cpp b/Engine/source/gui/game/guiIdleCamFadeBitmapCtrl.cpp index 899bc9d7d..d648a4177 100644 --- a/Engine/source/gui/game/guiIdleCamFadeBitmapCtrl.cpp +++ b/Engine/source/gui/game/guiIdleCamFadeBitmapCtrl.cpp @@ -123,8 +123,8 @@ public: GFXTextureObject* texture = mTextureObject; RectI srcRegion; RectI dstRegion; - float xdone = ((float)getExtent().x/(float)texture->mBitmapSize.x)+1; - float ydone = ((float)getExtent().y/(float)texture->mBitmapSize.y)+1; + F32 xdone = ((F32)getExtent().x/(F32)texture->mBitmapSize.x)+1; + F32 ydone = ((F32)getExtent().y/(F32)texture->mBitmapSize.y)+1; S32 xshift = mStartPoint.x%texture->mBitmapSize.x; S32 yshift = mStartPoint.y%texture->mBitmapSize.y; diff --git a/Engine/source/lighting/common/projectedShadow.cpp b/Engine/source/lighting/common/projectedShadow.cpp index de3a31f8f..73da76b1c 100644 --- a/Engine/source/lighting/common/projectedShadow.cpp +++ b/Engine/source/lighting/common/projectedShadow.cpp @@ -53,8 +53,8 @@ SimObjectPtr ProjectedShadow::smRenderPass = NULL; SimObjectPtr ProjectedShadow::smShadowFilter = NULL; F32 ProjectedShadow::smDepthAdjust = 10.0f; -float ProjectedShadow::smFadeStartPixelSize = 200.0f; -float ProjectedShadow::smFadeEndPixelSize = 35.0f; +F32 ProjectedShadow::smFadeStartPixelSize = 200.0f; +F32 ProjectedShadow::smFadeEndPixelSize = 35.0f; GFX_ImplementTextureProfile( BLProjectedShadowProfile, diff --git a/Engine/source/lighting/common/projectedShadow.h b/Engine/source/lighting/common/projectedShadow.h index 7b519f3ab..e43501a8d 100644 --- a/Engine/source/lighting/common/projectedShadow.h +++ b/Engine/source/lighting/common/projectedShadow.h @@ -109,8 +109,8 @@ protected: public: /// @see DecalData - static float smFadeStartPixelSize; - static float smFadeEndPixelSize; + static F32 smFadeStartPixelSize; + static F32 smFadeEndPixelSize; ProjectedShadow( SceneObject *object ); virtual ~ProjectedShadow(); diff --git a/Engine/source/materials/processedShaderMaterial.cpp b/Engine/source/materials/processedShaderMaterial.cpp index db6e70803..acde6c949 100644 --- a/Engine/source/materials/processedShaderMaterial.cpp +++ b/Engine/source/materials/processedShaderMaterial.cpp @@ -284,7 +284,7 @@ void ProcessedShaderMaterial::_determineFeatures( U32 stageNum, { PROFILE_SCOPE( ProcessedShaderMaterial_DetermineFeatures ); - const float shaderVersion = GFX->getPixelShaderVersion(); + const F32 shaderVersion = GFX->getPixelShaderVersion(); AssertFatal(shaderVersion > 0.0 , "Cannot create a shader material if we don't support shaders"); bool lastStage = stageNum == (mMaxStages-1); diff --git a/Engine/source/math/mMathAltivec.cpp b/Engine/source/math/mMathAltivec.cpp index 6bdc9d752..c056a6449 100644 --- a/Engine/source/math/mMathAltivec.cpp +++ b/Engine/source/math/mMathAltivec.cpp @@ -38,9 +38,9 @@ /// because we get a much better speed gain if we can assume the data is aligned. void vec_MatrixF_x_MatrixF(const F32 *matA, const F32 *matB, F32 *result) { - vector float A[4][1]; - vector float B[4][1]; - vector float C[4][1]; + vector F32 A[4][1]; + vector F32 B[4][1]; + vector F32 C[4][1]; /// If the incoming pointers are not 16-byte aligned, we have to load & store the slow way. if((int)matA & 0xF || (int)matB & 0xF || (int)result & 0xF) diff --git a/Engine/source/math/mMathFn.h b/Engine/source/math/mMathFn.h index cdeb4b4f5..6b41cfa89 100644 --- a/Engine/source/math/mMathFn.h +++ b/Engine/source/math/mMathFn.h @@ -442,7 +442,7 @@ inline bool mIsNaN_F( const F32 x ) inline bool mIsInf_F( const F32 x ) { - return ( x == std::numeric_limits< float >::infinity() ); + return ( x == std::numeric_limits< F32 >::infinity() ); } inline F32 mSign( const F32 n ) diff --git a/Engine/source/math/mQuat.cpp b/Engine/source/math/mQuat.cpp index 78c9fb100..c78252bc2 100644 --- a/Engine/source/math/mQuat.cpp +++ b/Engine/source/math/mQuat.cpp @@ -262,12 +262,12 @@ QuatF & QuatF::interpolate( const QuatF & q1, const QuatF & q2, F32 t ) //----------------------------------- // calculate interpolating coeffs: - double scale1, scale2; + F64 scale1, scale2; if ( (1.0 - cosOmega) > 0.00001 ) { // standard case - double omega = mAcos(cosOmega); - double sinOmega = mSin(omega); + F64 omega = mAcos(cosOmega); + F64 sinOmega = mSin(omega); scale1 = mSin((1.0 - t) * omega) / sinOmega; scale2 = sign2 * mSin(t * omega) / sinOmega; } diff --git a/Engine/source/platform/input/event.cpp b/Engine/source/platform/input/event.cpp index 254aca29d..f5bc04dbb 100644 --- a/Engine/source/platform/input/event.cpp +++ b/Engine/source/platform/input/event.cpp @@ -500,7 +500,7 @@ void InputEventManager::buildInputEvent(U32 deviceType, U32 deviceInst, InputEve newEvent.postToSignal(Input::smInputEvent); } -void InputEventManager::buildInputEvent(U32 deviceType, U32 deviceInst, InputEventType objType, InputObjectInstances objInst, InputActionType action, float fValue) +void InputEventManager::buildInputEvent(U32 deviceType, U32 deviceInst, InputEventType objType, InputObjectInstances objInst, InputActionType action, F32 fValue) { InputEventInfo newEvent; diff --git a/Engine/source/platform/input/event.h b/Engine/source/platform/input/event.h index 965dc0ac6..916d1910f 100644 --- a/Engine/source/platform/input/event.h +++ b/Engine/source/platform/input/event.h @@ -496,7 +496,7 @@ public: void buildInputEvent(U32 deviceType, U32 deviceInst, InputEventType objType, InputObjectInstances objInst, InputActionType action, S32 iValue); /// Build an input event based on a single fValue - void buildInputEvent(U32 deviceType, U32 deviceInst, InputEventType objType, InputObjectInstances objInst, InputActionType action, float fValue); + void buildInputEvent(U32 deviceType, U32 deviceInst, InputEventType objType, InputObjectInstances objInst, InputActionType action, F32 fValue); /// Build an input event based on a Point3F void buildInputEvent(U32 deviceType, U32 deviceInst, InputEventType objType, InputObjectInstances objInst, InputActionType action, Point3F& pValue); diff --git a/Engine/source/platform/platform.h b/Engine/source/platform/platform.h index 17cf828f2..3b5a57358 100644 --- a/Engine/source/platform/platform.h +++ b/Engine/source/platform/platform.h @@ -212,7 +212,7 @@ namespace Platform void debugBreak(); // Random - float getRandom(); + F32 getRandom(); // Window state void setWindowLocked(bool locked); diff --git a/Engine/source/platform/types.h b/Engine/source/platform/types.h index c53bd87fc..48fb561fb 100644 --- a/Engine/source/platform/types.h +++ b/Engine/source/platform/types.h @@ -218,13 +218,13 @@ inline S8 getMin(S8 a, S8 b) } /// Returns the lesser of the two parameters: a & b. -inline float getMin(float a, float b) +inline F32 getMin(F32 a, F32 b) { return a>b ? b : a; } /// Returns the lesser of the two parameters: a & b. -inline double getMin(double a, double b) +inline F64 getMin(F64 a, F64 b) { return a>b ? b : a; } @@ -266,13 +266,13 @@ inline S8 getMax(S8 a, S8 b) } /// Returns the greater of the two parameters: a & b. -inline float getMax(float a, float b) +inline F32 getMax(F32 a, F32 b) { return a>b ? a : b; } /// Returns the greater of the two parameters: a & b. -inline double getMax(double a, double b) +inline F64 getMax(F64 a, F64 b) { return a>b ? a : b; } diff --git a/Engine/source/platformWin32/winDInputDevice.cpp b/Engine/source/platformWin32/winDInputDevice.cpp index 759a34643..8d036352f 100644 --- a/Engine/source/platformWin32/winDInputDevice.cpp +++ b/Engine/source/platformWin32/winDInputDevice.cpp @@ -896,8 +896,8 @@ bool DInputDevice::buildEvent( DWORD offset, S32 newData, S32 oldData ) // Scale to the range -1.0 to 1.0: if ( objInfo.mMin != DIPROPRANGE_NOMIN && objInfo.mMax != DIPROPRANGE_NOMAX ) { - float range = float( objInfo.mMax - objInfo.mMin ); - newEvent.fValue = float( ( 2 * newData ) - objInfo.mMax - objInfo.mMin ) / range; + F32 range = F32( objInfo.mMax - objInfo.mMin ); + newEvent.fValue = F32( ( 2 * newData ) - objInfo.mMax - objInfo.mMin ) / range; } else newEvent.fValue = (F32)newData; @@ -1041,7 +1041,7 @@ bool DInputDevice::buildEvent( DWORD offset, S32 newData, S32 oldData ) return true; } -void DInputDevice::rumble(float x, float y) +void DInputDevice::rumble(F32 x, F32 y) { LONG rglDirection[2] = { 0, 0 }; DICONSTANTFORCE cf = { 0 }; diff --git a/Engine/source/platformWin32/winDInputDevice.h b/Engine/source/platformWin32/winDInputDevice.h index e8cd13e66..b242df789 100644 --- a/Engine/source/platformWin32/winDInputDevice.h +++ b/Engine/source/platformWin32/winDInputDevice.h @@ -117,7 +117,7 @@ class DInputDevice : public InputDevice const char* getProductName(); // Constant Effect Force Feedback - void rumble( float x, float y ); + void rumble( F32 x, F32 y ); // Console interface functions: const char* getJoystickAxesString(); diff --git a/Engine/source/platformWin32/winDirectInput.cpp b/Engine/source/platformWin32/winDirectInput.cpp index e2feef555..fa02285b0 100644 --- a/Engine/source/platformWin32/winDirectInput.cpp +++ b/Engine/source/platformWin32/winDirectInput.cpp @@ -511,7 +511,7 @@ void DInputManager::deactivateXInput() } //------------------------------------------------------------------------------ -bool DInputManager::rumble( const char *pDeviceName, float x, float y ) +bool DInputManager::rumble( const char *pDeviceName, F32 x, F32 y ) { // Determine the device U32 deviceType; @@ -566,7 +566,7 @@ bool DInputManager::rumble( const char *pDeviceName, float x, float y ) } } -void DInputManager::buildXInputEvent( U32 deviceInst, InputEventType objType, InputObjectInstances objInst, InputActionType action, float fValue ) +void DInputManager::buildXInputEvent( U32 deviceInst, InputEventType objType, InputObjectInstances objInst, InputActionType action, F32 fValue ) { InputEventInfo newEvent; @@ -597,7 +597,7 @@ inline void DInputManager::fireXInputConnectEvent( S32 controllerID, bool condit } } -inline void DInputManager::fireXInputMoveEvent( S32 controllerID, bool condition, InputObjectInstances objInst, float fValue ) +inline void DInputManager::fireXInputMoveEvent( S32 controllerID, bool condition, InputObjectInstances objInst, F32 fValue ) { if ( mXInputStateReset || condition ) { diff --git a/Engine/source/platformWin32/winDirectInput.h b/Engine/source/platformWin32/winDirectInput.h index 7ce94ac78..d7ebd1b70 100644 --- a/Engine/source/platformWin32/winDirectInput.h +++ b/Engine/source/platformWin32/winDirectInput.h @@ -85,9 +85,9 @@ class DInputManager : public InputManager void unacquire( U8 deviceType, U8 deviceID ); // XInput worker functions - void buildXInputEvent( U32 deviceInst, InputEventType objType, InputObjectInstances objInst, InputActionType action, float fValue ); + void buildXInputEvent( U32 deviceInst, InputEventType objType, InputObjectInstances objInst, InputActionType action, F32 fValue ); void fireXInputConnectEvent( S32 controllerID, bool condition, bool connected ); - void fireXInputMoveEvent( S32 controllerID, bool condition, InputObjectInstances objInst, float fValue ); + void fireXInputMoveEvent( S32 controllerID, bool condition, InputObjectInstances objInst, F32 fValue ); void fireXInputButtonEvent( S32 controllerID, bool forceFire, S32 button, InputObjectInstances objInst ); void processXInput(); @@ -126,7 +126,7 @@ class DInputManager : public InputManager // Console interface: const char* getJoystickAxesString( U32 deviceID ); - bool rumble( const char *pDeviceName, float x, float y ); + bool rumble( const char *pDeviceName, F32 x, F32 y ); }; #endif // _H_WINDIRECTINPUT_ diff --git a/Engine/source/scene/reflector.cpp b/Engine/source/scene/reflector.cpp index df2e7f580..d9ddeeaa2 100644 --- a/Engine/source/scene/reflector.cpp +++ b/Engine/source/scene/reflector.cpp @@ -682,7 +682,7 @@ MatrixF PlaneReflector::getCameraReflection( MatrixF &camTrans ) return newTrans; } -inline float sgn(float a) +inline F32 sgn(F32 a) { if (a > 0.0F) return (1.0F); if (a < 0.0F) return (-1.0F); diff --git a/Engine/source/ts/collada/colladaUtils.cpp b/Engine/source/ts/collada/colladaUtils.cpp index e3462daf9..0c409fc95 100644 --- a/Engine/source/ts/collada/colladaUtils.cpp +++ b/Engine/source/ts/collada/colladaUtils.cpp @@ -278,9 +278,9 @@ void AnimData::parseTargetString(const char* target, S32 fullCount, const char* /// Solve the cubic spline B(s) = param for s F32 AnimData::invertParamCubic(F32 param, F32 x0, F32 x1, F32 x2, F32 x3) const { - const double INVERTPARAMCUBIC_TOL = 1.0e-09; - const double INVERTPARAMCUBIC_SMALLERTOL = 1.0e-20; - const double INVERTPARAMCUBIC_MAXIT = 100; + const F64 INVERTPARAMCUBIC_TOL = 1.0e-09; + const F64 INVERTPARAMCUBIC_SMALLERTOL = 1.0e-20; + const F64 INVERTPARAMCUBIC_MAXIT = 100; // check input value for outside range if ((param - x0) < INVERTPARAMCUBIC_SMALLERTOL) @@ -295,12 +295,12 @@ F32 AnimData::invertParamCubic(F32 param, F32 x0, F32 x1, F32 x2, F32 x3) const F32 v = 1.0f; while (iterations < INVERTPARAMCUBIC_MAXIT) { - double a = (x0 + x1)*0.5f; - double b = (x1 + x2)*0.5f; - double c = (x2 + x3)*0.5f; - double d = (a + b)*0.5f; - double e = (b + c)*0.5f; - double f = (d + e)*0.5f; + F64 a = (x0 + x1)*0.5f; + F64 b = (x1 + x2)*0.5f; + F64 c = (x2 + x3)*0.5f; + F64 d = (a + b)*0.5f; + F64 e = (b + c)*0.5f; + F64 f = (d + e)*0.5f; if (mFabs(f - param) < INVERTPARAMCUBIC_TOL) break; diff --git a/Engine/source/ts/collada/colladaUtils.h b/Engine/source/ts/collada/colladaUtils.h index 9e7870383..4cc4cf5da 100644 --- a/Engine/source/ts/collada/colladaUtils.h +++ b/Engine/source/ts/collada/colladaUtils.h @@ -671,7 +671,7 @@ template<> inline const domListOfUInts *ColladaPrimitive::getTriang template inline T convert(const char* value) { return value; } template<> inline bool convert(const char* value) { return dAtob(value); } template<> inline S32 convert(const char* value) { return dAtoi(value); } -template<> inline double convert(const char* value) { return dAtof(value); } +template<> inline F64 convert(const char* value) { return dAtof(value); } template<> inline F32 convert(const char* value) { return convert(value); } //----------------------------------------------------------------------------- diff --git a/Engine/source/ts/loader/tsShapeLoader.cpp b/Engine/source/ts/loader/tsShapeLoader.cpp index 89e22350c..a1b1b4ac4 100644 --- a/Engine/source/ts/loader/tsShapeLoader.cpp +++ b/Engine/source/ts/loader/tsShapeLoader.cpp @@ -32,9 +32,9 @@ const F32 TSShapeLoader::DefaultTime = -1.0f; -const double TSShapeLoader::MinFrameRate = 15.0f; -const double TSShapeLoader::MaxFrameRate = 60.0f; -const double TSShapeLoader::AppGroundFrameRate = 10.0f; +const F64 TSShapeLoader::MinFrameRate = 15.0f; +const F64 TSShapeLoader::MaxFrameRate = 60.0f; +const F64 TSShapeLoader::AppGroundFrameRate = 10.0f; Torque::Path TSShapeLoader::shapePath; //------------------------------------------------------------------------------ diff --git a/Engine/source/ts/loader/tsShapeLoader.h b/Engine/source/ts/loader/tsShapeLoader.h index 3741df31b..2c76ffbb2 100644 --- a/Engine/source/ts/loader/tsShapeLoader.h +++ b/Engine/source/ts/loader/tsShapeLoader.h @@ -82,9 +82,9 @@ protected: public: static const F32 DefaultTime; - static const double MinFrameRate; - static const double MaxFrameRate; - static const double AppGroundFrameRate; + static const F64 MinFrameRate; + static const F64 MaxFrameRate; + static const F64 AppGroundFrameRate; protected: // Variables used during loading that must be held until the shape is deleted diff --git a/Engine/source/ts/tsLastDetail.h b/Engine/source/ts/tsLastDetail.h index adfd6b5ac..abfb3bac1 100644 --- a/Engine/source/ts/tsLastDetail.h +++ b/Engine/source/ts/tsLastDetail.h @@ -62,12 +62,12 @@ GFXDeclareVertexFormat( ImposterState ) /// .xyz = imposter center /// .w = billboard corner... damn SM 2.0 Point3F center; - float corner; + F32 corner; /// .x = scaled half size /// .y = alpha fade out - float halfSize; - float alpha; + F32 halfSize; + F32 alpha; /// The rotation encoded as the up /// and right vectors... cross FTW. diff --git a/Engine/source/util/fpsTracker.cpp b/Engine/source/util/fpsTracker.cpp index d30c812f5..c62c3fd95 100644 --- a/Engine/source/util/fpsTracker.cpp +++ b/Engine/source/util/fpsTracker.cpp @@ -46,7 +46,7 @@ void FPSTracker::reset() void FPSTracker::update() { - const float alpha = 0.07f; + const F32 alpha = 0.07f; F32 realSeconds = (F32)Platform::getRealMilliseconds()/1000.0f; F32 virtualSeconds = (F32)Platform::getVirtualMilliseconds()/1000.0f;