[Scummvm-cvs-logs] SF.net SVN: scummvm:[35741] scummvm/trunk

thebluegr at users.sourceforge.net thebluegr at users.sourceforge.net
Mon Jan 5 16:10:13 CET 2009


Revision: 35741
          http://scummvm.svn.sourceforge.net/scummvm/?rev=35741&view=rev
Author:   thebluegr
Date:     2009-01-05 15:10:13 +0000 (Mon, 05 Jan 2009)

Log Message:
-----------
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

Modified Paths:
--------------
    scummvm/trunk/engines/tucker/sequences.cpp
    scummvm/trunk/graphics/video/flic_player.cpp
    scummvm/trunk/graphics/video/flic_player.h

Modified: scummvm/trunk/engines/tucker/sequences.cpp
===================================================================
--- scummvm/trunk/engines/tucker/sequences.cpp	2009-01-05 15:05:12 UTC (rev 35740)
+++ scummvm/trunk/engines/tucker/sequences.cpp	2009-01-05 15:10:13 UTC (rev 35741)
@@ -896,7 +896,7 @@
 		_seqNum = 1;
 		return;
 	}
-	_flicPlayer[index].decodeFrame();
+	_flicPlayer[index].decodeNextFrame();
 	if (index == 0) {
 		memcpy(_animationPalette, _flicPlayer[index].getPalette(), 1024);
 		memcpy(_offscreenBuffer, _flicPlayer[index].getOffscreen(), kScreenWidth * kScreenHeight);
@@ -904,7 +904,7 @@
 }
 
 void AnimationSequencePlayer::decodeNextAnimationFrame(int index) {
-	_flicPlayer[index].decodeFrame();
+	_flicPlayer[index].decodeNextFrame();
 	memcpy(_offscreenBuffer, _flicPlayer[index].getOffscreen(), kScreenWidth * kScreenHeight);
 	if (index == 0) {
 		if (_flicPlayer[index].isPaletteDirty()) {
@@ -940,12 +940,12 @@
 		_newSeq = false;
 	}
 	if (_flicPlayer[0].getCurFrame() >= 116) {
-		_flicPlayer[1].decodeFrame();
+		_flicPlayer[1].decodeNextFrame();
 		if (_flicPlayer[1].isLastFrame()) {
 			_flicPlayer[1].reset();
 		}
 	}
-	_flicPlayer[0].decodeFrame();
+	_flicPlayer[0].decodeNextFrame();
 	const uint8 *t = _flicPlayer[1].getOffscreen();
 	for (int i = 0; i < 64000; ++i) {
 		const uint8 color = _flicPlayer[0].getOffscreen()[i];

Modified: scummvm/trunk/graphics/video/flic_player.cpp
===================================================================
--- scummvm/trunk/graphics/video/flic_player.cpp	2009-01-05 15:05:12 UTC (rev 35740)
+++ scummvm/trunk/graphics/video/flic_player.cpp	2009-01-05 15:10:13 UTC (rev 35741)
@@ -190,7 +190,7 @@
 #define PSTAMP     18
 #define FRAME_TYPE 0xF1FA
 
-void FlicPlayer::decodeFrame() {
+void FlicPlayer::decodeNextFrame() {
 	FrameTypeChunkHeader frameHeader;
 
 	// Read chunk

Modified: scummvm/trunk/graphics/video/flic_player.h
===================================================================
--- scummvm/trunk/graphics/video/flic_player.h	2009-01-05 15:05:12 UTC (rev 35740)
+++ scummvm/trunk/graphics/video/flic_player.h	2009-01-05 15:10:13 UTC (rev 35741)
@@ -63,14 +63,46 @@
 	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; }


This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.




More information about the Scummvm-git-logs mailing list