diff options
Diffstat (limited to 'engines/titanic/star_control')
-rw-r--r-- | engines/titanic/star_control/camera_auto_mover.cpp | 6 | ||||
-rw-r--r-- | engines/titanic/star_control/marked_auto_mover.cpp | 28 | ||||
-rw-r--r-- | engines/titanic/star_control/star_camera.cpp | 10 |
3 files changed, 17 insertions, 27 deletions
diff --git a/engines/titanic/star_control/camera_auto_mover.cpp b/engines/titanic/star_control/camera_auto_mover.cpp index bcb94d27c2..60a1cbde82 100644 --- a/engines/titanic/star_control/camera_auto_mover.cpp +++ b/engines/titanic/star_control/camera_auto_mover.cpp @@ -50,10 +50,8 @@ void CCameraAutoMover::proc2(const FVector &oldPos, const FVector &newPos, _destPos = newPos; _posDelta = _destPos - _srcPos; float temp = 0.0; - if (!_posDelta.normalize(temp)) { // Do the normalization, put the scale amount in temp, - // but if it is unsuccessful, crash - assert(temp); - } + bool unused_status = _posDelta.normalize(temp); // Do the normalization, put the scale amount in temp + _distance = temp; _active = false; _field34 = false; diff --git a/engines/titanic/star_control/marked_auto_mover.cpp b/engines/titanic/star_control/marked_auto_mover.cpp index e3ab2b4f20..0a2da6dda1 100644 --- a/engines/titanic/star_control/marked_auto_mover.cpp +++ b/engines/titanic/star_control/marked_auto_mover.cpp @@ -32,24 +32,22 @@ void CMarkedAutoMover::proc2(const FVector &oldPos, const FVector &newPos, CCameraAutoMover::proc2(oldPos, newPos, oldOrientation, newOrientation); double distance = _distance; - if (distance > 0.0) { + _active = true; + _field34 = true; + proc6(120, 4, distance); + + + _orientationChanger.load(oldOrientation, newOrientation); + _transitionPercent = 0.0; + + if (_field4C == 0) { + _transitionPercentInc = 0.1; + _active = true; + } else { + _transitionPercentInc = 1.0 / _field4C; _active = true; - _field34 = true; - proc6(120, 4, distance); } - if (newPos != oldPos) { - _orientationChanger.load(oldOrientation, newOrientation); - _transitionPercent = 0.0; - - if (_field4C == 0) { - _transitionPercentInc = 0.1; - _active = true; - } else { - _transitionPercentInc = 1.0 / _field4C; - _active = true; - } - } } int CMarkedAutoMover::proc5(CErrorCode &errorCode, FVector &pos, FMatrix &orientation) { diff --git a/engines/titanic/star_control/star_camera.cpp b/engines/titanic/star_control/star_camera.cpp index f1bf24b90e..fa19b95ee6 100644 --- a/engines/titanic/star_control/star_camera.cpp +++ b/engines/titanic/star_control/star_camera.cpp @@ -582,10 +582,7 @@ void CStarCamera::lockMarker2(CViewport *viewport, const FVector &v) { FVector newPos = m4._col1; - if (_viewport._position != newPos) { - // Only change view if positions are different - _mover->proc8(_viewport._position, newPos, m6, m5); - } + _mover->proc8(_viewport._position, newPos, m6, m5); CStarVector *sv = new CStarVector(this, v); _mover->setVector(sv); @@ -600,10 +597,7 @@ void CStarCamera::lockMarker3(CViewport *viewport, const FVector &v) { FVector newPos = viewport->_position; FVector oldPos = _viewport._position; - if (oldPos != newPos) { - // Only change view if positions are different - _mover->proc8(oldPos, newPos, oldOr, newOr); - } + _mover->proc8(oldPos, newPos, oldOr, newOr); CStarVector *sv = new CStarVector(this, v); _mover->setVector(sv); |