aboutsummaryrefslogtreecommitdiff
path: root/engines/titanic/game/nav_helmet.cpp
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/game/nav_helmet.cpp
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/game/nav_helmet.cpp')
-rw-r--r--engines/titanic/game/nav_helmet.cpp29
1 files changed, 23 insertions, 6 deletions
diff --git a/engines/titanic/game/nav_helmet.cpp b/engines/titanic/game/nav_helmet.cpp
index 498f52b0cb..f4ea6e4a11 100644
--- a/engines/titanic/game/nav_helmet.cpp
+++ b/engines/titanic/game/nav_helmet.cpp
@@ -22,6 +22,7 @@
#include "titanic/game/nav_helmet.h"
#include "titanic/pet_control/pet_control.h"
+#include "titanic/star_control/star_control.h"
namespace Titanic {
@@ -113,12 +114,28 @@ bool CNavHelmet::PETPhotoOnOffMsg(CPETPhotoOnOffMsg *msg) {
bool CNavHelmet::PETStarFieldLockMsg(CPETStarFieldLockMsg *msg) {
if (_helmetOn) {
- if (msg->_value) {
- playSound("a#6.wav");
- starFn(LOCK_STAR);
- } else {
- playSound("a#5.wav");
- starFn(UNLOCK_STAR);
+ CPetControl *pet = getPetControl();
+ CStarControl *starControl = 0;
+ bool isStarFieldMode=false;
+
+ if (pet)
+ starControl = pet->getStarControl();
+
+ if (starControl)
+ isStarFieldMode = starControl->isStarFieldMode();
+
+ if (isStarFieldMode) {
+ // locking and unlocking only in starfield
+ // It already does this without the conditional
+ // but now it will also not play the sounds in
+ // photoview
+ if (msg->_value) {
+ playSound("a#6.wav");
+ starFn(LOCK_STAR);
+ } else {
+ playSound("a#5.wav");
+ starFn(UNLOCK_STAR);
+ }
}
}