aboutsummaryrefslogtreecommitdiff
path: root/engines/titanic/star_control
diff options
context:
space:
mode:
authorDavid Fioramonti2017-09-09 08:40:33 -0700
committerDavid Fioramonti2017-09-09 14:24:26 -0700
commitd5fb1170d7d3e9cbe2029d494f6a438745f6490c (patch)
tree7048d657dc5eecdf7796d07a04c7a5ce7278daac /engines/titanic/star_control
parentb2dd72adbdf7fad21438f4860ad8b420b5a82812 (diff)
downloadscummvm-rg350-d5fb1170d7d3e9cbe2029d494f6a438745f6490c.tar.gz
scummvm-rg350-d5fb1170d7d3e9cbe2029d494f6a438745f6490c.tar.bz2
scummvm-rg350-d5fb1170d7d3e9cbe2029d494f6a438745f6490c.zip
TITANIC: Prevent locking/unlocking sounds in photoview
In scummvm and the original engine if you try to unlock/lock stars in photoview/skyview then the stars will not unlock/lock, but the sounds associated with unlocking and locking were playing. Giving a false impression that the locking/unlocking was happening. The sounds no longer play when in photoview.
Diffstat (limited to 'engines/titanic/star_control')
-rw-r--r--engines/titanic/star_control/star_control.cpp12
-rw-r--r--engines/titanic/star_control/star_control.h5
2 files changed, 17 insertions, 0 deletions
diff --git a/engines/titanic/star_control/star_control.cpp b/engines/titanic/star_control/star_control.cpp
index cc414305eb..8464262b31 100644
--- a/engines/titanic/star_control/star_control.cpp
+++ b/engines/titanic/star_control/star_control.cpp
@@ -145,6 +145,18 @@ void CStarControl::newFrame() {
}
}
+bool CStarControl::isStarFieldMode() {
+ if (!_petControl)
+ _petControl = getPetControl();
+
+ if (_petControl) {
+
+ if (_starField.getMode() == MODE_STARFIELD)
+ return true;
+ }
+ return false;
+}
+
void CStarControl::doAction(StarControlAction action) {
if (!_enabled)
return;
diff --git a/engines/titanic/star_control/star_control.h b/engines/titanic/star_control/star_control.h
index e4072d7d62..7efd3869c1 100644
--- a/engines/titanic/star_control/star_control.h
+++ b/engines/titanic/star_control/star_control.h
@@ -70,6 +70,11 @@ public:
virtual void draw(CScreenManager *screenManager);
/**
+ * _starField is currently showing the starfield
+ */
+ bool isStarFieldMode();
+
+ /**
* Does an action in the star control
*/
void doAction(StarControlAction action);