diff options
| author | Paul Gilbert | 2017-06-02 20:58:00 -0400 | 
|---|---|---|
| committer | Paul Gilbert | 2017-06-02 20:58:00 -0400 | 
| commit | a6735310bcffbb42124b03293fb5eb3084b190a1 (patch) | |
| tree | a3d3e6e6cf71c97d6d5e80c14c91b876c0bfce66 | |
| parent | 9583083c73e28add4c759843cf2fcd893d0936eb (diff) | |
| download | scummvm-rg350-a6735310bcffbb42124b03293fb5eb3084b190a1.tar.gz scummvm-rg350-a6735310bcffbb42124b03293fb5eb3084b190a1.tar.bz2 scummvm-rg350-a6735310bcffbb42124b03293fb5eb3084b190a1.zip | |
TITANIC: Minor cleanups in vector/matrix calculations
| -rw-r--r-- | engines/titanic/star_control/dmatrix.cpp | 4 | ||||
| -rw-r--r-- | engines/titanic/star_control/dvector.cpp | 1 | ||||
| -rw-r--r-- | engines/titanic/star_control/star_view.cpp | 2 | 
3 files changed, 3 insertions, 4 deletions
| diff --git a/engines/titanic/star_control/dmatrix.cpp b/engines/titanic/star_control/dmatrix.cpp index 079ce2f975..ad63bb0ea1 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 55030d243c..08a7e2d4fc 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 9b292d715b..77724698e0 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; | 
