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

Kirben at users.sourceforge.net Kirben at users.sourceforge.net
Mon Dec 15 06:05:02 CET 2008


Revision: 35374
          http://scummvm.svn.sourceforge.net/scummvm/?rev=35374&view=rev
Author:   Kirben
Date:     2008-12-15 05:05:01 +0000 (Mon, 15 Dec 2008)

Log Message:
-----------
Adjust return values for HE games, when loading video file fails.

Modified Paths:
--------------
    scummvm/trunk/graphics/smk_player.cpp
    scummvm/trunk/graphics/smk_player.h

Modified: scummvm/trunk/graphics/smk_player.cpp
===================================================================
--- scummvm/trunk/graphics/smk_player.cpp	2008-12-15 02:16:45 UTC (rev 35373)
+++ scummvm/trunk/graphics/smk_player.cpp	2008-12-15 05:05:01 UTC (rev 35374)
@@ -319,6 +319,36 @@
 	closeFile();
 }
 
+int SMKPlayer::getWidth() {
+	if (!_fileStream)
+		return 0;
+	return _header.width;
+}
+
+int SMKPlayer::getHeight() {
+	if (!_fileStream)
+		return 0;
+	return (_header.flags ? 2 : 1) * _header.height;
+}
+
+int32 SMKPlayer::getCurFrame() {
+	if (!_fileStream)
+		return -1;
+	return _currentSMKFrame;
+}
+
+int32 SMKPlayer::getFrameCount() {
+	if (!_fileStream)
+		return 0;
+	return _framesCount;
+}
+
+int32 SMKPlayer::getFrameRate() {
+	if (!_fileStream)
+		return 0;
+	return _header.frameRate;
+}
+
 bool SMKPlayer::loadFile(const char *fileName) {
 	closeFile();
 

Modified: scummvm/trunk/graphics/smk_player.h
===================================================================
--- scummvm/trunk/graphics/smk_player.h	2008-12-15 02:16:45 UTC (rev 35373)
+++ scummvm/trunk/graphics/smk_player.h	2008-12-15 05:05:01 UTC (rev 35374)
@@ -58,31 +58,31 @@
 	 * Returns the width of the video
 	 * @return the width of the video
 	 */
-	uint getWidth() { return _header.width; }
+	int getWidth();
 
 	/**
 	 * Returns the height of the video
 	 * @return the height of the video
 	 */
-	uint getHeight() { return (_header.flags ? 2 : 1) * _header.height; }
+	int getHeight();
 
 	/**
 	 * Returns the current frame number of the video
 	 * @return the current frame number of the video
 	 */
-	uint32 getCurFrame() { return _currentSMKFrame; }
+	int32 getCurFrame();
 
 	/**
 	 * Returns the amount of frames in the video
 	 * @return the amount of frames in the video
 	 */
-	uint32 getFrameCount() { return _framesCount; }
+	int32 getFrameCount();
 
 	/**
 	 * Returns the frame rate of the video
 	 * @return the frame rate of the video
 	 */
-	int32 getFrameRate() { return _header.frameRate; }
+	int32 getFrameRate();
 
 	/**
 	 * Load an SMK encoded video file


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