From 0b4dd7c4593587355c1965eb0d266040c83f0382 Mon Sep 17 00:00:00 2001 From: Filippos Karapetis Date: Sun, 11 Jan 2009 03:34:50 +0000 Subject: Committed a modified version of wjp's patch for the video player: - Split the video player from the video decoders. It's now possible to have one video player for multiple decoders - Added the palette weight calculation from the BS1 engine into VideoPlayer::setPalette. It's now possible to find the values of the white and black colors via getWhite() and getBlack() (useful for subtitle overlays) - Adapted FTA2's movie playing code to the new changes to video player - Fixed a slight bug in the DXA decoder (_videoinfo.startTime was not initialized) svn-id: r35816 --- engines/saga/introproc_fta2.cpp | 27 +++++++++++++++++++-------- 1 file changed, 19 insertions(+), 8 deletions(-) (limited to 'engines') diff --git a/engines/saga/introproc_fta2.cpp b/engines/saga/introproc_fta2.cpp index 8d2e73b7a6..f8c61a8568 100644 --- a/engines/saga/introproc_fta2.cpp +++ b/engines/saga/introproc_fta2.cpp @@ -52,10 +52,16 @@ int Scene::FTA2StartProc() { stopEvent.kbd = Common::KEYCODE_ESCAPE; stopEvents.push_back(stopEvent); - Graphics::SMKPlayer *smkPlayer = new Graphics::SMKPlayer(_vm->_mixer); - smkPlayer->playVideo("trimark.smk", &stopEvents); // Show Ignite logo - smkPlayer->playVideo("intro.smk", &stopEvents); // Play introduction - delete smkPlayer; + Graphics::SMKPlayer *smkDecoder = new Graphics::SMKPlayer(_vm->_mixer); + Graphics::VideoPlayer *player = new Graphics::VideoPlayer(smkDecoder); + if (smkDecoder->loadFile("trimark.smk")) + player->playVideo(&stopEvents); // Show Ignite logo + smkDecoder->closeFile(); + if (smkDecoder->loadFile("intro.smk")) + player->playVideo(&stopEvents); // Play introduction + smkDecoder->closeFile(); + delete player; + delete smkDecoder; // HACK: Forcibly quit here _vm->quitGame(); @@ -96,13 +102,18 @@ int Scene::FTA2EndProc(FTA2Endings whichEnding) { stopEvents.push_back(stopEvent); // Play ending - Graphics::SMKPlayer *smkPlayer = new Graphics::SMKPlayer(_vm->_mixer); - smkPlayer->playVideo(videoName, &stopEvents); - delete smkPlayer; + Graphics::SMKPlayer *smkDecoder = new Graphics::SMKPlayer(_vm->_mixer); + Graphics::VideoPlayer *player = new Graphics::VideoPlayer(smkDecoder); + if (smkDecoder->loadFile(videoName)) { + player->playVideo(&stopEvents); + smkDecoder->closeFile(); + } + delete player; + delete smkDecoder; return SUCCESS; } } // End of namespace Saga -#endif \ No newline at end of file +#endif -- cgit v1.2.3