[Scummvm-git-logs] scummvm master -> c4134a9e92125c6bf31aa76621944288f4dd3f48
dreammaster
dreammaster at scummvm.org
Sun May 21 02:46:08 CEST 2017
This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .
Summary:
c4134a9e92 TITANIC: Method renamings in star control camera classes
Commit: c4134a9e92125c6bf31aa76621944288f4dd3f48
https://github.com/scummvm/scummvm/commit/c4134a9e92125c6bf31aa76621944288f4dd3f48
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2017-05-20T20:45:56-04:00
Commit Message:
TITANIC: Method renamings in star control camera classes
Changed paths:
engines/titanic/star_control/camera_mover.h
engines/titanic/star_control/star_control_sub21.cpp
engines/titanic/star_control/star_control_sub21.h
engines/titanic/star_control/star_control_sub23.cpp
engines/titanic/star_control/star_control_sub23.h
engines/titanic/star_control/star_control_sub24.cpp
engines/titanic/star_control/star_control_sub24.h
engines/titanic/star_control/star_control_sub25.cpp
engines/titanic/star_control/star_control_sub25.h
diff --git a/engines/titanic/star_control/camera_mover.h b/engines/titanic/star_control/camera_mover.h
index c3528f8..b9c3362 100644
--- a/engines/titanic/star_control/camera_mover.h
+++ b/engines/titanic/star_control/camera_mover.h
@@ -78,7 +78,7 @@ public:
/**
* Start a movement to a given specified destination
*/
- virtual void moveTo(const FVector &srcV, const FVector &destV, const FMatrix &srcM) {}
+ virtual void moveTo(const FVector &srcV, const FVector &destV, const FMatrix &orientation) {}
virtual void proc10(const FVector &v1, const FVector &v2, const FVector &v3, const FMatrix &m) {}
diff --git a/engines/titanic/star_control/star_control_sub21.cpp b/engines/titanic/star_control/star_control_sub21.cpp
index 26510c0..86109a1 100644
--- a/engines/titanic/star_control/star_control_sub21.cpp
+++ b/engines/titanic/star_control/star_control_sub21.cpp
@@ -32,13 +32,13 @@ CStarControlSub21::CStarControlSub21(const CNavigationInfo *src) :
CCameraMover(src) {
}
-void CStarControlSub21::moveTo(const FVector &srcV, const FVector &destV, const FMatrix &srcM) {
+void CStarControlSub21::moveTo(const FVector &srcV, const FVector &destV, const FMatrix &orientation) {
if (isLocked())
decLockCount();
debugC(DEBUG_BASIC, kDebugStarfield, "Starfield move %s to %s", srcV.toString().c_str(),
destV.toString().c_str());
- _sub24.setPath(srcV, destV, srcM);
+ _sub24.setPath(srcV, destV, orientation);
}
void CStarControlSub21::proc10(const FVector &v1, const FVector &v2, const FVector &v3, const FMatrix &m) {
diff --git a/engines/titanic/star_control/star_control_sub21.h b/engines/titanic/star_control/star_control_sub21.h
index bf1b050..ba16aa7 100644
--- a/engines/titanic/star_control/star_control_sub21.h
+++ b/engines/titanic/star_control/star_control_sub21.h
@@ -35,7 +35,7 @@ public:
CStarControlSub21(const CNavigationInfo *src);
virtual ~CStarControlSub21() {}
- virtual void moveTo(const FVector &srcV, const FVector &destV, const FMatrix &srcM);
+ virtual void moveTo(const FVector &srcV, const FVector &destV, const FMatrix &orientation);
virtual void proc10(const FVector &v1, const FVector &v2, const FVector &v3, const FMatrix &m);
/**
diff --git a/engines/titanic/star_control/star_control_sub23.cpp b/engines/titanic/star_control/star_control_sub23.cpp
index ec3ca65..b7c803d 100644
--- a/engines/titanic/star_control/star_control_sub23.cpp
+++ b/engines/titanic/star_control/star_control_sub23.cpp
@@ -66,7 +66,7 @@ void CStarControlSub23::proc3(const FMatrix &m1, const FMatrix &m2) {
_field34 = false;
}
-void CStarControlSub23::setPath(const FVector &srcV, const FVector &destV, const FMatrix &srcM) {
+void CStarControlSub23::setPath(const FVector &srcV, const FVector &destV, const FMatrix &orientation) {
_srcPos = srcV;
_destPos = destV;
_posDelta = _destPos - _srcPos;
diff --git a/engines/titanic/star_control/star_control_sub23.h b/engines/titanic/star_control/star_control_sub23.h
index 3d16031..e1e1ba0 100644
--- a/engines/titanic/star_control/star_control_sub23.h
+++ b/engines/titanic/star_control/star_control_sub23.h
@@ -56,7 +56,7 @@ public:
virtual void proc2(FVector &oldPos, FVector &newPos,
FMatrix &oldOrientation, FMatrix &newOrientation);
virtual void proc3(const FMatrix &m1, const FMatrix &m2);
- virtual void setPath(const FVector &srcV, const FVector &destV, const FMatrix &srcM);
+ virtual void setPath(const FVector &srcV, const FVector &destV, const FMatrix &orientation);
virtual int proc5(CErrorCode &errorCode, FVector &pos, FMatrix &orientation) { return 2; }
virtual void proc6(int val1, int val2, float val);
diff --git a/engines/titanic/star_control/star_control_sub24.cpp b/engines/titanic/star_control/star_control_sub24.cpp
index 6bfaef9..4873753 100644
--- a/engines/titanic/star_control/star_control_sub24.cpp
+++ b/engines/titanic/star_control/star_control_sub24.cpp
@@ -34,8 +34,8 @@ void CStarControlSub24::proc3(const FMatrix &m1, const FMatrix &m2) {
_active = true;
}
-void CStarControlSub24::setPath(const FVector &srcV, const FVector &destV, const FMatrix &srcM) {
- CStarControlSub23::setPath(srcV, destV, srcM);
+void CStarControlSub24::setPath(const FVector &srcV, const FVector &destV, const FMatrix &orientation) {
+ CStarControlSub23::setPath(srcV, destV, orientation);
if (_distance > 8000.0) {
_active = true;
@@ -43,8 +43,8 @@ void CStarControlSub24::setPath(const FVector &srcV, const FVector &destV, const
proc6(120, 4, _distance - 8000.0);
}
- FVector row3 = srcM._row3;
- double mult = _posDelta._x * row3._x + _posDelta._y * row3._y+ _posDelta._z * row3._z;
+ FVector row3 = orientation._row3;
+ double mult = _posDelta._x * row3._x + _posDelta._y * row3._y + _posDelta._z * row3._z;
_moveDelayCtr = 1.0;
bool flag = false;
@@ -71,7 +71,7 @@ void CStarControlSub24::setPath(const FVector &srcV, const FVector &destV, const
FMatrix m1;
m1.fn1(tempV1);
- _sub25.fn1(srcM, m1);
+ _sub25.fn1(orientation, m1);
_moveDelayCtr = 0.0;
_moveDelayInc = 0.1;
@@ -79,7 +79,7 @@ void CStarControlSub24::setPath(const FVector &srcV, const FVector &destV, const
}
}
-int CStarControlSub24::proc5(CErrorCode &errorCode, FVector &v, FMatrix &m) {
+int CStarControlSub24::proc5(CErrorCode &errorCode, FVector &pos, FMatrix &orientation) {
FVector v1, v2, v3, v4;
const FVector *tv;
@@ -88,7 +88,7 @@ int CStarControlSub24::proc5(CErrorCode &errorCode, FVector &v, FMatrix &m) {
if (_moveDelayCtr < 1.0) {
_moveDelayCtr += _moveDelayInc;
- _sub25.fn2(_moveDelayCtr, m);
+ _sub25.fn2(_moveDelayCtr, orientation);
errorCode.set();
return 1;
}
@@ -98,11 +98,11 @@ int CStarControlSub24::proc5(CErrorCode &errorCode, FVector &v, FMatrix &m) {
return 2;
}
- v2 = m._row3;
- v3 = _destPos - v;
+ v2 = orientation._row3;
+ v3 = _destPos - pos;
v3.normalize();
- double val = m._row3._x * v3._x + m._row3._y * v3._y + m._row3._z * v3._z;
+ double val = orientation._row3._x * v3._x + orientation._row3._y * v3._y + orientation._row3._z * v3._z;
bool flag = false;
if (val > 1.0) {
if (val >= 1.0 - 1.0e-10)
@@ -121,14 +121,14 @@ int CStarControlSub24::proc5(CErrorCode &errorCode, FVector &v, FMatrix &m) {
tv = v2.addAndNormalize(v4, v2, v1);
v1 = *tv;
- m.fn1(v1);
+ orientation.fn1(v1);
v2 = v1;
}
if (_field40 >= 0) {
double powVal = _powers[_field40];
v1 = v2 * powVal;
- v += v1;
+ pos += v1;
--_field40;
errorCode.set();
@@ -138,9 +138,9 @@ int CStarControlSub24::proc5(CErrorCode &errorCode, FVector &v, FMatrix &m) {
if (_field44 > 0) {
v1._z = v2._z * _field38;
v1._x = v2._x * _field38;
- v._x = v1._x + v._x;
- v._y = v2._y * _field38 + v._y;
- v._z = v1._z + v._z;
+ pos._x = v1._x + pos._x;
+ pos._y = v2._y * _field38 + pos._y;
+ pos._z = v1._z + pos._z;
--_field44;
errorCode.set();
@@ -152,9 +152,9 @@ int CStarControlSub24::proc5(CErrorCode &errorCode, FVector &v, FMatrix &m) {
v1._y = v2._y * powVal;
v1._z = v2._z * powVal;
v1._x = v2._x * powVal;
- v._y = v1._y + v._y;
- v._z = v1._z + v._z;
- v._x = v._x + v1._x;
+ pos._y = v1._y + pos._y;
+ pos._z = v1._z + pos._z;
+ pos._x = pos._x + v1._x;
--_field48;
errorCode.set();
diff --git a/engines/titanic/star_control/star_control_sub24.h b/engines/titanic/star_control/star_control_sub24.h
index f3d38ef..565f31e 100644
--- a/engines/titanic/star_control/star_control_sub24.h
+++ b/engines/titanic/star_control/star_control_sub24.h
@@ -36,9 +36,9 @@ public:
/**
* Sets the path to animate movement between
*/
- virtual void setPath(const FVector &srcV, const FVector &destV, const FMatrix &srcM);
+ virtual void setPath(const FVector &srcV, const FVector &destV, const FMatrix &orientation);
- virtual int proc5(CErrorCode &errorCode, FVector &v, FMatrix &m);
+ virtual int proc5(CErrorCode &errorCode, FVector &pos, FMatrix &orientation);
};
} // End of namespace Titanic
diff --git a/engines/titanic/star_control/star_control_sub25.cpp b/engines/titanic/star_control/star_control_sub25.cpp
index 3fccbd3..3958872 100644
--- a/engines/titanic/star_control/star_control_sub25.cpp
+++ b/engines/titanic/star_control/star_control_sub25.cpp
@@ -35,17 +35,17 @@ void CStarControlSub25::fn1(const FMatrix &m1, const FMatrix &m2) {
_sub2.fn4(matrix);
}
-void CStarControlSub25::fn2(double val, FMatrix &m) {
+void CStarControlSub25::fn2(double val, FMatrix &orientation) {
if (val <= 0.0) {
- m = _matrix1;
+ orientation = _matrix1;
} else if (val > 1.0) {
- m = _matrix2;
+ orientation = _matrix2;
} else {
CStarControlSub26 sub26 = _sub1.fn5(val, &_sub2);
DMatrix m1;
m1.fn3(&sub26);
- m = m1;
+ orientation = m1;
}
}
diff --git a/engines/titanic/star_control/star_control_sub25.h b/engines/titanic/star_control/star_control_sub25.h
index cb7d610..e6a3034 100644
--- a/engines/titanic/star_control/star_control_sub25.h
+++ b/engines/titanic/star_control/star_control_sub25.h
@@ -36,7 +36,7 @@ public:
CStarControlSub26 _sub2;
public:
void fn1(const FMatrix &m1, const FMatrix &m2);
- void fn2(double val, FMatrix &m);
+ void fn2(double val, FMatrix &orientation);
};
} // End of namespace Titanic
More information about the Scummvm-git-logs
mailing list