aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaul Gilbert2017-02-11 17:22:50 -0500
committerPaul Gilbert2017-02-11 17:25:27 -0500
commitb97137830a021a420d6b505a1c1ae9972106c10f (patch)
tree87ead76e368888e594a5361e2f726a93a8eb59d6
parent5b8d4cac5809f1b77981dddceff854254ab4a194 (diff)
downloadscummvm-rg350-b97137830a021a420d6b505a1c1ae9972106c10f.tar.gz
scummvm-rg350-b97137830a021a420d6b505a1c1ae9972106c10f.tar.bz2
scummvm-rg350-b97137830a021a420d6b505a1c1ae9972106c10f.zip
TITANIC: Fix getPitch calculation when inversion control is incorrect
-rw-r--r--engines/titanic/sound/music_room_handler.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/engines/titanic/sound/music_room_handler.cpp b/engines/titanic/sound/music_room_handler.cpp
index 7e23095470..e50384e0f8 100644
--- a/engines/titanic/sound/music_room_handler.cpp
+++ b/engines/titanic/sound/music_room_handler.cpp
@@ -332,7 +332,7 @@ int CMusicRoomHandler::getPitch(MusicInstrument instrument, int arrIndex) {
const MusicRoomInstrument &ins2 = _array2[instrument];
if (ins1._inversionControl != ins2._inversionControl) {
- val -= mObj._minVal * 2 + mObj._range;
+ val = mObj._minVal * 2 + mObj._range - val;
}
val += ins1._pitchControl + ins2._pitchControl;