aboutsummaryrefslogtreecommitdiff
path: root/sword1
diff options
context:
space:
mode:
authorRobert Göffringmann2003-12-16 19:55:59 +0000
committerRobert Göffringmann2003-12-16 19:55:59 +0000
commit166ba1b38504264dafc295e3630333eff2bc136f (patch)
tree135ff6aec814c11c5d1a8efbfae8f1108505d9fd /sword1
parent082120ef65518430bb77ffe7f7a47c29c2fc5120 (diff)
downloadscummvm-rg350-166ba1b38504264dafc295e3630333eff2bc136f.tar.gz
scummvm-rg350-166ba1b38504264dafc295e3630333eff2bc136f.tar.bz2
scummvm-rg350-166ba1b38504264dafc295e3630333eff2bc136f.zip
fix speech animations
svn-id: r11690
Diffstat (limited to 'sword1')
-rw-r--r--sword1/logic.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/sword1/logic.cpp b/sword1/logic.cpp
index 48251066ab..c5d8077f56 100644
--- a/sword1/logic.cpp
+++ b/sword1/logic.cpp
@@ -317,10 +317,11 @@ int SwordLogic::speechDriver(BsObject *compact) {
uint8 *animData = ((uint8*)_resMan->openFetchRes(compact->o_anim_resource)) + sizeof(Header);
int32 numFrames = READ_LE_UINT32(animData);
animData += 4;
+ compact->o_anim_pc++; // go to next frame of anim
if (_speechFinished || (compact->o_anim_pc >= numFrames) ||
(_speechRunning && (_sound->amISpeaking() == 0)))
- compact->o_anim_pc = 0;
+ compact->o_anim_pc = 0; //set to frame 0, closed mouth
AnimUnit *animPtr = (AnimUnit*)(animData + sizeof(AnimUnit) * compact->o_anim_pc);
if (!(compact->o_status & STAT_SHRINK)) {