diff options
4 files changed, 20 insertions, 21 deletions
diff --git a/engines/titanic/star_control/star_control_sub23.cpp b/engines/titanic/star_control/star_control_sub23.cpp index f2a195debe..7b329e77e7 100644 --- a/engines/titanic/star_control/star_control_sub23.cpp +++ b/engines/titanic/star_control/star_control_sub23.cpp @@ -37,8 +37,8 @@ CStarControlSub23::CStarControlSub23() : _row1(0.0, 1000000.0, 0.0) { _field48 = 0; _field4C = 0; _field54 = 0; - _field58 = 0.0; - _field60 = 0.0; + _moveDelayCtr = 0.0; + _moveDelayInc = 0.0; } void CStarControlSub23::proc2(FVector &v1, FVector &v2, FMatrix &m1, FMatrix &m2) { @@ -47,10 +47,9 @@ void CStarControlSub23::proc2(FVector &v1, FVector &v2, FMatrix &m1, FMatrix &m2 _row3 = _row2 - _row1; _field24 = _row3.normalize(); - _field58 = 0; _active = false; _field34 = 0; - _field58 = 1.0; + _moveDelayCtr = 1.0; _field40 = -1; _field44 = -1; _field48 = -1; @@ -60,7 +59,7 @@ void CStarControlSub23::proc2(FVector &v1, FVector &v2, FMatrix &m1, FMatrix &m2 void CStarControlSub23::proc3(const FMatrix &m1, const FMatrix &m2) { _row1.clear(); _row2.clear(); - _field58 = 1.0; + _moveDelayCtr = 1.0; _field24 = 0.0; _active = false; _field34 = 0; @@ -79,7 +78,7 @@ void CStarControlSub23::proc4(FVector &v1, FVector &v2, FMatrix &m) { _field44 = -1; _field48 = -1; _field4C = -1; - _field58 = 1.0; + _moveDelayCtr = 1.0; } void CStarControlSub23::proc6(int val1, int val2, float val) { diff --git a/engines/titanic/star_control/star_control_sub23.h b/engines/titanic/star_control/star_control_sub23.h index 240bd8216d..ee8cd2f4d4 100644 --- a/engines/titanic/star_control/star_control_sub23.h +++ b/engines/titanic/star_control/star_control_sub23.h @@ -46,8 +46,8 @@ protected: int _field4C; Common::Array<double> _powers; int _field54; - double _field58; - double _field60; + double _moveDelayCtr; + double _moveDelayInc; CStarControlSub25 _sub25; public: CStarControlSub23(); diff --git a/engines/titanic/star_control/star_control_sub24.cpp b/engines/titanic/star_control/star_control_sub24.cpp index dc6e79ccb6..43670406a1 100644 --- a/engines/titanic/star_control/star_control_sub24.cpp +++ b/engines/titanic/star_control/star_control_sub24.cpp @@ -28,8 +28,8 @@ namespace Titanic { void CStarControlSub24::proc3(const FMatrix &m1, const FMatrix &m2) { CStarControlSub23::proc3(m1, m2); _sub25.fn1(m1, m2); - _field60 = 0.1; - _field58 = 0.0; + _moveDelayInc = 0.1; + _moveDelayCtr = 0.0; _field40 = _field44 = _field48 = -1; _active = true; } @@ -45,7 +45,7 @@ void CStarControlSub24::proc4(FVector &v1, FVector &v2, FMatrix &m) { FVector row3 = m._row3; double mult = _row3._x * row3._x + _row3._y * row3._y+ _row3._z * row3._z; - _field58 = 1.0; + _moveDelayCtr = 1.0; bool flag = false; if (mult < 1.0) { @@ -73,8 +73,8 @@ void CStarControlSub24::proc4(FVector &v1, FVector &v2, FMatrix &m) { m1.fn1(tempV1); _sub25.fn1(m, m1); - _field58 = 0.0; - _field60 = 0.1; + _moveDelayCtr = 0.0; + _moveDelayInc = 0.1; _active = true; } } @@ -86,9 +86,9 @@ int CStarControlSub24::proc5(CErrorCode &errorCode, FVector &v, FMatrix &m) { if (!_active) return 0; - if (_field58 < 1.0) { - _field58 += _field60; - _sub25.fn2(_field58, m); + if (_moveDelayCtr < 1.0) { + _moveDelayCtr += _moveDelayInc; + _sub25.fn2(_moveDelayCtr, m); errorCode.set(); return 1; } diff --git a/engines/titanic/star_control/star_control_sub27.cpp b/engines/titanic/star_control/star_control_sub27.cpp index 783f6a3409..a300b51db0 100644 --- a/engines/titanic/star_control/star_control_sub27.cpp +++ b/engines/titanic/star_control/star_control_sub27.cpp @@ -37,13 +37,13 @@ void CStarControlSub27::proc2(FVector &v1, FVector &v2, FMatrix &m1, FMatrix &m2 if (m1 != m2) { _sub25.fn1(m1, m2); - _field58 = 0.0; + _moveDelayCtr = 0.0; if (_field4C == 0) { - _field60 = 0.1; + _moveDelayInc = 0.1; _active = true; } else { - _field60 = 1.0 / factor; + _moveDelayInc = 1.0 / factor; _active = true; } } @@ -53,8 +53,8 @@ int CStarControlSub27::proc5(CErrorCode &errorCode, FVector &v, FMatrix &m) { if (!_active) return 0; - _field58 += _field60; - _sub25.fn2(_field58, m); + _moveDelayCtr += _moveDelayInc; + _sub25.fn2(_moveDelayCtr, m); errorCode.set(); if (_field40 >= 0) { |