From 71fd9b79e2a5f15658dd369d5f7d1e5fb27783a3 Mon Sep 17 00:00:00 2001 From: Paul Gilbert Date: Sun, 4 Jun 2017 15:47:01 -0400 Subject: TITANIC: Fix saving locked marker vectors into camera rotation matrix --- engines/titanic/star_control/star_camera.cpp | 3 +-- engines/titanic/star_control/star_camera.h | 9 ++++++++- 2 files changed, 9 insertions(+), 3 deletions(-) (limited to 'engines/titanic/star_control') 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); -- cgit v1.2.3