aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEinar Johan Trøan Sømåen2012-07-03 06:34:48 +0200
committerEinar Johan Trøan Sømåen2012-07-03 06:34:48 +0200
commit46d2428dabb1637218b924753e9a3942d4d73b69 (patch)
tree51e21eb5a3e5a754cb62428242d5dfa8a4733af7
parent370355f85ec1ac55b7a1467899ecfbff788ec1c7 (diff)
downloadscummvm-rg350-46d2428dabb1637218b924753e9a3942d4d73b69.tar.gz
scummvm-rg350-46d2428dabb1637218b924753e9a3942d4d73b69.tar.bz2
scummvm-rg350-46d2428dabb1637218b924753e9a3942d4d73b69.zip
WINTERMUTE: Rename FuncName->funcName in Math-classes
-rw-r--r--engines/wintermute/Base/PartEmitter.cpp8
-rw-r--r--engines/wintermute/Base/PartParticle.cpp2
-rw-r--r--engines/wintermute/math/MathUtil.cpp4
-rw-r--r--engines/wintermute/math/MathUtil.h4
-rw-r--r--engines/wintermute/math/Matrix4.cpp8
-rw-r--r--engines/wintermute/math/Matrix4.h6
-rw-r--r--engines/wintermute/math/Vector2.cpp2
-rw-r--r--engines/wintermute/math/Vector2.h2
8 files changed, 18 insertions, 18 deletions
diff --git a/engines/wintermute/Base/PartEmitter.cpp b/engines/wintermute/Base/PartEmitter.cpp
index 785e8738b5..e38abb5005 100644
--- a/engines/wintermute/Base/PartEmitter.cpp
+++ b/engines/wintermute/Base/PartEmitter.cpp
@@ -195,8 +195,8 @@ HRESULT CPartEmitter::initParticle(CPartParticle *Particle, uint32 CurrentTime,
Vector2 VecVel(0, Velocity);
Matrix4 MatRot;
- MatRot.RotationZ(Common::deg2rad(CBUtils::normalizeAngle(Angle - 180)));
- MatRot.TransformVector2(VecVel);
+ MatRot.rotationZ(Common::deg2rad(CBUtils::normalizeAngle(Angle - 180)));
+ MatRot.transformVector2(VecVel);
if (_alphaTimeBased) {
Particle->_alpha1 = _alpha1;
@@ -394,8 +394,8 @@ HRESULT CPartEmitter::addForce(const char *name, CPartForce::TForceType Type, in
Force->_direction = Vector2(0, Strength);
Matrix4 MatRot;
- MatRot.RotationZ(Common::deg2rad(CBUtils::normalizeAngle(Angle - 180)));
- MatRot.TransformVector2(Force->_direction);
+ MatRot.rotationZ(Common::deg2rad(CBUtils::normalizeAngle(Angle - 180)));
+ MatRot.transformVector2(Force->_direction);
return S_OK;
}
diff --git a/engines/wintermute/Base/PartParticle.cpp b/engines/wintermute/Base/PartParticle.cpp
index 604e113b90..9c938ac835 100644
--- a/engines/wintermute/Base/PartParticle.cpp
+++ b/engines/wintermute/Base/PartParticle.cpp
@@ -151,7 +151,7 @@ HRESULT CPartParticle::update(CPartEmitter *Emitter, uint32 CurrentTime, uint32
case CPartForce::FORCE_POINT: {
Vector2 VecDist = Force->_pos - _pos;
- float Dist = fabs(VecDist.Length());
+ float Dist = fabs(VecDist.length());
Dist = 100.0f / Dist;
diff --git a/engines/wintermute/math/MathUtil.cpp b/engines/wintermute/math/MathUtil.cpp
index d6b526f5b6..47b472d9cf 100644
--- a/engines/wintermute/math/MathUtil.cpp
+++ b/engines/wintermute/math/MathUtil.cpp
@@ -32,14 +32,14 @@
namespace WinterMute {
//////////////////////////////////////////////////////////////////////////
-float MathUtil::Round(float val) {
+float MathUtil::round(float val) {
float result = floor(val);
if (val - result >= 0.5) result += 1.0;
return result;
}
//////////////////////////////////////////////////////////////////////////
-float MathUtil::RoundUp(float val) {
+float MathUtil::roundUp(float val) {
float result = floor(val);
if (val - result > 0) result += 1.0;
return result;
diff --git a/engines/wintermute/math/MathUtil.h b/engines/wintermute/math/MathUtil.h
index bacf975d62..db814a59ac 100644
--- a/engines/wintermute/math/MathUtil.h
+++ b/engines/wintermute/math/MathUtil.h
@@ -33,8 +33,8 @@ namespace WinterMute {
class MathUtil {
public:
- static float Round(float val);
- static float RoundUp(float val);
+ static float round(float val);
+ static float roundUp(float val);
};
} // end of namespace WinterMute
diff --git a/engines/wintermute/math/Matrix4.cpp b/engines/wintermute/math/Matrix4.cpp
index d9d17b613b..557f0d5c9a 100644
--- a/engines/wintermute/math/Matrix4.cpp
+++ b/engines/wintermute/math/Matrix4.cpp
@@ -47,7 +47,7 @@ Matrix4::~Matrix4() {
//////////////////////////////////////////////////////////////////////////
-void Matrix4::Identity() {
+void Matrix4::identity() {
for (int i = 0; i < 4; i++) {
for (int j = 0; j < 4; j++) {
m[i][j] = 0.0f;
@@ -61,8 +61,8 @@ void Matrix4::Identity() {
}
//////////////////////////////////////////////////////////////////////////
-void Matrix4::RotationZ(float angle) {
- Identity();
+void Matrix4::rotationZ(float angle) {
+ identity();
m[0][0] = cos(angle);
m[1][1] = cos(angle);
@@ -71,7 +71,7 @@ void Matrix4::RotationZ(float angle) {
}
//////////////////////////////////////////////////////////////////////////
-void Matrix4::TransformVector2(Vector2 &vec) {
+void Matrix4::transformVector2(Vector2 &vec) {
float norm;
norm = m[0][3] * vec.x + m[1][3] * vec.y + m[3][3];
diff --git a/engines/wintermute/math/Matrix4.h b/engines/wintermute/math/Matrix4.h
index da5fd1393a..5def8dfe97 100644
--- a/engines/wintermute/math/Matrix4.h
+++ b/engines/wintermute/math/Matrix4.h
@@ -38,9 +38,9 @@ public:
Matrix4();
~Matrix4();
- void Identity();
- void RotationZ(float angle);
- void TransformVector2(Vector2 &vec);
+ void identity();
+ void rotationZ(float angle);
+ void transformVector2(Vector2 &vec);
/* union {
struct {
diff --git a/engines/wintermute/math/Vector2.cpp b/engines/wintermute/math/Vector2.cpp
index a72fb51e79..8bd10320a8 100644
--- a/engines/wintermute/math/Vector2.cpp
+++ b/engines/wintermute/math/Vector2.cpp
@@ -48,7 +48,7 @@ Vector2::~Vector2() {
//////////////////////////////////////////////////////////////////////////
-float Vector2::Length() const {
+float Vector2::length() const {
return (float)sqrt(x * x + y * y);
}
diff --git a/engines/wintermute/math/Vector2.h b/engines/wintermute/math/Vector2.h
index aa3fe5aa86..96d3a3827d 100644
--- a/engines/wintermute/math/Vector2.h
+++ b/engines/wintermute/math/Vector2.h
@@ -37,7 +37,7 @@ public:
Vector2(float x, float y);
~Vector2();
- float Length() const;
+ float length() const;
inline Vector2 &operator= (const Vector2 &other) {
x = other.x;