diff options
author | Paul Gilbert | 2017-06-06 20:20:53 -0400 |
---|---|---|
committer | Paul Gilbert | 2017-06-06 20:20:53 -0400 |
commit | cc5629014e7f8182ea4c2819112bc97401624eca (patch) | |
tree | dd6b0e868b2ed8382b4f62430bdce6ca242af12c /engines/titanic/star_control | |
parent | cb3f8f35dbfe6bc4e976f3da8d77d81746c96919 (diff) | |
download | scummvm-rg350-cc5629014e7f8182ea4c2819112bc97401624eca.tar.gz scummvm-rg350-cc5629014e7f8182ea4c2819112bc97401624eca.tar.bz2 scummvm-rg350-cc5629014e7f8182ea4c2819112bc97401624eca.zip |
TITANIC: Further fixes for locking marker 2
Diffstat (limited to 'engines/titanic/star_control')
-rw-r--r-- | engines/titanic/star_control/dvector.cpp | 8 | ||||
-rw-r--r-- | engines/titanic/star_control/dvector.h | 2 | ||||
-rw-r--r-- | engines/titanic/star_control/star_camera.cpp | 4 |
3 files changed, 7 insertions, 7 deletions
diff --git a/engines/titanic/star_control/dvector.cpp b/engines/titanic/star_control/dvector.cpp index 6e962fe876..77357fa923 100644 --- a/engines/titanic/star_control/dvector.cpp +++ b/engines/titanic/star_control/dvector.cpp @@ -42,16 +42,16 @@ double DVector::getDistance(const DVector &src) { DVector DVector::fn1(const DMatrix &m) { DVector dest; - dest._x = m._row3._x * _z + m._row2._x * _y + _x * m._row1._x + m._row4._x; + dest._x = m._row3._x * _z + m._row2._x * _y + m._row1._x * _x + m._row4._x; dest._y = m._row2._y * _y + m._row3._y * _z + m._row1._y * _x + m._row4._y; dest._z = m._row3._z * _z + m._row2._z * _y + m._row1._z * _x + m._row4._z; return dest; } -void DVector::fn2(double val) { +void DVector::fn2(double angle) { const double FACTOR = 2 * M_PI / 360.0; - double sinVal = sin(val * FACTOR); - double cosVal = cos(val * FACTOR); + double sinVal = sin(angle * FACTOR); + double cosVal = cos(angle * FACTOR); _x = cosVal * _x - sinVal * _z; _z = cosVal * _z + sinVal * _x; diff --git a/engines/titanic/star_control/dvector.h b/engines/titanic/star_control/dvector.h index b4fb21b5be..ef54745f3e 100644 --- a/engines/titanic/star_control/dvector.h +++ b/engines/titanic/star_control/dvector.h @@ -49,7 +49,7 @@ public: double getDistance(const DVector &src); DVector fn1(const DMatrix &m); - void fn2(double val); + void fn2(double angle); DVector fn3() const; DMatrix fn4(const DVector &v); DMatrix fn5() const; diff --git a/engines/titanic/star_control/star_camera.cpp b/engines/titanic/star_control/star_camera.cpp index f1763c603d..7678ba4940 100644 --- a/engines/titanic/star_control/star_camera.cpp +++ b/engines/titanic/star_control/star_camera.cpp @@ -463,7 +463,7 @@ void CStarCamera::lockMarker2(CViewport *viewport, const FVector &v) { m1 = m1.fn4(m2); m2 = m1.fn1(); - FVector tempV2 = _viewport._position; + DVector tempV2 = _viewport._position; DMatrix m4; m4._row1 = viewport->_position; m4._row2 = DVector(0.0, 0.0, 0.0); @@ -497,7 +497,7 @@ void CStarCamera::lockMarker2(CViewport *viewport, const FVector &v) { tempV3._z = m5._row3._z * 1000000.0 + m4._row1._z; m4._row4 = tempV3; - tempV2 = tempV2.fn1(); + tempV2 = tempV2.fn1(m2); m4._row1 = m4._row1.fn1(m2); m4._row3 = m4._row3.fn1(m2); m4._row2 = m4._row2.fn1(m2); |