aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTravis Howell2008-12-15 13:10:08 +0000
committerTravis Howell2008-12-15 13:10:08 +0000
commitb4e542e37f6505cbaa1910563a36725328396767 (patch)
tree147b699b7e11a3a49eaf882adf7244fa0694f068
parent319795565e482012f56aa5fad5b9f6d35835ecb5 (diff)
downloadscummvm-rg350-b4e542e37f6505cbaa1910563a36725328396767.tar.gz
scummvm-rg350-b4e542e37f6505cbaa1910563a36725328396767.tar.bz2
scummvm-rg350-b4e542e37f6505cbaa1910563a36725328396767.zip
Mirror last Smacker changes.
svn-id: r35383
-rw-r--r--graphics/dxa_player.cpp14
-rw-r--r--graphics/dxa_player.h6
2 files changed, 8 insertions, 12 deletions
diff --git a/graphics/dxa_player.cpp b/graphics/dxa_player.cpp
index b0c3f498d7..39c966a258 100644
--- a/graphics/dxa_player.cpp
+++ b/graphics/dxa_player.cpp
@@ -24,7 +24,7 @@
*/
#include "common/endian.h"
-#include "common/file.h"
+#include "common/archive.h"
#include "graphics/dxa_player.h"
#include "common/util.h"
@@ -89,17 +89,13 @@ int DXAPlayer::getFrameCount() {
return _framesCount;
}
-bool DXAPlayer::loadFile(const char *filename) {
+bool DXAPlayer::loadFile(const char *fileName) {
uint32 tag;
int32 frameRate;
- Common::File *file = new Common::File();
- if (!file->open(filename)) {
- delete file;
- return 0;
- }
-
- _fileStream = file;
+ _fileStream = SearchMan.openFile(fileName);
+ if (!_fileStream)
+ return false;
tag = _fileStream->readUint32BE();
assert(tag == MKID_BE('DEXA'));
diff --git a/graphics/dxa_player.h b/graphics/dxa_player.h
index 27f4752d6a..4eec9d93bf 100644
--- a/graphics/dxa_player.h
+++ b/graphics/dxa_player.h
@@ -61,8 +61,6 @@ public:
DXAPlayer();
virtual ~DXAPlayer();
- Common::SeekableReadStream *_fileStream;
-
/**
* Returns the width of the video
* @return the width of the video
@@ -91,7 +89,7 @@ public:
* Load a DXA encoded video file
* @param filename the filename to load
*/
- bool loadFile(const char *filename);
+ bool loadFile(const char *fileName);
/**
* Close a DXA encoded video file
@@ -123,6 +121,8 @@ protected:
void decodeZlib(byte *data, int size, int totalSize);
void decode12(int size);
void decode13(int size);
+
+ Common::SeekableReadStream *_fileStream;
};
} // End of namespace Graphics