aboutsummaryrefslogtreecommitdiff
path: root/engines/titanic
diff options
context:
space:
mode:
authorDavid Fioramonti2017-08-12 21:14:22 -0700
committerDavid Fioramonti2017-08-12 21:16:43 -0700
commit5a770437bdd2065aa2a811c7741c29e29ed15b26 (patch)
treea5f4a78de7350df2c75bb796e79193a955ec97e4 /engines/titanic
parentba128368e8e7c4c4369db48c0f024bd40e8dad80 (diff)
downloadscummvm-rg350-5a770437bdd2065aa2a811c7741c29e29ed15b26.tar.gz
scummvm-rg350-5a770437bdd2065aa2a811c7741c29e29ed15b26.tar.bz2
scummvm-rg350-5a770437bdd2065aa2a811c7741c29e29ed15b26.zip
TITANIC: dvect work, replace fn4 with getFrameTransform
This function was using two vectors one as a frame rotation and the other as a vector/point rotation. This function is only used in when you click on a star in starview.
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/unmarked_camera_mover.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 86396c9945..93e52b379d 100644
--- a/engines/titanic/star_control/dvector.cpp
+++ b/engines/titanic/star_control/dvector.cpp
@@ -84,7 +84,7 @@ DVector DVector::getAnglesAsVect() const {
return dest;
}
-DAffine DVector::fn4(const DVector &v) {
+DAffine DVector::getFrameTransform(const DVector &v) {
DAffine matrix1, matrix2, matrix3, matrix4;
DVector vector1 = getAnglesAsVect();
diff --git a/engines/titanic/star_control/dvector.h b/engines/titanic/star_control/dvector.h
index b37c8bb851..d0a87be412 100644
--- a/engines/titanic/star_control/dvector.h
+++ b/engines/titanic/star_control/dvector.h
@@ -67,7 +67,12 @@ public:
* 3. z component output of v is the 4-quadrant angle that z makes with x (Y axis rotation)
*/
DVector getAnglesAsVect() const;
- DAffine fn4(const DVector &v);
+
+ /**
+ * Returns a matrix that contains the frame rotation based on this vector and
+ * a vector rotation based on input vector v
+ */
+ DAffine getFrameTransform(const DVector &v);
DAffine fn5() const;
/**
diff --git a/engines/titanic/star_control/unmarked_camera_mover.cpp b/engines/titanic/star_control/unmarked_camera_mover.cpp
index c950baab5e..c92ed2bc11 100644
--- a/engines/titanic/star_control/unmarked_camera_mover.cpp
+++ b/engines/titanic/star_control/unmarked_camera_mover.cpp
@@ -44,10 +44,10 @@ void CUnmarkedCameraMover::moveTo(const FVector &srcV, const FVector &destV, con
void CUnmarkedCameraMover::proc10(const FVector &v1, const FVector &v2, const FVector &v3, const FMatrix &m) {
if (isLocked())
decLockCount();
-
+ //TODO: v3 is unused
DVector vector1 = v1;
DVector vector2 = v2;
- DAffine matrix1 = vector2.fn4(vector1);
+ DAffine matrix1 = vector2.getFrameTransform(vector1);
DAffine matrix2 = matrix1.compose(m);
_autoMover.proc3(m, matrix2);