Patch 671701: SO_TALK_FREQUENCY
svn-id: r6547
This commit is contained in:
parent
3dc0535a6b
commit
8d9b84b98e
6 changed files with 14 additions and 6 deletions
|
@ -41,6 +41,7 @@ void Actor::initActor(int mode)
|
|||
y = 0;
|
||||
facing = 180;
|
||||
newDirection = 180;
|
||||
talkFrequency = 256;
|
||||
} else if (mode == 2) {
|
||||
facing = 180;
|
||||
newDirection = 180;
|
||||
|
|
|
@ -77,6 +77,7 @@ public:
|
|||
uint16 costume;
|
||||
byte room;
|
||||
byte talkColor;
|
||||
int talkFrequency;
|
||||
byte scalex, scaley;
|
||||
byte charset;
|
||||
int16 newDirection;
|
||||
|
|
|
@ -247,6 +247,7 @@ void Scumm::saveOrLoad(Serializer *s, uint32 savegameVersion)
|
|||
MKLINE(Actor, costume, sleUint16, VER_V8),
|
||||
MKLINE(Actor, room, sleByte, VER_V8),
|
||||
MKLINE(Actor, talkColor, sleByte, VER_V8),
|
||||
MKLINE(Actor, talkFrequency, sleInt16, VER_V16),
|
||||
MKLINE(Actor, scalex, sleByte, VER_V8),
|
||||
MKLINE(Actor, scaley, sleByte, VER_V8),
|
||||
MKLINE(Actor, charset, sleByte, VER_V8),
|
||||
|
|
|
@ -34,10 +34,11 @@ enum {
|
|||
VER_V12,
|
||||
VER_V13,
|
||||
VER_V14,
|
||||
VER_V15
|
||||
VER_V15,
|
||||
VER_V16
|
||||
};
|
||||
|
||||
#define CURRENT_VER VER_V15
|
||||
#define CURRENT_VER VER_V16
|
||||
|
||||
|
||||
// To work around a warning in GCC 3.2 (and 3.1 ?) regarding non-POD types,
|
||||
|
|
|
@ -1187,10 +1187,7 @@ void Scumm_v8::o8_actorOps()
|
|||
warning("o8_actorOps: setActorVolume(%d) not implemented", i);
|
||||
break;
|
||||
case 0x88: // SO_ACTOR_FREQUENCY Set frequency of actor speech
|
||||
// TODO - implement this!
|
||||
i = pop();
|
||||
if (i != 256) // De-verbosed: 256 is the default frequency so don't warn on it
|
||||
warning("o8_actorOps: setActorFrequency(%d) not implemented", i);
|
||||
a->talkFrequency = pop();
|
||||
break;
|
||||
case 0x89: // SO_ACTOR_PAN
|
||||
// TODO - implement this!
|
||||
|
|
|
@ -1226,6 +1226,13 @@ int Sound::playBundleSound(char *sound) {
|
|||
|
||||
byte * final = (byte *)malloc(size);
|
||||
memcpy(final, ptr, size);
|
||||
|
||||
if (_scumm->_actorToPrintStrFor != 0xFF && _scumm->_actorToPrintStrFor != 0) {
|
||||
Actor *a = _scumm->derefActorSafe(_scumm->_actorToPrintStrFor, "playBundleSound");
|
||||
if (a)
|
||||
rate = (rate * a->talkFrequency) / 256;
|
||||
}
|
||||
|
||||
if (bits == 8) {
|
||||
return _scumm->_mixer->playRaw(NULL, final, size, rate, SoundMixer::FLAG_UNSIGNED | SoundMixer::FLAG_AUTOFREE);
|
||||
} else if (bits == 16){
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue