added talkVolume, and changed talkPan call method

svn-id: r12790
This commit is contained in:
Paweł Kołodziejski 2004-02-09 08:05:23 +00:00
parent bbc9d84e29
commit d1b74aa7cc
3 changed files with 7 additions and 13 deletions

View File

@ -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;

View File

@ -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;

View File

@ -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;