From 1c26b37ef2f4571e28a95d83d923b8eed9225231 Mon Sep 17 00:00:00 2001 From: Einar Johan Trøan Sømåen Date: Mon, 25 Jun 2012 16:19:36 +0200 Subject: WINTERMUTE: Remove the DEGTORAD/RADTODEG-macros --- engines/wintermute/Base/PartEmitter.cpp | 5 +++-- engines/wintermute/dcgf.h | 2 -- 2 files changed, 3 insertions(+), 4 deletions(-) (limited to 'engines/wintermute') diff --git a/engines/wintermute/Base/PartEmitter.cpp b/engines/wintermute/Base/PartEmitter.cpp index a3c1843b82..89de02a074 100644 --- a/engines/wintermute/Base/PartEmitter.cpp +++ b/engines/wintermute/Base/PartEmitter.cpp @@ -39,6 +39,7 @@ #include "engines/wintermute/utils/utils.h" #include "engines/wintermute/PlatformSDL.h" #include "common/str.h" +#include "common/math.h" namespace WinterMute { @@ -194,7 +195,7 @@ HRESULT CPartEmitter::InitParticle(CPartParticle *Particle, uint32 CurrentTime, Vector2 VecVel(0, Velocity); Matrix4 MatRot; - MatRot.RotationZ(DegToRad(CBUtils::NormalizeAngle(Angle - 180))); + MatRot.RotationZ(Common::deg2rad(CBUtils::NormalizeAngle(Angle - 180))); MatRot.TransformVector2(VecVel); if (_alphaTimeBased) { @@ -393,7 +394,7 @@ HRESULT CPartEmitter::AddForce(const char *Name, CPartForce::TForceType Type, in Force->_direction = Vector2(0, Strength); Matrix4 MatRot; - MatRot.RotationZ(DegToRad(CBUtils::NormalizeAngle(Angle - 180))); + MatRot.RotationZ(Common::deg2rad(CBUtils::NormalizeAngle(Angle - 180))); MatRot.TransformVector2(Force->_direction); return S_OK; diff --git a/engines/wintermute/dcgf.h b/engines/wintermute/dcgf.h index 74eb7f782a..831a881a69 100644 --- a/engines/wintermute/dcgf.h +++ b/engines/wintermute/dcgf.h @@ -54,7 +54,5 @@ // macros #define RELEASE(obj) if(obj) { obj->Release(); obj = NULL; } else 0 -#define DegToRad(_val) (_val*PI*(1.0f/180.0f)) -#define RadToDeg(_val) (_val*(180/PI)) #endif // _DCGF_H_ -- cgit v1.2.3