diff options
author | Paul Gilbert | 2017-03-12 20:38:47 -0400 |
---|---|---|
committer | Paul Gilbert | 2017-03-12 20:38:47 -0400 |
commit | 6e3ffd3ef717ce82e0feeed50462dd60f03eafbe (patch) | |
tree | cf88cc86d831d5b1911b6391ad489712f1430acc | |
parent | a5e00ad98796c5a7d2f8ddaca817e0ec3a444290 (diff) | |
download | scummvm-rg350-6e3ffd3ef717ce82e0feeed50462dd60f03eafbe.tar.gz scummvm-rg350-6e3ffd3ef717ce82e0feeed50462dd60f03eafbe.tar.bz2 scummvm-rg350-6e3ffd3ef717ce82e0feeed50462dd60f03eafbe.zip |
TITANIC: Field renaming and warning fixes
-rw-r--r-- | engines/titanic/star_control/fmatrix.h | 2 | ||||
-rw-r--r-- | engines/titanic/star_control/star_control_sub13.cpp | 35 | ||||
-rw-r--r-- | engines/titanic/star_control/star_control_sub13.h | 2 | ||||
-rw-r--r-- | engines/titanic/star_control/star_control_sub23.cpp | 4 | ||||
-rw-r--r-- | engines/titanic/star_control/star_control_sub23.h | 2 |
5 files changed, 23 insertions, 22 deletions
diff --git a/engines/titanic/star_control/fmatrix.h b/engines/titanic/star_control/fmatrix.h index 282338c082..7ab90fb7e1 100644 --- a/engines/titanic/star_control/fmatrix.h +++ b/engines/titanic/star_control/fmatrix.h @@ -95,4 +95,4 @@ public: } // End of namespace Titanic -#endif /* TITANIC_MATRIX3_H */ +#endif /* TITANIC_FMATRIX_H */ diff --git a/engines/titanic/star_control/star_control_sub13.cpp b/engines/titanic/star_control/star_control_sub13.cpp index 1cd55382fc..e82ad3a3f1 100644 --- a/engines/titanic/star_control/star_control_sub13.cpp +++ b/engines/titanic/star_control/star_control_sub13.cpp @@ -35,7 +35,8 @@ CStarControlSub13::CStarControlSub13() { _height = 340; _field24 = 0; _fieldC0 = _fieldC4 = _fieldC8 = 0.0; - _fieldCC = _fieldD0 = _fieldD4 = 0.0; + _fieldCC = _fieldD0 = 0.0; + _flag = false; Common::fill(&_valArray[0], &_valArray[5], 0.0); } @@ -58,7 +59,7 @@ CStarControlSub13::CStarControlSub13(CStarControlSub13 *src) : _field24 = src->_field24; Common::copy(&src->_valArray[0], &src->_valArray[4], &_valArray[0]); - _fieldD4 = 0; + _flag = false; } void CStarControlSub13::copyFrom(const CStarControlSub13 *src) { @@ -89,7 +90,7 @@ void CStarControlSub13::load(SimpleFile *file, int param) { _valArray[idx] = file->readFloat(); _matrix.load(file, param); - _fieldD4 = 0; + _flag = false; } void CStarControlSub13::save(SimpleFile *file, int indent) { @@ -111,34 +112,34 @@ void CStarControlSub13::save(SimpleFile *file, int indent) { void CStarControlSub13::setPosition(const FVector &v) { _position = v; - _fieldD4 = 0; + _flag = false; } void CStarControlSub13::setPosition(const CStarControlSub6 *sub6) { FVector vector; _position.fn5(&vector, sub6); _position = sub6->_row1; - _fieldD4 = 0; + _flag = false; } void CStarControlSub13::setMatrix(const FMatrix &m) { _matrix = m; - _fieldD4 = 0; + _flag = false; } void CStarControlSub13::fn11(const FVector &v) { _matrix.fn1(v); - _fieldD4 = 0; + _flag = false; } void CStarControlSub13::setC(double v) { _fieldC = v; - _fieldD4 = 0; + _flag = false; } void CStarControlSub13::set10(double v) { _field10 = v; - _fieldD4 = 0; + _flag = false; } void CStarControlSub13::set14(double v) { @@ -147,12 +148,12 @@ void CStarControlSub13::set14(double v) { void CStarControlSub13::set18(double v) { _field18 = v; - _fieldD4 = 0; + _flag = false; } void CStarControlSub13::set1C(double v) { _field1C = v; - _fieldD4 = 0; + _flag = false; } void CStarControlSub13::fn12() { @@ -169,7 +170,7 @@ void CStarControlSub13::fn12() { m1.copyFrom(*s); _matrix.fn2(m1); - _fieldD4 = 0; + _flag = false; } void CStarControlSub13::fn13(StarMode mode, double v2) { @@ -189,23 +190,23 @@ void CStarControlSub13::reposition(double factor) { _position._x = _matrix._row3._x * factor + _position._x; _position._y = _matrix._row3._y * factor + _position._y; _position._z = _matrix._row3._z * factor + _position._z; - _fieldD4 = 0; + _flag = false; } void CStarControlSub13::fn15(const FMatrix &matrix) { _matrix.fn3(matrix); - _fieldD4 = 0; + _flag = false; } CStarControlSub6 CStarControlSub13::getSub1() { - if (!_fieldD4) + if (!_flag) reset(); return _sub1; } CStarControlSub6 CStarControlSub13::getSub2() { - if (!_fieldD4) + if (!_flag) reset(); return _sub2; @@ -270,8 +271,8 @@ void CStarControlSub13::reset() { _fieldC4 = heightV; _fieldC8 = MIN(widthV, heightV); _fieldCC = tan(_field18 * FACTOR); - _fieldD4 = 1; _fieldD0 = tan(_field1C * FACTOR); + _flag = true; } const FMatrix &CStarControlSub13::getMatrix() const { diff --git a/engines/titanic/star_control/star_control_sub13.h b/engines/titanic/star_control/star_control_sub13.h index 21c29a2d44..80b2e55c4b 100644 --- a/engines/titanic/star_control/star_control_sub13.h +++ b/engines/titanic/star_control/star_control_sub13.h @@ -42,7 +42,7 @@ private: CStarControlSub6 _sub2; double _fieldC0; double _fieldC4; - int _fieldD4; + bool _flag; private: void reset(); public: diff --git a/engines/titanic/star_control/star_control_sub23.cpp b/engines/titanic/star_control/star_control_sub23.cpp index 5d09475b85..4587fd3e27 100644 --- a/engines/titanic/star_control/star_control_sub23.cpp +++ b/engines/titanic/star_control/star_control_sub23.cpp @@ -28,7 +28,7 @@ namespace Titanic { CStarControlSub23::CStarControlSub23() : _row1(0.0, 1000000.0, 0.0) { _field4 = 0; _field8 = 0; - _field24 = 0; + _field24 = 0.0; _field34 = 0; _field38 = 0; _field3C = 0; @@ -63,7 +63,7 @@ void CStarControlSub23::proc3(const FMatrix &m1, const FMatrix &m2) { _row1.clear(); _row2.clear(); _field58 = 0; - _field24 = 0; + _field24 = 0.0; _field8 = 0; _field34 = 0; _field5C = 1.875; diff --git a/engines/titanic/star_control/star_control_sub23.h b/engines/titanic/star_control/star_control_sub23.h index 244e835236..9e90e021a2 100644 --- a/engines/titanic/star_control/star_control_sub23.h +++ b/engines/titanic/star_control/star_control_sub23.h @@ -35,7 +35,7 @@ protected: int _field4; int _field8; FVector _row1, _row2; - int _field24; + double _field24; FVector _row3; int _field34; double _field38; |