aboutsummaryrefslogtreecommitdiff
path: root/scumm
diff options
context:
space:
mode:
authorTravis Howell2006-01-05 08:42:48 +0000
committerTravis Howell2006-01-05 08:42:48 +0000
commit1995eec5504a4bc5ceeb532d9df7588441060f64 (patch)
tree9478256f9911ef245d6033bc2522e3693b969938 /scumm
parent50636c33d32debef920026da30094b5796e33351 (diff)
downloadscummvm-rg350-1995eec5504a4bc5ceeb532d9df7588441060f64.tar.gz
scummvm-rg350-1995eec5504a4bc5ceeb532d9df7588441060f64.tar.bz2
scummvm-rg350-1995eec5504a4bc5ceeb532d9df7588441060f64.zip
Sets random talk state, if value is zero.
Fixes song in puttrace. svn-id: r19913
Diffstat (limited to 'scumm')
-rw-r--r--scumm/script_v100he.cpp5
-rw-r--r--scumm/script_v72he.cpp3
-rw-r--r--scumm/sound_he.cpp3
3 files changed, 7 insertions, 4 deletions
diff --git a/scumm/script_v100he.cpp b/scumm/script_v100he.cpp
index 7dcaec45e2..6faef1147f 100644
--- a/scumm/script_v100he.cpp
+++ b/scumm/script_v100he.cpp
@@ -431,7 +431,7 @@ void ScummEngine_v100he::o100_actorOps() {
for (i = 0; i < k; ++i) {
a->setUserCondition(args[i] & 0x7F, args[i] & 0x80);
}
- debug(1,"o100_actorOps: case 21 (%d)", k);
+ debug(1,"o100_actorOps: case 22 (%d)", k);
break;
case 25: // SO_COSTUME
a->setActorCostume(pop());
@@ -559,9 +559,10 @@ void ScummEngine_v100he::o100_actorOps() {
break;
case 142:
k = pop();
+ if (k == 0)
+ k = _rnd.getRandomNumberRng(1, 10);
a->_heNoTalkAnimation = 1;
a->setTalkCondition(k);
- debug(1,"o100_actorOps: case 24 (%d)", k);
break;
case 143: // SO_TEXT_OFFSET
a->_talkPosY = pop();
diff --git a/scumm/script_v72he.cpp b/scumm/script_v72he.cpp
index 516827daca..de9f1d43df 100644
--- a/scumm/script_v72he.cpp
+++ b/scumm/script_v72he.cpp
@@ -1139,9 +1139,10 @@ void ScummEngine_v72he::o72_actorOps() {
break;
case 24: // HE 80+
k = pop();
+ if (k == 0)
+ k = _rnd.getRandomNumberRng(1, 10);
a->_heNoTalkAnimation = 1;
a->setTalkCondition(k);
- debug(1,"o72_actorOps: case 24 (%d)", k);
break;
case 43: // HE 90+
// HE games use reverse order of layering, so we adjust
diff --git a/scumm/sound_he.cpp b/scumm/sound_he.cpp
index ddf8742789..78ded19c9b 100644
--- a/scumm/sound_he.cpp
+++ b/scumm/sound_he.cpp
@@ -96,7 +96,7 @@ int Sound::getSoundVar(int sound, int var) {
}
if (chan != -1) {
- debug(1, "getSoundVar: sound %d var %d result %d\n", sound, var, _heChannel[chan].soundVars[var]);
+ debug(0, "getSoundVar: sound %d var %d result %d", sound, var, _heChannel[chan].soundVars[var]);
return _heChannel[chan].soundVars[var];
} else {
return 0;
@@ -113,6 +113,7 @@ void Sound::setSoundVar(int sound, int var, int val) {
}
if (chan != -1) {
+ debug(0, "setSoundVar: sound %d var %d val %d", sound, var, val);
_heChannel[chan].soundVars[var] = val;
}
}