diff options
author | richiesams | 2013-08-14 12:04:13 -0500 |
---|---|---|
committer | richiesams | 2013-08-14 12:04:13 -0500 |
commit | 4e827b4dda458813dce650545b6f9fb923c514f4 (patch) | |
tree | cb5189c3c4ceae842b358b88d3ea93f5126adb2f /engines/zvision/zvision.h | |
parent | 9b8bad3c834ebb4287305d86cdb991f565738814 (diff) | |
download | scummvm-rg350-4e827b4dda458813dce650545b6f9fb923c514f4.tar.gz scummvm-rg350-4e827b4dda458813dce650545b6f9fb923c514f4.tar.bz2 scummvm-rg350-4e827b4dda458813dce650545b6f9fb923c514f4.zip |
ZVISION: Add documentation
Diffstat (limited to 'engines/zvision/zvision.h')
-rw-r--r-- | engines/zvision/zvision.h | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/engines/zvision/zvision.h b/engines/zvision/zvision.h index ca710804b0..58812d4d11 100644 --- a/engines/zvision/zvision.h +++ b/engines/zvision/zvision.h @@ -76,6 +76,11 @@ private: Console *_console; const ZVisionGameDescription *_gameDescription; + /** + * A Rectangle centered inside the actual window. All in-game coordinates + * are given in this coordinate space. Also, all images are clipped to the + * edges of this Rectangle + */ const Common::Rect _workingWindow; const Graphics::PixelFormat _pixelFormat; @@ -110,17 +115,40 @@ public: Common::RandomSource *getRandomSource() const; ZVisionGameId getGameId() const; + /** + * Play a video until it is finished. This is a blocking call. It will call + * _clock.stop() when the video starts and _clock.start() when the video finishes. + * It will also consume all events during video playback. + * + * @param videoDecoder The video to play + * @param destRect Where to put the video. (In working window coords) + * @param skippable If true, the video can be skipped at any time using [Spacebar] + */ void playVideo(Video::VideoDecoder &videoDecoder, const Common::Rect &destRect = Common::Rect(0, 0, 0, 0), bool skippable = true); + /** + * Register a MouseEvent with the event system. These will be checked at every + * MOUSE_UP, MOUSE_DOWN, MOUSE_MOVE, etc. + * + * @param event The event to register + */ void registerMouseEvent(const MouseEvent &event); + /** Remove all MouseEvents from the event system */ void clearAllMouseEvents(); + /** + * Utility method to cycle through all the cursors in the game. After + * calling, use Left and Right arrows to cycle. Esc to quit. This is a + * blocking function call. + */ void cycleThroughCursors(); private: void initialize(); + /** Called every frame from ZVision::run() to process any events from EventMan */ void processEvents(); + void onMouseDown(const Common::Point &pos); void onMouseUp(const Common::Point &pos); void onMouseMove(const Common::Point &pos); |