aboutsummaryrefslogtreecommitdiff
path: root/engines/titanic/star_control
diff options
context:
space:
mode:
authorPaul Gilbert2017-06-04 15:47:01 -0400
committerPaul Gilbert2017-06-04 15:47:01 -0400
commit71fd9b79e2a5f15658dd369d5f7d1e5fb27783a3 (patch)
tree74b22cc65ef8f8f905289afa65e5722c28656171 /engines/titanic/star_control
parentca0a6d3d7ea2dc4c53ce550282defc01acdad954 (diff)
downloadscummvm-rg350-71fd9b79e2a5f15658dd369d5f7d1e5fb27783a3.tar.gz
scummvm-rg350-71fd9b79e2a5f15658dd369d5f7d1e5fb27783a3.tar.bz2
scummvm-rg350-71fd9b79e2a5f15658dd369d5f7d1e5fb27783a3.zip
TITANIC: Fix saving locked marker vectors into camera rotation matrix
Diffstat (limited to 'engines/titanic/star_control')
-rw-r--r--engines/titanic/star_control/star_camera.cpp3
-rw-r--r--engines/titanic/star_control/star_camera.h9
2 files changed, 9 insertions, 3 deletions
diff --git a/engines/titanic/star_control/star_camera.cpp b/engines/titanic/star_control/star_camera.cpp
index f3442763e1..b84664ecfe 100644
--- a/engines/titanic/star_control/star_camera.cpp
+++ b/engines/titanic/star_control/star_camera.cpp
@@ -235,7 +235,6 @@ void CStarCamera::setViewportAngle(const FPoint &angles) {
proc22(sub);
} else if (_matrixRow == 0) {
// 1 marker is locked in
-
FVector row1 = _matrix._row1;
FPose poseX(X_AXIS, angles._y);
FPose poseY(Y_AXIS, angles._x);
@@ -354,7 +353,7 @@ void CStarCamera::setViewportAngle(const FPoint &angles) {
}
}
-bool CStarCamera::addMatrixRow(const FVector &v) {
+bool CStarCamera::addMatrixRow(const FVector v) {
if (_matrixRow >= 2)
return false;
diff --git a/engines/titanic/star_control/star_camera.h b/engines/titanic/star_control/star_camera.h
index feeb73ae3f..21a2ebcff6 100644
--- a/engines/titanic/star_control/star_camera.h
+++ b/engines/titanic/star_control/star_camera.h
@@ -156,7 +156,14 @@ public:
virtual void setViewportAngle(const FPoint &angles);
virtual int getMatrixRow() const { return _matrixRow; }
- virtual bool addMatrixRow(const FVector &v);
+
+ /**
+ * Adds the row for a locked in marker
+ * @remarks This can't be a pass-by-reference, since adding
+ * the vector for the star destroys the calling star vector
+ */
+ virtual bool addMatrixRow(const FVector v);
+
virtual bool removeMatrixRow();
virtual void proc36(double *v1, double *v2, double *v3, double *v4);