aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMax Horn2008-12-15 12:55:57 +0000
committerMax Horn2008-12-15 12:55:57 +0000
commit319795565e482012f56aa5fad5b9f6d35835ecb5 (patch)
treee90ba2b7e95ef400fe30785ade27eb159d94b567
parentea3d4fe22d30e4f3c089a9593be501ba2b4bc7fa (diff)
downloadscummvm-rg350-319795565e482012f56aa5fad5b9f6d35835ecb5.tar.gz
scummvm-rg350-319795565e482012f56aa5fad5b9f6d35835ecb5.tar.bz2
scummvm-rg350-319795565e482012f56aa5fad5b9f6d35835ecb5.zip
SMK player: do not include headers that are not needed, do not expose internal _fileStream for no apparent reason
svn-id: r35382
-rw-r--r--graphics/smk_player.cpp12
-rw-r--r--graphics/smk_player.h13
2 files changed, 8 insertions, 17 deletions
diff --git a/graphics/smk_player.cpp b/graphics/smk_player.cpp
index ef206e12d7..e980e0abed 100644
--- a/graphics/smk_player.cpp
+++ b/graphics/smk_player.cpp
@@ -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 @@ uint32 BigHuffmanTree::getCode(BitStream &bs) {
}
SMKPlayer::SMKPlayer()
- : _currentSMKFrame(0),_fileStream(0) {
+ : _currentSMKFrame(0), _fileStream(0) {
}
SMKPlayer::~SMKPlayer() {
@@ -352,13 +352,9 @@ int32 SMKPlayer::getFrameRate() {
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;
diff --git a/graphics/smk_player.h b/graphics/smk_player.h
index 11caa25d43..44294f1bf9 100644
--- a/graphics/smk_player.h
+++ b/graphics/smk_player.h
@@ -31,11 +31,7 @@
#define GRAPHICS_SMK_PLAYER_H
#include "common/scummsys.h"
-#include "common/file.h"
-
-namespace Common {
- class File;
-}
+#include "common/stream.h"
class OSystem;
@@ -43,17 +39,14 @@ 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 @@ protected:
uint16 _framesCount;
+ Common::SeekableReadStream *_fileStream;
+
private:
void unpackPalette();