aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--engines/titanic/events.cpp5
-rw-r--r--engines/titanic/messages/messages.h2
-rw-r--r--engines/titanic/true_talk/tt_talker.cpp4
-rw-r--r--engines/titanic/true_talk/tt_talker.h6
4 files changed, 11 insertions, 6 deletions
diff --git a/engines/titanic/events.cpp b/engines/titanic/events.cpp
index 318ddf5726..fa057de432 100644
--- a/engines/titanic/events.cpp
+++ b/engines/titanic/events.cpp
@@ -125,12 +125,17 @@ void Events::sleep(uint time) {
}
bool Events::waitForPress(uint expiry) {
+ CGameManager *gameManager = g_vm->_window->_gameManager;
uint32 delayEnd = g_system->getMillis() + expiry;
while (!_vm->shouldQuit() && g_system->getMillis() < delayEnd) {
g_system->delayMillis(10);
checkForNextFrameCounter();
+ // Regularly update the sound mixer
+ if (gameManager)
+ gameManager->_sound.updateMixer();
+
Common::Event event;
if (g_system->getEventManager()->pollEvent(event)) {
switch (event.type) {
diff --git a/engines/titanic/messages/messages.h b/engines/titanic/messages/messages.h
index e77804cd7d..4fc4067a1a 100644
--- a/engines/titanic/messages/messages.h
+++ b/engines/titanic/messages/messages.h
@@ -327,7 +327,7 @@ MESSAGE1(CTriggerNPCEvent, int, value, 0);
MESSAGE4(CTrueTalkGetAnimSetMsg, int, value1, 0, uint, index, 0, uint, startFrame, 0, uint, endFrame, 0);
MESSAGE2(CTrueTalkGetAssetDetailsMsg, CString, filename, "", int, numValue, 0);
MESSAGE2(CTrueTalkGetStateValueMsg, int, stateNum, 0, int, stateVal, -1000);
-MESSAGE2(CTrueTalkNotifySpeechEndedMsg, int, value1, 0, int, dialogueId, 0);
+MESSAGE2(CTrueTalkNotifySpeechEndedMsg, int, endState, 0, int, dialogueId, 0);
MESSAGE3(CTrueTalkNotifySpeechStartedMsg, uint, speechDuration, 0, uint, dialogueId, 0, int, value, 0);
MESSAGE1(CTrueTalkQueueUpAnimSetMsg, int, value, 0);
MESSAGE0(CTrueTalkSelfQueueAnimSetMsg);
diff --git a/engines/titanic/true_talk/tt_talker.cpp b/engines/titanic/true_talk/tt_talker.cpp
index 9bb998617b..da7628f483 100644
--- a/engines/titanic/true_talk/tt_talker.cpp
+++ b/engines/titanic/true_talk/tt_talker.cpp
@@ -40,13 +40,13 @@ TTtalker::~TTtalker() {
petControl->convAddLine(_line);
// Notify the end of the speech
- CTrueTalkNotifySpeechEndedMsg endedMsg(_field24, _dialogueId);
+ CTrueTalkNotifySpeechEndedMsg endedMsg(_talkEndState, _dialogueId);
endedMsg.execute(_npc, nullptr, MSGFLAG_BREAK_IF_HANDLED);
}
void TTtalker::endSpeech(int val) {
_done = true;
- _field24 = val;
+ _talkEndState = val;
}
} // End of namespace Titanic
diff --git a/engines/titanic/true_talk/tt_talker.h b/engines/titanic/true_talk/tt_talker.h
index bc1687e0ce..a83bddd952 100644
--- a/engines/titanic/true_talk/tt_talker.h
+++ b/engines/titanic/true_talk/tt_talker.h
@@ -37,13 +37,13 @@ public:
CTrueTalkNPC *_npc;
CString _line;
int _dialogueId;
- int _field24;
+ int _talkEndState;
int _done;
public:
TTtalker() : _owner(nullptr), _npc(nullptr),
- _dialogueId(0), _field24(0), _done(0) {}
+ _dialogueId(0), _talkEndState(0), _done(0) {}
TTtalker(CTrueTalkManager *owner, CTrueTalkNPC *npc) :
- _owner(owner), _npc(npc), _dialogueId(0), _field24(0), _done(0) {}
+ _owner(owner), _npc(npc), _dialogueId(0), _talkEndState(0), _done(0) {}
~TTtalker();
/**