[Scummvm-git-logs] scummvm master -> b4beb09c94e66f58791fa62d10090f8866f5dbb9
dreammaster
dreammaster at scummvm.org
Sat Sep 3 23:31:47 CEST 2016
This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .
Summary:
b4beb09c94 TITANIC: Fix updating mixer during cutscenes, ending NPC speech
Commit: b4beb09c94e66f58791fa62d10090f8866f5dbb9
https://github.com/scummvm/scummvm/commit/b4beb09c94e66f58791fa62d10090f8866f5dbb9
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2016-09-03T17:31:37-04:00
Commit Message:
TITANIC: Fix updating mixer during cutscenes, ending NPC speech
Changed paths:
engines/titanic/events.cpp
engines/titanic/messages/messages.h
engines/titanic/true_talk/tt_talker.cpp
engines/titanic/true_talk/tt_talker.h
diff --git a/engines/titanic/events.cpp b/engines/titanic/events.cpp
index 318ddf5..fa057de 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 e77804c..4fc4067 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 9bb9986..da7628f 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 bc1687e..a83bddd 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();
/**
More information about the Scummvm-git-logs
mailing list