aboutsummaryrefslogtreecommitdiff
path: root/engines/bladerunner/script
diff options
context:
space:
mode:
authorPeter Kohaut2019-02-10 19:45:50 +0100
committerPeter Kohaut2019-02-10 19:47:22 +0100
commitdbfc657a2c305946483e60d8bd68bb40575fb3a4 (patch)
treeab8289a1aa270209913106d8562a667ee015ffb4 /engines/bladerunner/script
parent55e23a190991543d808691943be7b149f8d32632 (diff)
downloadscummvm-rg350-dbfc657a2c305946483e60d8bd68bb40575fb3a4.tar.gz
scummvm-rg350-dbfc657a2c305946483e60d8bd68bb40575fb3a4.tar.bz2
scummvm-rg350-dbfc657a2c305946483e60d8bd68bb40575fb3a4.zip
BLADERUNNER: Added sitcom mode
Available via ScummVM game options
Diffstat (limited to 'engines/bladerunner/script')
-rw-r--r--engines/bladerunner/script/script.cpp16
1 files changed, 6 insertions, 10 deletions
diff --git a/engines/bladerunner/script/script.cpp b/engines/bladerunner/script/script.cpp
index 502344bf6f..4c205d5d4c 100644
--- a/engines/bladerunner/script/script.cpp
+++ b/engines/bladerunner/script/script.cpp
@@ -329,16 +329,12 @@ void ScriptBase::Actor_Says_With_Pause(int actorId, int sentenceId, float pause,
actor->changeAnimationMode(kAnimationModeIdle, false);
}
- //TODO: sitcom
- //if (_vm->isSitcom)
- //{
- // int rnd = _vm->random(1, 100);
- // if (rnd <= actor::get_unknown3(actor))
- // {
- // int soundId = _vm->random(319, 327);
- // _vm->_audioPlayer->play(soundId, 40, 0, 0, 50);
- // }
- //}
+ if (_vm->_sitcomMode) {
+ int rnd = Random_Query(1, 100);
+ if (rnd <= actor->getSitcomRatio()) {
+ Sound_Play(Random_Query(319, 327), 40, 0, 0, 50);
+ }
+ }
if(pause > 0.0f && !_vm->_speechSkipped) {
Delay(pause * 1000);
}