aboutsummaryrefslogtreecommitdiff
path: root/engines/sword2/function.cpp
diff options
context:
space:
mode:
authorTorbjörn Andersson2006-07-08 11:42:07 +0000
committerTorbjörn Andersson2006-07-08 11:42:07 +0000
commit5658e71f4d7c2245098316434db2f239871e9f05 (patch)
tree485e494fe9ca53f0346d8468c27a7dd9d06bed5e /engines/sword2/function.cpp
parent6ed462e06febcd060348d66a8779362a5b2bc89b (diff)
downloadscummvm-rg350-5658e71f4d7c2245098316434db2f239871e9f05.tar.gz
scummvm-rg350-5658e71f4d7c2245098316434db2f239871e9f05.tar.bz2
scummvm-rg350-5658e71f4d7c2245098316434db2f239871e9f05.zip
Added support for DXA cutscenes, while still retaining support for the old MPEG
cutscenes and the "dummy" (subtitles and voice-over) mode. Several tweaks and cleanups were made in this process, and there may very well be regressions, but it should be stable enough to commit. svn-id: r23420
Diffstat (limited to 'engines/sword2/function.cpp')
-rw-r--r--engines/sword2/function.cpp14
1 files changed, 5 insertions, 9 deletions
diff --git a/engines/sword2/function.cpp b/engines/sword2/function.cpp
index b35325f9f9..a186fb9266 100644
--- a/engines/sword2/function.cpp
+++ b/engines/sword2/function.cpp
@@ -2131,17 +2131,13 @@ int32 Logic::fnPlaySequence(int32 *params) {
// pause sfx during sequence
_vm->_sound->pauseFx();
- MoviePlayer player(_vm);
- uint32 rv;
+ MoviePlayer *player = makeMoviePlayer(_vm, filename);
- if (_sequenceTextLines && !readVar(DEMO))
- rv = player.play(filename, sequenceSpeechArray, _smackerLeadIn, _smackerLeadOut);
- else
- rv = player.play(filename, NULL, _smackerLeadIn, _smackerLeadOut);
+ if (player->load(filename, (_sequenceTextLines && !readVar(DEMO)) ? sequenceSpeechArray : NULL)) {
+ player->play(_smackerLeadIn, _smackerLeadOut);
+ }
- // check the error return-value
- if (rv)
- debug(5, "MoviePlayer.play(\"%s\") returned 0x%.8x", filename, rv);
+ delete player;
// unpause sound fx again, in case we're staying in same location
_vm->_sound->unpauseFx();