diff options
author | Peter Kohaut | 2019-01-22 18:59:42 +0100 |
---|---|---|
committer | Peter Kohaut | 2019-01-22 19:00:31 +0100 |
commit | 0a9ad229a89a04b2fe437597584684f43479ca14 (patch) | |
tree | eb3e77b5387207195c71a19be6e0306cc0317acb /engines/bladerunner | |
parent | c59dd85ebc42b2133ff98bc9411313a1466f1334 (diff) | |
download | scummvm-rg350-0a9ad229a89a04b2fe437597584684f43479ca14.tar.gz scummvm-rg350-0a9ad229a89a04b2fe437597584684f43479ca14.tar.bz2 scummvm-rg350-0a9ad229a89a04b2fe437597584684f43479ca14.zip |
BLADERUNNER: Fixed outtake player
In some scenes, background video got corrupted as outtake was rendered
into a wrong surface.
Diffstat (limited to 'engines/bladerunner')
-rw-r--r-- | engines/bladerunner/outtake.cpp | 18 | ||||
-rw-r--r-- | engines/bladerunner/outtake.h | 6 |
2 files changed, 18 insertions, 6 deletions
diff --git a/engines/bladerunner/outtake.cpp b/engines/bladerunner/outtake.cpp index 4698a83399..fc610b20e9 100644 --- a/engines/bladerunner/outtake.cpp +++ b/engines/bladerunner/outtake.cpp @@ -32,6 +32,15 @@ namespace BladeRunner { +OuttakePlayer::OuttakePlayer(BladeRunnerEngine *vm) { + _vm = vm; + _surfaceVideo.create(_vm->_surfaceBack.w, _vm->_surfaceBack.h, createRGB555()); +} + +OuttakePlayer::~OuttakePlayer() { + _surfaceVideo.free(); +} + void OuttakePlayer::play(const Common::String &name, bool noLocalization, int container) { if (container > 0) { debug("OuttakePlayer::play TODO"); @@ -45,7 +54,7 @@ void OuttakePlayer::play(const Common::String &name, bool noLocalization, int co Common::String resNameNoVQASuffix = resName; resName = resName + ".VQA"; - VQAPlayer vqa_player(_vm, &_vm->_surfaceBack, resName); // surfaceBack is needed here for subtitles rendering properly, original was _surfaceFront here + VQAPlayer vqa_player(_vm, &_surfaceVideo, resName); // in original game _surfaceFront is used here, but for proper subtitles rendering we need separate surface vqa_player.open(); @@ -57,9 +66,10 @@ void OuttakePlayer::play(const Common::String &name, bool noLocalization, int co return; int frame = vqa_player.update(); - blit(_vm->_surfaceBack, _vm->_surfaceFront); // This helps to make subtitles disappear properly, if the video is rendered in surface back and then pushed to the front surface - if (frame == -3) + blit(_surfaceVideo, _vm->_surfaceFront); // This helps to make subtitles disappear properly, if the video is rendered in separate surface and then pushed to the front surface + if (frame == -3) { // end of video break; + } if (frame >= 0) { _vm->_subtitles->getOuttakeSubsText(resNameNoVQASuffix, frame); @@ -69,6 +79,8 @@ void OuttakePlayer::play(const Common::String &name, bool noLocalization, int co _vm->_system->delayMillis(10); } + + // TODO: scene video is played fast after end of outtake, fix it (visible in tb07) } } // End of namespace BladeRunner diff --git a/engines/bladerunner/outtake.h b/engines/bladerunner/outtake.h index 8386965fdf..32b6690ba8 100644 --- a/engines/bladerunner/outtake.h +++ b/engines/bladerunner/outtake.h @@ -33,11 +33,11 @@ class BladeRunnerEngine; class OuttakePlayer { BladeRunnerEngine *_vm; + Graphics::Surface _surfaceVideo; public: - OuttakePlayer(BladeRunnerEngine *vm) { - _vm = vm; - } + OuttakePlayer(BladeRunnerEngine *vm); + ~OuttakePlayer(); void play(const Common::String &name, bool noLocalization, int container); }; |