aboutsummaryrefslogtreecommitdiff
path: root/engines/scumm/costume.cpp
diff options
context:
space:
mode:
authorTravis Howell2010-03-16 08:59:48 +0000
committerTravis Howell2010-03-16 08:59:48 +0000
commitb968a69468f2806f46457af01d8f764957fdd8a4 (patch)
treebed3a06538244c66b386c81e030eeec498f04d80 /engines/scumm/costume.cpp
parenta7e6397fa417cf64fa6f99a919ea0fbad5de616e (diff)
downloadscummvm-rg350-b968a69468f2806f46457af01d8f764957fdd8a4.tar.gz
scummvm-rg350-b968a69468f2806f46457af01d8f764957fdd8a4.tar.bz2
scummvm-rg350-b968a69468f2806f46457af01d8f764957fdd8a4.zip
Add patch #2970176 - V0: MM Verb + Anim Fix.
svn-id: r48269
Diffstat (limited to 'engines/scumm/costume.cpp')
-rw-r--r--engines/scumm/costume.cpp30
1 files changed, 20 insertions, 10 deletions
diff --git a/engines/scumm/costume.cpp b/engines/scumm/costume.cpp
index 099ee357e0..4961200355 100644
--- a/engines/scumm/costume.cpp
+++ b/engines/scumm/costume.cpp
@@ -75,6 +75,13 @@ static const int v1MMNESLookup[25] = {
0x17, 0x00, 0x01, 0x05, 0x16
};
+const byte v0ActorTalkArray[0x19] = {
+ 0x00, 0x06, 0x06, 0x06, 0x06,
+ 0x06, 0x06, 0x00, 0x46, 0x06,
+ 0x06, 0x06, 0x06, 0xFF, 0xFF,
+ 0x06, 0xC0, 0x06, 0x06, 0x00,
+ 0xC0, 0xC0, 0x00, 0x06, 0x06
+};
byte ClassicCostumeRenderer::mainRoutine(int xmoveCur, int ymoveCur) {
int i, skip = 0;
@@ -1341,6 +1348,10 @@ int C64CostumeLoader::dirToDirStop(int oldDir) {
}
void C64CostumeLoader::actorSpeak(ActorC64 *a, int &cmd) {
+
+ if ((v0ActorTalkArray[ a->_number ] & 0x80))
+ return;
+
if ((a->_speaking & 0x80))
cmd += 0x0C;
else
@@ -1356,6 +1367,9 @@ void C64CostumeLoader::costumeDecodeData(Actor *a, int frame, uint usemask) {
// Enable/Disable speaking flag
if (frame == a->_talkStartFrame) {
+ if ((v0ActorTalkArray[ a->_number ] & 0x40))
+ return;
+
A->_speaking = 1;
return;
}
@@ -1393,15 +1407,7 @@ byte C64CostumeLoader::increaseAnims(Actor *a) {
int cmd = A->_costCommand;
A->_speakingPrev = A->_speaking;
- // Update to use speak frame
- if (A->_speaking & 0x80) {
- actorSpeak(A, cmd);
-
- } else {
- // Update to use stand frame
- if (A->_costFrame == A->_standFrame)
- cmd = dirToDirStop(cmd);
- }
+ actorSpeak(A, cmd);
// Update the limb frames
frameUpdate(A, cmd);
@@ -1410,7 +1416,11 @@ byte C64CostumeLoader::increaseAnims(Actor *a) {
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;
+
+ // Is this the correct location?
+ // 0x073C
+ if ((v0ActorTalkArray[ a->_number ] & 0x3F))
+ a->_cost.soundPos = (a->_cost.soundPos + 1) % 3;
}
// increase each frame pos