[Scummvm-cvs-logs] SF.net SVN: scummvm:[46146] scummvm/trunk/engines/scumm
Kirben at users.sourceforge.net
Kirben at users.sourceforge.net
Thu Nov 26 01:45:08 CET 2009
Revision: 46146
http://scummvm.svn.sourceforge.net/scummvm/?rev=46146&view=rev
Author: Kirben
Date: 2009-11-26 00:45:06 +0000 (Thu, 26 Nov 2009)
Log Message:
-----------
Add patch #2853844 - MM C64: walksounds.
Modified Paths:
--------------
scummvm/trunk/engines/scumm/actor.cpp
scummvm/trunk/engines/scumm/actor.h
scummvm/trunk/engines/scumm/costume.cpp
Modified: scummvm/trunk/engines/scumm/actor.cpp
===================================================================
--- scummvm/trunk/engines/scumm/actor.cpp 2009-11-26 00:43:43 UTC (rev 46145)
+++ scummvm/trunk/engines/scumm/actor.cpp 2009-11-26 00:45:06 UTC (rev 46146)
@@ -1164,6 +1164,7 @@
stopActorMoving();
_cost.soundCounter = 0;
+ _cost.soundPos = 0;
if (_walkbox != kInvalidBox) {
byte flags = _vm->getBoxFlags(_walkbox);
@@ -1223,6 +1224,7 @@
}
_visible = false;
_cost.soundCounter = 0;
+ _cost.soundPos = 0;
_needRedraw = false;
_needBgReset = true;
}
@@ -1269,17 +1271,51 @@
}
}
+// bits 0..5: sound, bit 6: ???
+static const byte v0ActorSounds[24] = {
+ 0x06, // Syd
+ 0x06, // Razor
+ 0x06, // Dave
+ 0x06, // Michael
+ 0x06, // Bernard
+ 0x06, // Wendy
+ 0x00, // Jeff
+ 0x46, // ???
+ 0x06, // Dr Fred
+ 0x06, // Nurse Edna
+ 0x06, // Weird Ed
+ 0x06, // Dead Cousin Ted
+ 0xFF, // Purple Tentacle
+ 0xFF, // Green Tentacle
+ 0x06, // Meteor
+ 0xC0, // Plant
+ 0x06, // ???
+ 0x06, // ???
+ 0x00, // ???
+ 0xC0, // ???
+ 0xC0, // ???
+ 0x00, // ???
+ 0x06, // Sandy
+ 0x06, // ???
+};
+
/* Used in Scumm v5 only. Play sounds associated with actors */
void ScummEngine::playActorSounds() {
- int i;
+ int i, j;
+ int sound;
for (i = 1; i < _numActors; i++) {
if (_actors[i]->_cost.soundCounter && _actors[i]->isInCurrentRoom() && _actors[i]->_sound) {
_currentScript = 0xFF;
- _sound->addSoundToQueue(_actors[i]->_sound[0]);
- for (i = 1; i < _numActors; i++) {
- _actors[i]->_cost.soundCounter = 0;
+ if (_game.version == 0) {
+ sound = v0ActorSounds[i - 1] & 0x3F;
+ } else {
+ sound = _actors[i]->_sound[0];
}
+ _sound->addSoundToQueue(sound);
+ for (j = 1; j < _numActors; j++) {
+ _actors[j]->_cost.soundCounter = 0;
+ }
return;
}
}
Modified: scummvm/trunk/engines/scumm/actor.h
===================================================================
--- scummvm/trunk/engines/scumm/actor.h 2009-11-26 00:43:43 UTC (rev 46145)
+++ scummvm/trunk/engines/scumm/actor.h 2009-11-26 00:45:06 UTC (rev 46146)
@@ -55,6 +55,7 @@
byte active[16];
uint16 animCounter;
byte soundCounter;
+ byte soundPos;
uint16 stopped;
uint16 curpos[16];
uint16 start[16];
Modified: scummvm/trunk/engines/scumm/costume.cpp
===================================================================
--- scummvm/trunk/engines/scumm/costume.cpp 2009-11-26 00:43:43 UTC (rev 46145)
+++ scummvm/trunk/engines/scumm/costume.cpp 2009-11-26 00:45:06 UTC (rev 46146)
@@ -1423,6 +1423,12 @@
frameUpdate(A, cmd);
}
+ if (A->_moving && _vm->_currentRoom != 1 && _vm->_currentRoom != 44) {
+ if (a->_cost.soundPos == 0)
+ a->_cost.soundCounter++;
+ a->_cost.soundPos = (a->_cost.soundPos + 1) % 3;
+ }
+
// increase each frame pos
for (int limb = 0; limb < 8; ++limb) {
if (a->_cost.curpos[limb] < a->_cost.end[limb])
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
More information about the Scummvm-git-logs
mailing list