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

dreammaster dreammaster at scummvm.org
Sat Jun 3 02:58:11 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:
a6735310bc TITANIC: Minor cleanups in vector/matrix calculations


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

Commit Message:
TITANIC: Minor cleanups in vector/matrix calculations

Changed paths:
    engines/titanic/star_control/dmatrix.cpp
    engines/titanic/star_control/dvector.cpp
    engines/titanic/star_control/star_view.cpp


diff --git a/engines/titanic/star_control/dmatrix.cpp b/engines/titanic/star_control/dmatrix.cpp
index 079ce2f..ad63bb0 100644
--- a/engines/titanic/star_control/dmatrix.cpp
+++ b/engines/titanic/star_control/dmatrix.cpp
@@ -202,7 +202,7 @@ void DMatrix::loadTransform(const CMatrixTransform &src) {
 }
 
 DMatrix DMatrix::fn4(const DMatrix &m) {
-	DMatrix dm, dest;
+	DMatrix dm;
 	dm._row1._x = m._row3._x * _row1._z + m._row2._x * _row1._y
 		+ m._row1._x * _row1._x;
 	dm._row1._y = _row1._x * m._row1._y + m._row3._y * _row1._z
@@ -228,7 +228,7 @@ DMatrix DMatrix::fn4(const DMatrix &m) {
 	dm._row4._z = _row4._y * m._row2._z + _row4._x * m._row1._z
 		+ _row4._z * m._row3._z + m._row4._z;
 
-	return dest;
+	return dm;
 }
 
 } // End of namespace Titanic
diff --git a/engines/titanic/star_control/dvector.cpp b/engines/titanic/star_control/dvector.cpp
index 55030d2..08a7e2d 100644
--- a/engines/titanic/star_control/dvector.cpp
+++ b/engines/titanic/star_control/dvector.cpp
@@ -80,7 +80,6 @@ DVector DVector::fn3() const {
 DMatrix DVector::fn4(const DVector &v) {
 	const double FACTOR = 180.0 / M_PI;
 	DMatrix matrix1, matrix2, matrix3, matrix4;
-	DMatrix dest;
 	DVector vector1 = fn3();
 
 	matrix1.setRotationMatrix(X_AXIS, vector1._y * FACTOR);
diff --git a/engines/titanic/star_control/star_view.cpp b/engines/titanic/star_control/star_view.cpp
index 9b292d7..7772469 100644
--- a/engines/titanic/star_control/star_view.cpp
+++ b/engines/titanic/star_control/star_view.cpp
@@ -379,7 +379,7 @@ void CStarView::lockStar() {
 	if (_starField && !_showingPhoto) {
 		CSurfaceArea surfaceArea(_videoSurface);
 		FVector v1, v2, v3;
-			double val = _starField->fn5(&surfaceArea, &_camera, v1, v2, v3);
+		double val = _starField->fn5(&surfaceArea, &_camera, v1, v2, v3);
 
 		if (val > -1.0) {
 			v1 -= surfaceArea._centroid;





More information about the Scummvm-git-logs mailing list