diff options
author | Paul Gilbert | 2017-05-21 23:01:49 -0400 |
---|---|---|
committer | Paul Gilbert | 2017-05-21 23:01:49 -0400 |
commit | 4f10761db33d175194cf300403574a16e9d411c5 (patch) | |
tree | 23b67b03428dfd2d80c3846a2fcb388d1a52c40f /engines/titanic | |
parent | 1ed01c2f7f2b9691f913148565b4f9c14a5e0f32 (diff) | |
download | scummvm-rg350-4f10761db33d175194cf300403574a16e9d411c5.tar.gz scummvm-rg350-4f10761db33d175194cf300403574a16e9d411c5.tar.bz2 scummvm-rg350-4f10761db33d175194cf300403574a16e9d411c5.zip |
TITANIC: Rename transition percent fields in Starfield classes
Diffstat (limited to 'engines/titanic')
4 files changed, 20 insertions, 20 deletions
diff --git a/engines/titanic/star_control/star_control_sub23.cpp b/engines/titanic/star_control/star_control_sub23.cpp index b7c803d4b6..72400e6b45 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() : _srcPos(0.0, 1000000.0, 0.0) { _field48 = 0; _field4C = 0; _field54 = 0; - _moveDelayCtr = 0.0; - _moveDelayInc = 0.0; + _transitionPercent = 0.0; + _transitionPercentInc = 0.0; } void CStarControlSub23::proc2(FVector &oldPos, FVector &newPos, @@ -50,7 +50,7 @@ void CStarControlSub23::proc2(FVector &oldPos, FVector &newPos, _active = false; _field34 = false; - _moveDelayCtr = 1.0; + _transitionPercent = 1.0; _field40 = -1; _field44 = -1; _field48 = -1; @@ -60,7 +60,7 @@ void CStarControlSub23::proc2(FVector &oldPos, FVector &newPos, void CStarControlSub23::proc3(const FMatrix &m1, const FMatrix &m2) { _srcPos.clear(); _destPos.clear(); - _moveDelayCtr = 1.0; + _transitionPercent = 1.0; _distance = 0.0; _active = false; _field34 = false; @@ -78,7 +78,7 @@ void CStarControlSub23::setPath(const FVector &srcV, const FVector &destV, const _field44 = -1; _field48 = -1; _field4C = -1; - _moveDelayCtr = 1.0; + _transitionPercent = 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 d747f358bf..9bcbe862d6 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 _moveDelayCtr; - double _moveDelayInc; + double _transitionPercent; + double _transitionPercentInc; COrientationChanger _sub25; public: CStarControlSub23(); diff --git a/engines/titanic/star_control/star_control_sub24.cpp b/engines/titanic/star_control/star_control_sub24.cpp index b3f873fcd8..840d9c635a 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.load(m1, m2); - _moveDelayInc = 0.1; - _moveDelayCtr = 0.0; + _transitionPercentInc = 0.1; + _transitionPercent = 0.0; _field40 = _field44 = _field48 = -1; _active = true; } @@ -45,7 +45,7 @@ void CStarControlSub24::setPath(const FVector &srcV, const FVector &destV, const FVector row3 = orientation._row3; double mult = _posDelta._x * row3._x + _posDelta._y * row3._y + _posDelta._z * row3._z; - _moveDelayCtr = 1.0; + _transitionPercent = 1.0; bool flag = false; if (mult < 1.0) { @@ -73,8 +73,8 @@ void CStarControlSub24::setPath(const FVector &srcV, const FVector &destV, const m1.fn1(tempV1); _sub25.load(orientation, m1); - _moveDelayCtr = 0.0; - _moveDelayInc = 0.1; + _transitionPercent = 0.0; + _transitionPercentInc = 0.1; _active = true; } } @@ -86,9 +86,9 @@ int CStarControlSub24::proc5(CErrorCode &errorCode, FVector &pos, FMatrix &orien if (!_active) return 0; - if (_moveDelayCtr < 1.0) { - _moveDelayCtr += _moveDelayInc; - orientation = _sub25.getOrientation(_moveDelayCtr); + if (_transitionPercent < 1.0) { + _transitionPercent += _transitionPercentInc; + orientation = _sub25.getOrientation(_transitionPercent); 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 01b8f2e442..1e7454d228 100644 --- a/engines/titanic/star_control/star_control_sub27.cpp +++ b/engines/titanic/star_control/star_control_sub27.cpp @@ -38,13 +38,13 @@ void CStarControlSub27::proc2(FVector &oldPos, FVector &newPos, if (newPos != oldPos) { _sub25.load(oldOrientation, newOrientation); - _moveDelayCtr = 0.0; + _transitionPercent = 0.0; if (_field4C == 0) { - _moveDelayInc = 0.1; + _transitionPercentInc = 0.1; _active = true; } else { - _moveDelayInc = 1.0 / distance; + _transitionPercentInc = 1.0 / distance; _active = true; } } @@ -54,8 +54,8 @@ int CStarControlSub27::proc5(CErrorCode &errorCode, FVector &pos, FMatrix &orien if (!_active) return 0; - _moveDelayCtr += _moveDelayInc; - orientation = _sub25.getOrientation(_moveDelayCtr); + _transitionPercent += _transitionPercentInc; + orientation = _sub25.getOrientation(_transitionPercent); errorCode.set(); if (_field40 >= 0) { |