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

fingolfin at users.sourceforge.net fingolfin at users.sourceforge.net
Mon Dec 15 13:55:57 CET 2008


Revision: 35382
          http://scummvm.svn.sourceforge.net/scummvm/?rev=35382&view=rev
Author:   fingolfin
Date:     2008-12-15 12:55:57 +0000 (Mon, 15 Dec 2008)

Log Message:
-----------
SMK player: do not include headers that are not needed, do not expose internal _fileStream for no apparent reason

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 12:55:13 UTC (rev 35381)
+++ scummvm/trunk/graphics/smk_player.cpp	2008-12-15 12:55:57 UTC (rev 35382)
@@ -28,7 +28,7 @@
 // http://svn.ffmpeg.org/ffmpeg/trunk/libavcodec/smacker.c?revision=15884&view=markup
 
 #include "graphics/smk_player.h"
-#include "common/file.h"
+#include "common/archive.h"
 #include "common/system.h"
 #include "common/util.h"
 #include "common/array.h"
@@ -312,7 +312,7 @@
 }
 
 SMKPlayer::SMKPlayer()
-	: _currentSMKFrame(0),_fileStream(0) {
+	: _currentSMKFrame(0), _fileStream(0) {
 }
 
 SMKPlayer::~SMKPlayer() {
@@ -352,14 +352,10 @@
 bool SMKPlayer::loadFile(const char *fileName) {
 	closeFile();
 
-	Common::File *file = new Common::File();
-	if (!file->open(fileName)) {
-		delete file;
+	_fileStream = SearchMan.openFile(fileName);
+	if (!_fileStream)
 		return false;
-	}
 
-	_fileStream = file;
-
 	// Seek to the first frame
 	_currentSMKFrame = 0;
 	_header.signature = _fileStream->readUint32BE();

Modified: scummvm/trunk/graphics/smk_player.h
===================================================================
--- scummvm/trunk/graphics/smk_player.h	2008-12-15 12:55:13 UTC (rev 35381)
+++ scummvm/trunk/graphics/smk_player.h	2008-12-15 12:55:57 UTC (rev 35382)
@@ -31,29 +31,22 @@
 #define GRAPHICS_SMK_PLAYER_H
 
 #include "common/scummsys.h"
-#include "common/file.h"
+#include "common/stream.h"
 
-namespace Common {
-	class File;
-}
-
 class OSystem;
 
 namespace Graphics {
 
 class BigHuffmanTree;
 
-/*
+/**
  * Implementation of a Smacker v2/v4 video decoder
  */
-
 class SMKPlayer {
 public:
 	SMKPlayer();
 	virtual ~SMKPlayer();
 
-	Common::SeekableReadStream *_fileStream;
-
 	/**
 	 * Returns the width of the video
 	 * @return the width of the video
@@ -123,6 +116,8 @@
 
 	uint16 _framesCount;
 
+	Common::SeekableReadStream *_fileStream;
+
 private:
 	void unpackPalette();
 


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