diff options
Diffstat (limited to 'engines/wintermute/base')
-rw-r--r-- | engines/wintermute/base/base_file_manager.cpp | 2 | ||||
-rw-r--r-- | engines/wintermute/base/file/base_package.cpp | 9 | ||||
-rw-r--r-- | engines/wintermute/base/file/base_package.h | 13 |
3 files changed, 12 insertions, 12 deletions
diff --git a/engines/wintermute/base/base_file_manager.cpp b/engines/wintermute/base/base_file_manager.cpp index 0a59a3b134..2fd5521e37 100644 --- a/engines/wintermute/base/base_file_manager.cpp +++ b/engines/wintermute/base/base_file_manager.cpp @@ -439,7 +439,7 @@ bool BaseFileManager::registerPackage(Common::SeekableReadStream *package, const }
for (uint32 i = 0; i < hdr._numDirs; i++) {
- BasePackage *pkg = new BasePackage(_gameRef);
+ BasePackage *pkg = new BasePackage(this);
if (!pkg) return STATUS_FAILED;
pkg->_boundToExe = boundToExe;
diff --git a/engines/wintermute/base/file/base_package.cpp b/engines/wintermute/base/file/base_package.cpp index 24f7c23422..a95be25a81 100644 --- a/engines/wintermute/base/file/base_package.cpp +++ b/engines/wintermute/base/file/base_package.cpp @@ -40,12 +40,13 @@ namespace WinterMute { //////////////////////////////////////////////////////////////////////////
-BasePackage::BasePackage(BaseGame *inGame): BaseClass(inGame) {
+BasePackage::BasePackage(BaseFileManager *fileMan)/*: BaseClass(inGame) */{
_file = NULL;
_name = NULL;
_cd = 0;
_priority = 0;
_boundToExe = false;
+ _fileManager = fileMan;
}
@@ -87,10 +88,10 @@ bool BasePackage::read(Common::SeekableReadStream *file, uint32 offset, byte *bu //////////////////////////////////////////////////////////////////////////
Common::SeekableReadStream *BasePackage::getFilePointer() {
- Common::File *file = _gameRef->_fileManager->openPackage(_name);
+ Common::File *file = _fileManager->openPackage(_name);
if (!file) {
- _gameRef->_fileManager->requestCD(_cd, _name, "");
- file = _gameRef->_fileManager->openPackage(_name);
+ _fileManager->requestCD(_cd, _name, "");
+ file = _fileManager->openPackage(_name);
}
return file;
}
diff --git a/engines/wintermute/base/file/base_package.h b/engines/wintermute/base/file/base_package.h index 2f305ea049..af180ac7bf 100644 --- a/engines/wintermute/base/file/base_package.h +++ b/engines/wintermute/base/file/base_package.h @@ -29,16 +29,16 @@ #ifndef WINTERMUTE_BPACKAGE_H
#define WINTERMUTE_BPACKAGE_H
-
-#include "engines/wintermute/base/base.h"
+#include "common/stream.h"
namespace Common {
class SeekableReadStream;
}
namespace WinterMute {
-
-class BasePackage : public BaseClass {
+class BaseFileManager;
+class BasePackage {
+ BaseFileManager *_fileManager;
public:
Common::SeekableReadStream *getFilePointer();
void closeFilePointer(Common::SeekableReadStream *&file);
@@ -51,9 +51,8 @@ public: char *_name;
int _cd;
Common::SeekableReadStream *_file;
- BasePackage(BaseGame *inGame);
- virtual ~BasePackage();
-
+ BasePackage(BaseFileManager *fileMan);
+ ~BasePackage();
};
} // end of namespace WinterMute
|