aboutsummaryrefslogtreecommitdiff
path: root/engines/sci/engine
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/sci/engine
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/sci/engine')
-rw-r--r--engines/sci/engine/kgraphics.cpp11
1 files changed, 1 insertions, 10 deletions
diff --git a/engines/sci/engine/kgraphics.cpp b/engines/sci/engine/kgraphics.cpp
index c8782eb933..e899c22466 100644
--- a/engines/sci/engine/kgraphics.cpp
+++ b/engines/sci/engine/kgraphics.cpp
@@ -23,8 +23,6 @@
*
*/
-#include "common/system.h"
-#include "common/events.h"
#include "graphics/cursorman.h"
#include "graphics/video/avi_player.h"
#include "graphics/surface.h"
@@ -1060,17 +1058,10 @@ static reg_t kShowMovie_DOS(EngineState *s, int argc, reg_t *argv) {
Common::String filename = s->_segMan->getString(argv[0]);
int delay = argv[1].toUint16(); // Time between frames in ticks
- Common::Event stopEvent;
- Common::List<Common::Event> stopEvents;
- stopEvents.clear();
- stopEvent.type = Common::EVENT_KEYDOWN;
- stopEvent.kbd = Common::KEYCODE_ESCAPE;
- stopEvents.push_back(stopEvent);
-
Graphics::SeqDecoder *seqDecoder = new Graphics::SeqDecoder();
Graphics::VideoPlayer *player = new Graphics::VideoPlayer(seqDecoder);
if (seqDecoder->loadFile(filename.c_str(), delay))
- player->playVideo(stopEvents);
+ player->playVideo();
else
warning("Failed to open movie file %s", filename.c_str());
seqDecoder->closeFile();