aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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();