[Scummvm-git-logs] scummvm master -> cc5629014e7f8182ea4c2819112bc97401624eca

dreammaster dreammaster at scummvm.org
Wed Jun 7 02:21:03 CEST 2017


This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .

Summary:
cc5629014e TITANIC: Further fixes for locking marker 2


Commit: cc5629014e7f8182ea4c2819112bc97401624eca
    https://github.com/scummvm/scummvm/commit/cc5629014e7f8182ea4c2819112bc97401624eca
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2017-06-06T20:20:53-04:00

Commit Message:
TITANIC: Further fixes for locking marker 2

Changed paths:
    engines/titanic/star_control/dvector.cpp
    engines/titanic/star_control/dvector.h
    engines/titanic/star_control/star_camera.cpp


diff --git a/engines/titanic/star_control/dvector.cpp b/engines/titanic/star_control/dvector.cpp
index 6e962fe..77357fa 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 b4fb21b..ef54745 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 f1763c6..7678ba4 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);





More information about the Scummvm-git-logs mailing list