aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaweł Kołodziejski2004-02-09 08:05:23 +0000
committerPaweł Kołodziejski2004-02-09 08:05:23 +0000
commitd1b74aa7ccb607975d26ea2a4b5914e1777bfc0d (patch)
tree445fefd3868dad93c5cd20529554689b67f2b94f
parentbbc9d84e2917951e12d0f78d61e03744681ad4f6 (diff)
downloadscummvm-rg350-d1b74aa7ccb607975d26ea2a4b5914e1777bfc0d.tar.gz
scummvm-rg350-d1b74aa7ccb607975d26ea2a4b5914e1777bfc0d.tar.bz2
scummvm-rg350-d1b74aa7ccb607975d26ea2a4b5914e1777bfc0d.zip
added talkVolume, and changed talkPan call method
svn-id: r12790
-rw-r--r--scumm/actor.cpp5
-rw-r--r--scumm/actor.h2
-rw-r--r--scumm/script_v8.cpp13
3 files changed, 7 insertions, 13 deletions
diff --git a/scumm/actor.cpp b/scumm/actor.cpp
index a3c5f53186..71de4f0307 100644
--- a/scumm/actor.cpp
+++ b/scumm/actor.cpp
@@ -104,10 +104,11 @@ void Actor::initActor(int mode) {
forceClip = 0;
ignoreTurns = false;
flip = 0;
-
+
talkFrequency = 256;
talkPan = 64;
-
+ talkVolume = 127;
+
if (_vm->_version <= 2) {
initFrame = 2;
walkFrame = 0;
diff --git a/scumm/actor.h b/scumm/actor.h
index 335efd96ca..2175534778 100644
--- a/scumm/actor.h
+++ b/scumm/actor.h
@@ -26,7 +26,6 @@
#include "common/scummsys.h"
#include "scumm/scumm.h"
-
namespace Scumm {
enum MoveFlags {
@@ -92,6 +91,7 @@ public:
byte talkColor;
int talkFrequency;
byte talkPan;
+ byte talkVolume;
byte scalex, scaley;
byte charset;
byte moving;
diff --git a/scumm/script_v8.cpp b/scumm/script_v8.cpp
index a5936ccf5c..f455df3a25 100644
--- a/scumm/script_v8.cpp
+++ b/scumm/script_v8.cpp
@@ -1078,9 +1078,8 @@ void ScummEngine_v8::o8_actorOps() {
a->moving &= ~MF_FROZEN;
break;
case 0x87: // SO_ACTOR_VOLUME Set volume of actor speech
- // TODO - implement this!
- i = pop();
- warning("o8_actorOps: setActorVolume(%d) not implemented", i);
+ a->talkVolume = pop();
+ _imuseDigital->setVolume(kTalkSoundID, a->talkVolume);
break;
case 0x88: // SO_ACTOR_FREQUENCY Set frequency of actor speech
a->talkFrequency = pop();
@@ -1088,14 +1087,8 @@ void ScummEngine_v8::o8_actorOps() {
case 0x89: // SO_ACTOR_PAN
// 0 = left, 64 = middle, 127 = right.
a->talkPan = pop();
-
- // If the actor is talking at the moment, adjust the panning
- // on the current talk channel handle. (If the handle is 0,
- // setChannelPan() won't do anything.)
-
if (_actorToPrintStrFor == a->number) {
- if (_sound->isSoundRunning(kTalkSoundID))
- _imuseDigital->parseScriptCmds(12, 0x700, kTalkSoundID, a->talkPan, 0, 0, 0, 0);
+ _imuseDigital->setPan(kTalkSoundID, a->talkPan);
}
break;