diff options
author | Paul Gilbert | 2017-05-27 15:13:54 -0400 |
---|---|---|
committer | Paul Gilbert | 2017-05-27 15:13:54 -0400 |
commit | cb527ac2867fc12960cd2ef23ed73fbcfaab1c85 (patch) | |
tree | 090857a8add73be7b36cfa5fefeb20f01a4cf895 /engines/titanic/star_control | |
parent | a8b3b67d297407c1fa2d8a89893b6ee72caf488b (diff) | |
download | scummvm-rg350-cb527ac2867fc12960cd2ef23ed73fbcfaab1c85.tar.gz scummvm-rg350-cb527ac2867fc12960cd2ef23ed73fbcfaab1c85.tar.bz2 scummvm-rg350-cb527ac2867fc12960cd2ef23ed73fbcfaab1c85.zip |
TITANIC: Rename _powers array to _speeds
Diffstat (limited to 'engines/titanic/star_control')
4 files changed, 16 insertions, 16 deletions
diff --git a/engines/titanic/star_control/star_control_sub23.cpp b/engines/titanic/star_control/star_control_sub23.cpp index a9a8b05934..3f35481759 100644 --- a/engines/titanic/star_control/star_control_sub23.cpp +++ b/engines/titanic/star_control/star_control_sub23.cpp @@ -89,17 +89,17 @@ void CStarControlSub23::proc6(int val1, int val2, float val) { _field48 = 31; _field3C = (double)val2 * _field38; - // Calculate the powers table + // Calculate the speeds for a graduated movement between stars double base = 0.0, total = 0.0; - _powers.resize(32); + _speeds.resize(32); for (int idx = 31; idx >= 0; --idx) { - _powers[idx] = pow(base, 4.0); - total += _powers[idx]; + _speeds[idx] = pow(base, 4.0); + total += _speeds[idx]; base += 0.03125; } for (int idx = 0; idx < 32; ++idx) { - _powers[idx] = _powers[idx] * _field3C / total; + _speeds[idx] = _speeds[idx] * _field3C / total; } } diff --git a/engines/titanic/star_control/star_control_sub23.h b/engines/titanic/star_control/star_control_sub23.h index bd9bdd9232..dec208dc66 100644 --- a/engines/titanic/star_control/star_control_sub23.h +++ b/engines/titanic/star_control/star_control_sub23.h @@ -44,7 +44,7 @@ protected: int _field44; int _field48; int _field4C; - Common::Array<double> _powers; + Common::Array<double> _speeds; int _field54; double _transitionPercent; double _transitionPercentInc; diff --git a/engines/titanic/star_control/star_control_sub24.cpp b/engines/titanic/star_control/star_control_sub24.cpp index cac8850774..8671fa76fd 100644 --- a/engines/titanic/star_control/star_control_sub24.cpp +++ b/engines/titanic/star_control/star_control_sub24.cpp @@ -119,8 +119,8 @@ int CStarControlSub24::proc5(CErrorCode &errorCode, FVector &pos, FMatrix &orien } if (_field40 >= 0) { - double powVal = _powers[_field40]; - v1 = v2 * powVal; + double speedVal = _speeds[_field40]; + v1 = v2 * speedVal; pos += v1; --_field40; @@ -141,10 +141,10 @@ int CStarControlSub24::proc5(CErrorCode &errorCode, FVector &pos, FMatrix &orien } if (_field48 >= 0) { - double powVal = _powers[31 - _field48]; - v1._y = v2._y * powVal; - v1._z = v2._z * powVal; - v1._x = v2._x * powVal; + double speedVal = _speeds[31 - _field48]; + v1._y = v2._y * speedVal; + v1._z = v2._z * speedVal; + v1._x = v2._x * speedVal; pos._y = v1._y + pos._y; pos._z = v1._z + pos._z; pos._x = pos._x + v1._x; diff --git a/engines/titanic/star_control/star_control_sub27.cpp b/engines/titanic/star_control/star_control_sub27.cpp index 9999ec9ba4..1664a1f1e5 100644 --- a/engines/titanic/star_control/star_control_sub27.cpp +++ b/engines/titanic/star_control/star_control_sub27.cpp @@ -59,8 +59,8 @@ int CStarControlSub27::proc5(CErrorCode &errorCode, FVector &pos, FMatrix &orien errorCode.set(); if (_field40 >= 0) { - double powVal = _powers[_field40]; - pos += _posDelta * powVal; + double speedVal = _speeds[_field40]; + pos += _posDelta * speedVal; getVectorOnPath(pos); --_field40; @@ -74,8 +74,8 @@ int CStarControlSub27::proc5(CErrorCode &errorCode, FVector &pos, FMatrix &orien errorCode.set(); return 1; } else if (_field48 >= 0) { - double powVal = _powers[31 - _field48]; - pos += _posDelta * powVal; + double speedVal = _speeds[31 - _field48]; + pos += _posDelta * speedVal; getVectorOnPath(pos); --_field48; |