aboutsummaryrefslogtreecommitdiff
path: root/engines/zvision/zvision.h
diff options
context:
space:
mode:
authorrichiesams2013-08-04 23:10:27 -0500
committerrichiesams2013-08-04 23:52:31 -0500
commit7b9858d6b45ad4c02729445975518a48292c3658 (patch)
treebf16bfbb81d4614ff10d4fd6ec2ce5a4e0211d69 /engines/zvision/zvision.h
parenta86a0832e08c777ef23f2ce97004963b301dd598 (diff)
downloadscummvm-rg350-7b9858d6b45ad4c02729445975518a48292c3658.tar.gz
scummvm-rg350-7b9858d6b45ad4c02729445975518a48292c3658.tar.bz2
scummvm-rg350-7b9858d6b45ad4c02729445975518a48292c3658.zip
ZVISION: Make video code blocking.
The script system requires that all ResultAction::execute() block until they finish. The video system *was* 'asyncronous' in that you would just start a video and then run() would finish processing it. This code forces the video to complely finish before playVideo returns. The Clock object is used to keep track of deltaTime while the video is playing.
Diffstat (limited to 'engines/zvision/zvision.h')
-rw-r--r--engines/zvision/zvision.h22
1 files changed, 20 insertions, 2 deletions
diff --git a/engines/zvision/zvision.h b/engines/zvision/zvision.h
index 9588623f56..459096a03b 100644
--- a/engines/zvision/zvision.h
+++ b/engines/zvision/zvision.h
@@ -29,16 +29,24 @@
#include "engines/engine.h"
+#include "graphics/pixelformat.h"
+
#include "zvision/detection.h"
#include "gui/debugger.h"
-
+
+
+namespace Video {
+class VideoDecoder;
+}
+
namespace ZVision {
struct ZVisionGameDescription;
class Console;
class ScriptManager;
class RenderManager;
+class Clock;
// our engine debug channels
enum {
@@ -58,25 +66,35 @@ private:
const ZVisionGameDescription *_gameDescription;
const int _width;
const int _height;
+ const Graphics::PixelFormat _pixelFormat;
+
+ const uint _desiredFrameTime;
// We need random numbers
Common::RandomSource *_rnd;
+
// Managers
ScriptManager *_scriptManager;
RenderManager *_renderManager;
+ // Clock
+ Clock *_clock;
+
// To prevent allocation every time we process events
Common::Event _event;
public:
uint32 getFeatures() const;
Common::Language getLanguage() const;
- virtual Common::Error run();
+ Common::Error run();
+
ScriptManager *getScriptManager() const;
RenderManager *getRenderManager() const;
Common::RandomSource *getRandomSource() const;
ZVisionGameId getGameId() const;
+ void playVideo(Video::VideoDecoder &videoDecoder);
+
private:
void initialize();