From 7f9ea7e35c907d44ce84e990b1b3258e214fac91 Mon Sep 17 00:00:00 2001 From: Filippos Karapetis Date: Mon, 5 Jan 2009 15:10:13 +0000 Subject: Added Doxygen-like comments to the FLIC player, and changed it a bit to have similar method names as the DXA and Smacker players. Also, removed the convenience method hasFrames(), as it's the same as getFrameCount() > 0 svn-id: r35741 --- graphics/video/flic_player.cpp | 2 +- graphics/video/flic_player.h | 40 ++++++++++++++++++++++++++++++++++++---- 2 files changed, 37 insertions(+), 5 deletions(-) (limited to 'graphics/video') diff --git a/graphics/video/flic_player.cpp b/graphics/video/flic_player.cpp index d4a8ede4f8..e07c815390 100644 --- a/graphics/video/flic_player.cpp +++ b/graphics/video/flic_player.cpp @@ -190,7 +190,7 @@ void FlicPlayer::decodeDeltaFLC(uint8 *data) { #define PSTAMP 18 #define FRAME_TYPE 0xF1FA -void FlicPlayer::decodeFrame() { +void FlicPlayer::decodeNextFrame() { FrameTypeChunkHeader frameHeader; // Read chunk diff --git a/graphics/video/flic_player.h b/graphics/video/flic_player.h index ef2b6d67ba..c453bf91c5 100644 --- a/graphics/video/flic_player.h +++ b/graphics/video/flic_player.h @@ -63,14 +63,46 @@ public: FlicPlayer(); ~FlicPlayer(); - bool loadFile(const char *fileName); - void closeFile(); - void decodeFrame(); + /** + * Returns the width of the video + * @return the width of the video + */ int getWidth() const { return _flicInfo.width; } + + /** + * Returns the height of the video + * @return the height of the video + */ int getHeight() const { return _flicInfo.height; } - bool hasFrames() const { return _flicInfo.numFrames > 0; } + + /** + * Returns the current frame number of the video + * @return the current frame number of the video + */ int getCurFrame() const { return _currFrame; } + + /** + * Returns the amount of frames in the video + * @return the amount of frames in the video + */ int getFrameCount() const { return _flicInfo.numFrames; } + + /** + * Load a FLIC encoded video file + * @param filename the filename to load + */ + bool loadFile(const char *fileName); + + /** + * Close a FLIC encoded video file + */ + void closeFile(); + + /** + * Decode the next frame + */ + void decodeNextFrame(); + bool isLastFrame() const { return _currFrame == _flicInfo.numFrames; } uint32 getSpeed() const { return _flicInfo.speed; } bool isPaletteDirty() const { return _paletteDirty; } -- cgit v1.2.3