diff options
author | Paul Gilbert | 2017-08-06 21:23:54 -0400 |
---|---|---|
committer | GitHub | 2017-08-06 21:23:54 -0400 |
commit | b818656a851b2f2b08ddf0004d1ce8ef760ce184 (patch) | |
tree | 492fab2bba1d6a7a65e4612f92d5ce3650292463 /engines/titanic/star_control/camera_mover.cpp | |
parent | e830ddbc70c84060de2cb78e315990850e504b06 (diff) | |
parent | c4751fc6110154951df0f14b9dbfd9ca40d0db6c (diff) | |
download | scummvm-rg350-b818656a851b2f2b08ddf0004d1ce8ef760ce184.tar.gz scummvm-rg350-b818656a851b2f2b08ddf0004d1ce8ef760ce184.tar.bz2 scummvm-rg350-b818656a851b2f2b08ddf0004d1ce8ef760ce184.zip |
Merge pull request #983 from dafioram/titanic_starview_addReverse
TITANIC: Change Starview slowdown to reverse
Diffstat (limited to 'engines/titanic/star_control/camera_mover.cpp')
-rw-r--r-- | engines/titanic/star_control/camera_mover.cpp | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/engines/titanic/star_control/camera_mover.cpp b/engines/titanic/star_control/camera_mover.cpp index 8b1e4ef1eb..f6392d5ea2 100644 --- a/engines/titanic/star_control/camera_mover.cpp +++ b/engines/titanic/star_control/camera_mover.cpp @@ -69,20 +69,17 @@ void CCameraMover::copyTo(CNavigationInfo *dest) { dest->_unusedZ = _unusedZ; } -void CCameraMover::increaseSpeed() { +void CCameraMover::increaseForwardSpeed() { if (!isLocked() && _speed < _maxSpeed) { _speedChangeCtr += _speedChangeInc; _speed += ABS(_speedChangeCtr); } } -void CCameraMover::decreaseSpeed() { - if (!isLocked()) { +void CCameraMover::increaseBackwardSpeed() { + if (!isLocked() && _speed > -_maxSpeed) { _speedChangeCtr -= _speedChangeInc; _speed -= ABS(_speedChangeCtr); - - if (_speedChangeCtr < 0.0) - _speedChangeCtr = 0.0; } } |