aboutsummaryrefslogtreecommitdiff
path: root/engines/sword2
diff options
context:
space:
mode:
authorMatthew Hoops2012-07-23 21:04:51 -0400
committerMatthew Hoops2012-07-23 21:04:51 -0400
commita652f6669e2e9225aee17431784b433397b41ae3 (patch)
tree9b3c000e20ab019f5927132025868ca898877b2f /engines/sword2
parent3a780a63db79c2a1b2527e6510182a74f6fcfe12 (diff)
downloadscummvm-rg350-a652f6669e2e9225aee17431784b433397b41ae3.tar.gz
scummvm-rg350-a652f6669e2e9225aee17431784b433397b41ae3.tar.bz2
scummvm-rg350-a652f6669e2e9225aee17431784b433397b41ae3.zip
VIDEO: Rewrite SmackerDecoder to use the new API
Diffstat (limited to 'engines/sword2')
-rw-r--r--engines/sword2/animation.cpp9
1 files changed, 8 insertions, 1 deletions
diff --git a/engines/sword2/animation.cpp b/engines/sword2/animation.cpp
index c1cf33ff09..e257ec9029 100644
--- a/engines/sword2/animation.cpp
+++ b/engines/sword2/animation.cpp
@@ -89,6 +89,13 @@ bool MoviePlayer::load(const char *name) {
break;
case kVideoDecoderSMK:
filename = Common::String::format("%s.smk", name);
+
+ if (_decoder->loadFile(filename)) {
+ ((Video::AdvancedVideoDecoder *)_decoder)->start(); // TODO: Remove after new API is complete
+ return true;
+ } else {
+ return false;
+ }
break;
case kVideoDecoderPSX:
filename = Common::String::format("%s.str", name);
@@ -442,7 +449,7 @@ MoviePlayer *makeMoviePlayer(const char *name, Sword2Engine *vm, Audio::Mixer *s
filename = Common::String::format("%s.smk", name);
if (Common::File::exists(filename)) {
- Video::SmackerDecoder *smkDecoder = new Video::SmackerDecoder(snd);
+ Video::SmackerDecoder *smkDecoder = new Video::SmackerDecoder();
return new MoviePlayer(vm, snd, system, bgSoundHandle, smkDecoder, kVideoDecoderSMK);
}