aboutsummaryrefslogtreecommitdiff
path: root/engines/titanic
diff options
context:
space:
mode:
Diffstat (limited to 'engines/titanic')
-rw-r--r--engines/titanic/true_talk/true_talk_manager.cpp23
-rw-r--r--engines/titanic/true_talk/true_talk_manager.h2
2 files changed, 11 insertions, 14 deletions
diff --git a/engines/titanic/true_talk/true_talk_manager.cpp b/engines/titanic/true_talk/true_talk_manager.cpp
index ed45ab26a0..a3f9523fa2 100644
--- a/engines/titanic/true_talk/true_talk_manager.cpp
+++ b/engines/titanic/true_talk/true_talk_manager.cpp
@@ -423,22 +423,19 @@ void CTrueTalkManager::triggerNPC(CTrueTalkNPC *npc) {
}
} else {
CTrueTalkGetAnimSetMsg getAnimMsg;
- if (_speechDuration > 300) {
- do {
- getAnimMsg.execute(npc);
- if (!getAnimMsg._endFrame)
- break;
+ while (_speechDuration > 300) {
+ getAnimMsg.execute(npc);
+ if (!getAnimMsg._endFrame)
+ break;
- npc->playMovie(getAnimMsg._startFrame, getAnimMsg._endFrame, 0);
- getAnimMsg._endFrame = 0;
+ npc->playMovie(getAnimMsg._startFrame, getAnimMsg._endFrame, 0);
+ getAnimMsg._endFrame = 0;
- uint numFrames = getAnimMsg._endFrame - getAnimMsg._startFrame;
- int64 val = (numFrames * 1000) * 0x88888889;
- uint diff = (val >> (32 + 5)) - 500;
- _speechDuration += diff;
+ uint numFrames = getAnimMsg._endFrame - getAnimMsg._startFrame;
+ int diff = (numFrames * 1000) / 15 - 500;
+ _speechDuration += diff;
- getAnimMsg._index++;
- } while (_speechDuration > 0);
+ getAnimMsg._index++;
}
}
}
diff --git a/engines/titanic/true_talk/true_talk_manager.h b/engines/titanic/true_talk/true_talk_manager.h
index 3abf4c181c..f8096425a9 100644
--- a/engines/titanic/true_talk/true_talk_manager.h
+++ b/engines/titanic/true_talk/true_talk_manager.h
@@ -50,7 +50,7 @@ private:
int _currentCharId;
CDialogueFile *_dialogueFile;
int _dialogueId;
- uint _speechDuration;
+ int _speechDuration;
TTtalkerList _talkers;
private:
/**