diff options
Diffstat (limited to 'engines')
-rw-r--r-- | engines/titanic/star_control/dmatrix.cpp | 33 | ||||
-rw-r--r-- | engines/titanic/star_control/dmatrix.h | 5 |
2 files changed, 23 insertions, 15 deletions
diff --git a/engines/titanic/star_control/dmatrix.cpp b/engines/titanic/star_control/dmatrix.cpp index 1405f4f693..940b34833f 100644 --- a/engines/titanic/star_control/dmatrix.cpp +++ b/engines/titanic/star_control/dmatrix.cpp @@ -32,18 +32,27 @@ DMatrix::DMatrix() : _row1(1.875, 0.0, 0.0), _row2(0.0, 1.875, 0.0), _row3(0.0, 0.0, 1.875) { } -DMatrix::DMatrix(int mode, const FMatrix *src) { - assert(!mode); - - _row1._x = 1.875; - _row2._y = 1.875; - _row3._z = 1.875; - _frow1._x = src->_row1._x; - _frow1._y = src->_row1._y; - _frow1._z = src->_row1._z; - _frow2._x = src->_row2._x; - _frow2._y = src->_row2._y; - _frow2._z = src->_row2._z; +DMatrix::DMatrix(int mode, const DVector &src) { + switch (mode) { + case 0: + _row1._x = 1.0; + _row2._y = 1.0; + _row3._z = 1.0; + _row4 = src; + break; + + case 1: + _row1._x = src._x; + _row2._y = src._y; + _row3._z = src._z; + break; + + default: + _row1._x = 1.0; + _row2._y = 1.0; + _row3._z = 1.0; + break; + } } DMatrix::DMatrix(Axis axis, double amount) { diff --git a/engines/titanic/star_control/dmatrix.h b/engines/titanic/star_control/dmatrix.h index a015ebdb1d..c3490770fb 100644 --- a/engines/titanic/star_control/dmatrix.h +++ b/engines/titanic/star_control/dmatrix.h @@ -42,14 +42,13 @@ public: DVector _row1; DVector _row2; DVector _row3; - FVector _frow1; - FVector _frow2; + DVector _row4; public: static void init(); static void deinit(); public: DMatrix(); - DMatrix(int mode, const FMatrix *src); + DMatrix(int mode, const DVector &src); DMatrix(Axis axis, double amount); DMatrix(const FMatrix &src); |