aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaul Gilbert2013-10-16 23:01:26 -0400
committerPaul Gilbert2013-10-16 23:01:26 -0400
commiteb7f7b9fb6c56c125a66b6496cbe712198c75395 (patch)
tree6d9e6b0331893c8d7777f5e12774921a6bcfc485
parent7d7c0966a2836e9447befa6c31cbd114b9f40ef5 (diff)
downloadscummvm-rg350-eb7f7b9fb6c56c125a66b6496cbe712198c75395.tar.gz
scummvm-rg350-eb7f7b9fb6c56c125a66b6496cbe712198c75395.tar.bz2
scummvm-rg350-eb7f7b9fb6c56c125a66b6496cbe712198c75395.zip
TSAGE: Fixes for calling voice playback correctly when showing on-screen text
-rw-r--r--engines/tsage/core.cpp32
1 files changed, 27 insertions, 5 deletions
diff --git a/engines/tsage/core.cpp b/engines/tsage/core.cpp
index bd7610c9f9..3332b12cf6 100644
--- a/engines/tsage/core.cpp
+++ b/engines/tsage/core.cpp
@@ -1749,9 +1749,22 @@ void SceneItem::display(int resNum, int lineNum, ...) {
}
g_globals->_sceneText.fixPriority(255);
+
+ // In Return to Ringworld, if in voice mode only, don't show the text
+ if ((g_vm->getGameID() == GType_Ringworld2) && (R2_GLOBALS._speechSubtitles & SPEECH_VOICE)
+ && !(R2_GLOBALS._speechSubtitles & SPEECH_TEXT))
+ g_globals->_sceneText.hide();
+
g_globals->_sceneObjects->draw();
}
+ // For Return to Ringworld, play the voice overs in sequence
+ if ((g_vm->getGameID() == GType_Ringworld2) && (R2_GLOBALS._speechSubtitles & SPEECH_VOICE)
+ && !playList.empty()) {
+ R2_GLOBALS._playStream.play(*playList.begin(), NULL);
+ playList.pop_front();
+ }
+
// Unless the flag is set to keep the message on-screen, show it until a mouse or keypress, then remove it
if (!keepOnscreen && !msg.empty()) {
Event event;
@@ -1761,14 +1774,23 @@ void SceneItem::display(int resNum, int lineNum, ...) {
EVENT_BUTTON_DOWN | EVENT_KEYPRESS)) {
GLOBALS._screenSurface.updateScreen();
g_system->delayMillis(10);
- }
- // For Return to Ringworld, play the voice overs in sequence
- if ((g_vm->getGameID() == GType_Ringworld2) && !playList.empty() && !R2_GLOBALS._playStream.isPlaying()) {
- R2_GLOBALS._playStream.play(*playList.begin(), NULL);
- playList.pop_front();
+ if ((g_vm->getGameID() == GType_Ringworld2) && (R2_GLOBALS._speechSubtitles & SPEECH_VOICE)) {
+ // Allow the play stream to do processing
+ R2_GLOBALS._playStream.dispatch();
+ if (!R2_GLOBALS._playStream.isPlaying()) {
+ // Check if there are further voice samples to play
+ if (!playList.empty()) {
+ R2_GLOBALS._playStream.play(*playList.begin(), NULL);
+ playList.pop_front();
+ }
+ }
+ }
}
+ if (g_vm->getGameID() == GType_Ringworld2)
+ R2_GLOBALS._playStream.stop();
+
g_globals->_sceneText.remove();
}