diff options
author | Paul Gilbert | 2017-08-06 20:36:28 -0400 |
---|---|---|
committer | Paul Gilbert | 2017-08-06 20:36:28 -0400 |
commit | e830ddbc70c84060de2cb78e315990850e504b06 (patch) | |
tree | b94441273f040da585ab431fc25d5e5794d8e584 /engines/titanic/star_control | |
parent | 9a98b32a11270e9ac0f40798ddc457aef138fe0a (diff) | |
download | scummvm-rg350-e830ddbc70c84060de2cb78e315990850e504b06.tar.gz scummvm-rg350-e830ddbc70c84060de2cb78e315990850e504b06.tar.bz2 scummvm-rg350-e830ddbc70c84060de2cb78e315990850e504b06.zip |
TITANIC: Bring movement rates in the starfield closer to the original
The original updated the camera during the general scene drawing,
which was done at a much higher rate than I wanted for the ScummVM
implementation. So I've added this workaround to update the camera
every 10ms when the player is in the star control scene. This gives
it a comparible rate of movement to the original.
Diffstat (limited to 'engines/titanic/star_control')
-rw-r--r-- | engines/titanic/star_control/star_control.h | 5 | ||||
-rw-r--r-- | engines/titanic/star_control/star_view.cpp | 3 | ||||
-rw-r--r-- | engines/titanic/star_control/star_view.h | 10 |
3 files changed, 13 insertions, 5 deletions
diff --git a/engines/titanic/star_control/star_control.h b/engines/titanic/star_control/star_control.h index 8013eed850..90de2eb3eb 100644 --- a/engines/titanic/star_control/star_control.h +++ b/engines/titanic/star_control/star_control.h @@ -97,6 +97,11 @@ public: * Called when a star destination is set */ void starDestinationSet(); + + /** + * Updates the camerea for the star view + */ + void updateCamera() { _view.updateCamera(); } }; } // End of namespace Titanic diff --git a/engines/titanic/star_control/star_view.cpp b/engines/titanic/star_control/star_view.cpp index f1adaf640d..a5028374ff 100644 --- a/engines/titanic/star_control/star_view.cpp +++ b/engines/titanic/star_control/star_view.cpp @@ -256,6 +256,9 @@ void CStarView::resetPosition() { } bool CStarView::updateCamera() { + if (_fader.isActive() || _showingPhoto) + return false; + if (_videoSurface) { CErrorCode errorCode; _camera.updatePosition(&errorCode); diff --git a/engines/titanic/star_control/star_view.h b/engines/titanic/star_control/star_view.h index 7e3f1d084a..204c02336c 100644 --- a/engines/titanic/star_control/star_view.h +++ b/engines/titanic/star_control/star_view.h @@ -50,11 +50,6 @@ private: bool _field218; bool _showingPhoto; private: - /** - * Updates the camera, allowing for movement - */ - bool updateCamera(); - void fn18(CStarCamera *camera); void fn19(int v); @@ -99,6 +94,11 @@ public: void draw(CScreenManager *screenManager); /** + * Updates the camera, allowing for movement + */ + bool updateCamera(); + + /** * Handles mouse down messages */ bool MouseButtonDownMsg(int unused, const Point &pt); |