aboutsummaryrefslogtreecommitdiff
path: root/engines/titanic
diff options
context:
space:
mode:
authorDavid Fioramonti2017-08-12 21:32:05 -0700
committerDavid Fioramonti2017-08-12 21:32:07 -0700
commitd1f9aa8fe300ba9d8f3c24cca2342f4c32da5f13 (patch)
treead04d53f3926d9b17e1c8916f5fb4f89c0d878b2 /engines/titanic
parent5a770437bdd2065aa2a811c7741c29e29ed15b26 (diff)
downloadscummvm-rg350-d1f9aa8fe300ba9d8f3c24cca2342f4c32da5f13.tar.gz
scummvm-rg350-d1f9aa8fe300ba9d8f3c24cca2342f4c32da5f13.tar.bz2
scummvm-rg350-d1f9aa8fe300ba9d8f3c24cca2342f4c32da5f13.zip
TITANIC: dvector work, fn5 renamed to RotXY
It does a rotation around the X axis then Y.
Diffstat (limited to 'engines/titanic')
-rw-r--r--engines/titanic/star_control/dvector.cpp2
-rw-r--r--engines/titanic/star_control/dvector.h7
-rw-r--r--engines/titanic/star_control/star_camera.cpp4
3 files changed, 9 insertions, 4 deletions
diff --git a/engines/titanic/star_control/dvector.cpp b/engines/titanic/star_control/dvector.cpp
index 93e52b379d..8ea167a8be 100644
--- a/engines/titanic/star_control/dvector.cpp
+++ b/engines/titanic/star_control/dvector.cpp
@@ -101,7 +101,7 @@ DAffine DVector::getFrameTransform(const DVector &v) {
return matrix4.compose(matrix3);
}
-DAffine DVector::fn5() const {
+DAffine DVector::RotXY() const {
DVector v1 = getAnglesAsVect();
DAffine m1, m2;
m1.setRotationMatrix(X_AXIS, v1._y * Rad2Deg);
diff --git a/engines/titanic/star_control/dvector.h b/engines/titanic/star_control/dvector.h
index d0a87be412..7edb37f036 100644
--- a/engines/titanic/star_control/dvector.h
+++ b/engines/titanic/star_control/dvector.h
@@ -73,7 +73,12 @@ public:
* a vector rotation based on input vector v
*/
DAffine getFrameTransform(const DVector &v);
- DAffine fn5() const;
+
+ /**
+ * Returns a affine matrix that does a x then a y axis frame rotation
+ * based on the orientation of this vector
+ */
+ DAffine RotXY() const;
/**
* Returns true if the passed vector equals this one
diff --git a/engines/titanic/star_control/star_camera.cpp b/engines/titanic/star_control/star_camera.cpp
index 6192fc579d..f8f61554ac 100644
--- a/engines/titanic/star_control/star_camera.cpp
+++ b/engines/titanic/star_control/star_camera.cpp
@@ -289,7 +289,7 @@ void CStarCamera::setViewportAngle(const FPoint &angles) {
tempV1 = _matrix._row2 - _matrix._row1;
diffV = tempV1;
- m1 = diffV.fn5();
+ m1 = diffV.RotXY();
m1 = m1.compose(subX);
subX = m1.inverseTransform();
subX = subX.compose(subY);
@@ -459,7 +459,7 @@ void CStarCamera::lockMarker2(CViewport *viewport, const FVector &v) {
DAffine m2(X_AXIS, _matrix._row1);
DVector tempV1 = v - _matrix._row1;
- DAffine m1 = tempV1.fn5();
+ DAffine m1 = tempV1.RotXY();
m1 = m1.compose(m2);
m2 = m1.inverseTransform();