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

dreammaster dreammaster at scummvm.org
Wed Aug 16 03:32:30 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:
f935d79960 TITANIC: Cleanup of DAffine, removal of unused static


Commit: f935d799609e0b422c516a88557ef70f4153e52a
    https://github.com/scummvm/scummvm/commit/f935d799609e0b422c516a88557ef70f4153e52a
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2017-08-15T21:32:25-04:00

Commit Message:
TITANIC: Cleanup of DAffine, removal of unused static

Changed paths:
    engines/titanic/star_control/daffine.cpp
    engines/titanic/star_control/daffine.h
    engines/titanic/star_control/star_control.cpp


diff --git a/engines/titanic/star_control/daffine.cpp b/engines/titanic/star_control/daffine.cpp
index 6dfee29..8fb0827 100644
--- a/engines/titanic/star_control/daffine.cpp
+++ b/engines/titanic/star_control/daffine.cpp
@@ -26,8 +26,6 @@
 
 namespace Titanic {
 
-DAffine *DAffine::_static;
-
 DAffine::DAffine() :
 	_col1(0.0, 0.0, 0.0), _col2(0.0, 0.0, 0.0), _col3(0.0, 0.0, 0.0), _col4(0.0, 0.0, 0.0) {
 }
@@ -65,16 +63,6 @@ DAffine::DAffine(const FMatrix &src) {
 	_col3 = src._row3;
 }
 
-//TODO: What is _static for?
-void DAffine::init() {
-	_static = nullptr;
-}
-
-void DAffine::deinit() {
-	delete _static;
-	_static = nullptr;
-}
-
 void DAffine::clear() {
 	_col1._x = 0.0;
 	_col1._y = 0.0;
diff --git a/engines/titanic/star_control/daffine.h b/engines/titanic/star_control/daffine.h
index 631b600..074c135 100644
--- a/engines/titanic/star_control/daffine.h
+++ b/engines/titanic/star_control/daffine.h
@@ -46,9 +46,6 @@ public:
 	DVector _col3;
 	DVector _col4;
 public:
-	static void init();
-	static void deinit();
-public:
 	DAffine();
         //TODO: consider making mode an enum since that is more helpful when it is used in code
 	DAffine(int mode, const DVector &src);
@@ -70,18 +67,18 @@ public:
 	 */
 	DAffine inverseTransform() const;
 
-       /**
-        * Change this Daffine to have its first three columns be some mapping from src matrix
-        * and the 4rth column to be (three) zeros. The mapping is not as simple as replacing
-        * matching row/colmn indices
-        */
+	/**
+	 * Change this Daffine to have its first three columns be some mapping from src matrix
+	 * and the 4rth column to be (three) zeros. The mapping is not as simple as replacing
+	 * matching row/colmn indices
+	 */
 	void loadTransform(const CMatrixTransform &src);
 
-       /**
-        * Do the affine product between this Daffine on the right
-        * and the m Daffine matrix on the left. This product is NOT the same
-        * as multiplying two matrices of dimensions 3x4.
-        */
+	/**
+	 * Do the affine product between this Daffine on the right
+	 * and the m Daffine matrix on the left. This product is NOT the same
+	 * as multiplying two matrices of dimensions 3x4.
+	 */
 	DAffine compose(const DAffine &m);
 };
 
diff --git a/engines/titanic/star_control/star_control.cpp b/engines/titanic/star_control/star_control.cpp
index ee29629..92cedc9 100644
--- a/engines/titanic/star_control/star_control.cpp
+++ b/engines/titanic/star_control/star_control.cpp
@@ -45,12 +45,10 @@ END_MESSAGE_MAP()
 CStarControl::CStarControl() : _enabled(false), _petControl(nullptr),
 		_starRect(20, 10, 620, 350) {
 	CStarCamera::init();
-	DAffine::init();
 }
 
 CStarControl::~CStarControl() {
 	CStarCamera::deinit();
-	DAffine::deinit();
 }
 
 void CStarControl::save(SimpleFile *file, int indent) {





More information about the Scummvm-git-logs mailing list