aboutsummaryrefslogtreecommitdiff
path: root/engines/saga
diff options
context:
space:
mode:
authorFilippos Karapetis2009-10-16 07:42:23 +0000
committerFilippos Karapetis2009-10-16 07:42:23 +0000
commit422b732dbadde0b23aaec05b39edec9e1c81f91e (patch)
tree80ce8d6063e6e60cd4e273210ac5bf9d66e56136 /engines/saga
parent9934b70733f3322e1136d805f927fb0f628d1dfc (diff)
downloadscummvm-rg350-422b732dbadde0b23aaec05b39edec9e1c81f91e.tar.gz
scummvm-rg350-422b732dbadde0b23aaec05b39edec9e1c81f91e.tar.bz2
scummvm-rg350-422b732dbadde0b23aaec05b39edec9e1c81f91e.zip
Added a new convenience method to the video player, which adds the event of skipping videos with the escape key by default, thereby simplifying the video playing code in all places where it's used
svn-id: r45151
Diffstat (limited to 'engines/saga')
-rw-r--r--engines/saga/introproc_saga2.cpp33
1 files changed, 4 insertions, 29 deletions
diff --git a/engines/saga/introproc_saga2.cpp b/engines/saga/introproc_saga2.cpp
index 81a60e17e5..0af31dae61 100644
--- a/engines/saga/introproc_saga2.cpp
+++ b/engines/saga/introproc_saga2.cpp
@@ -35,27 +35,15 @@
#include "graphics/surface.h"
#include "graphics/video/smk_decoder.h"
-#include "common/events.h"
-#include "common/system.h"
-#include "common/list.h"
-
namespace Saga {
-Common::List<Common::Event> stopEvents;
-
int Scene::DinoStartProc() {
_vm->_gfx->showCursor(false);
- Common::Event stopEvent;
- stopEvents.clear();
- stopEvent.type = Common::EVENT_KEYDOWN;
- stopEvent.kbd = Common::KEYCODE_ESCAPE;
- stopEvents.push_back(stopEvent);
-
Graphics::SmackerDecoder *smkDecoder = new Graphics::SmackerDecoder(_vm->_mixer);
Graphics::VideoPlayer *player = new Graphics::VideoPlayer(smkDecoder);
if (smkDecoder->loadFile("testvid.smk"))
- player->playVideo(stopEvents); // Play introduction
+ player->playVideo(); // Play introduction
smkDecoder->closeFile();
delete player;
delete smkDecoder;
@@ -69,19 +57,13 @@ int Scene::DinoStartProc() {
int Scene::FTA2StartProc() {
_vm->_gfx->showCursor(false);
- Common::Event stopEvent;
- stopEvents.clear();
- stopEvent.type = Common::EVENT_KEYDOWN;
- stopEvent.kbd = Common::KEYCODE_ESCAPE;
- stopEvents.push_back(stopEvent);
-
Graphics::SmackerDecoder *smkDecoder = new Graphics::SmackerDecoder(_vm->_mixer);
Graphics::VideoPlayer *player = new Graphics::VideoPlayer(smkDecoder);
if (smkDecoder->loadFile("trimark.smk"))
- player->playVideo(stopEvents); // Show Ignite logo
+ player->playVideo(); // Show Ignite logo
smkDecoder->closeFile();
if (smkDecoder->loadFile("intro.smk"))
- player->playVideo(stopEvents); // Play introduction
+ player->playVideo(); // Play introduction
smkDecoder->closeFile();
delete player;
delete smkDecoder;
@@ -117,18 +99,11 @@ int Scene::FTA2EndProc(FTA2Endings whichEnding) {
_vm->_gfx->showCursor(false);
-
- Common::Event stopEvent;
- stopEvents.clear();
- stopEvent.type = Common::EVENT_KEYDOWN;
- stopEvent.kbd = Common::KEYCODE_ESCAPE;
- stopEvents.push_back(stopEvent);
-
// Play ending
Graphics::SmackerDecoder *smkDecoder = new Graphics::SmackerDecoder(_vm->_mixer);
Graphics::VideoPlayer *player = new Graphics::VideoPlayer(smkDecoder);
if (smkDecoder->loadFile(videoName)) {
- player->playVideo(stopEvents);
+ player->playVideo();
smkDecoder->closeFile();
}
delete player;