diff options
25 files changed, 169 insertions, 535 deletions
diff --git a/engines/wintermute/Ad/AdGame.cpp b/engines/wintermute/Ad/AdGame.cpp index 175cc98b38..584504b7c6 100644 --- a/engines/wintermute/Ad/AdGame.cpp +++ b/engines/wintermute/Ad/AdGame.cpp @@ -1903,7 +1903,7 @@ char *CAdGame::FindSpeechFile(char *StringID) { for (int i = 0; i < _speechDirs.GetSize(); i++) {
sprintf(Ret, "%s%s.ogg", _speechDirs[i], StringID);
- CBFile *File = _fileManager->OpenFile(Ret);
+ Common::SeekableReadStream *File = _fileManager->OpenFile(Ret);
if (File) {
_fileManager->CloseFile(File);
return Ret;
diff --git a/engines/wintermute/Ad/AdSentence.cpp b/engines/wintermute/Ad/AdSentence.cpp index 28e5b2cf26..e513d1f3ed 100644 --- a/engines/wintermute/Ad/AdSentence.cpp +++ b/engines/wintermute/Ad/AdSentence.cpp @@ -251,7 +251,7 @@ HRESULT CAdSentence::SetupTalkFile(const char *SoundFilename) { AnsiString talkDefFileName = PathUtil::Combine(path, name + ".talk");
- CBFile *file = Game->_fileManager->OpenFile(talkDefFileName.c_str());
+ Common::SeekableReadStream *file = Game->_fileManager->OpenFile(talkDefFileName.c_str());
if (file) {
Game->_fileManager->CloseFile(file);
} else return S_OK; // no talk def file found
diff --git a/engines/wintermute/Base/BFileManager.cpp b/engines/wintermute/Base/BFileManager.cpp index 8ba77b90b4..ce33e1a13c 100644 --- a/engines/wintermute/Base/BFileManager.cpp +++ b/engines/wintermute/Base/BFileManager.cpp @@ -33,10 +33,10 @@ #include "engines/wintermute/utils/StringUtil.h"
#include "engines/wintermute/utils/PathUtil.h"
#include "engines/wintermute/Base/file/BDiskFile.h"
-#include "engines/wintermute/Base/file/BResourceFile.h"
#include "engines/wintermute/Base/file/BSaveThumbFile.h"
#include "engines/wintermute/Base/BFileEntry.h"
#include "engines/wintermute/Base/file/BPkgFile.h"
+#include "engines/wintermute/Base/BResources.h"
#include "engines/wintermute/Base/BPackage.h"
#include "engines/wintermute/Base/BRegistry.h"
#include "engines/wintermute/Base/BGame.h"
@@ -96,7 +96,6 @@ HRESULT CBFileManager::Cleanup() { // close open files
for (i = 0; i < _openFiles.GetSize(); i++) {
- _openFiles[i]->Close();
delete _openFiles[i];
}
_openFiles.RemoveAll();
@@ -121,7 +120,7 @@ byte *CBFileManager::ReadWholeFile(const char *Filename, uint32 *Size, bool Must byte *buffer = NULL;
- CBFile *File = OpenFile(Filename);
+ Common::SeekableReadStream *File = OpenFile(Filename);
if (!File) {
if (MustExist) Game->LOG(0, "Error opening file '%s'", Filename);
return NULL;
@@ -136,22 +135,22 @@ byte *CBFileManager::ReadWholeFile(const char *Filename, uint32 *Size, bool Must */
- buffer = new byte[File->getSize() + 1];
+ buffer = new byte[File->size() + 1];
if (buffer == NULL) {
- Game->LOG(0, "Error allocating buffer for file '%s' (%d bytes)", Filename, File->getSize() + 1);
+ Game->LOG(0, "Error allocating buffer for file '%s' (%d bytes)", Filename, File->size() + 1);
CloseFile(File);
return NULL;
}
- if (FAILED(File->Read(buffer, File->getSize()))) {
+ if (File->read(buffer, File->size()) != File->size()) {
Game->LOG(0, "Error reading file '%s'", Filename);
CloseFile(File);
delete [] buffer;
return NULL;
};
- buffer[File->getSize()] = '\0';
- if (Size != NULL) *Size = File->getSize();
+ buffer[File->size()] = '\0';
+ if (Size != NULL) *Size = File->size();
CloseFile(File);
return buffer;
@@ -751,10 +750,10 @@ CBFileEntry *CBFileManager::GetPackageEntry(const char *Filename) { //////////////////////////////////////////////////////////////////////////
-CBFile *CBFileManager::OpenFile(const char *Filename, bool AbsPathWarning) {
+Common::SeekableReadStream *CBFileManager::OpenFile(const char *Filename, bool AbsPathWarning) {
if (strcmp(Filename, "") == 0) return NULL;
//Game->LOG(0, "open file: %s", Filename);
-#ifdef __WIN32__
+/*#ifdef __WIN32__
if (Game->_dEBUG_DebugMode && Game->_dEBUG_AbsolutePathWarning && AbsPathWarning) {
char Drive[_MAX_DRIVE];
_splitpath(Filename, Drive, NULL, NULL, NULL);
@@ -762,19 +761,18 @@ CBFile *CBFileManager::OpenFile(const char *Filename, bool AbsPathWarning) { Game->LOG(0, "WARNING: Referencing absolute path '%s'. The game will NOT work on another computer.", Filename);
}
}
-#endif
+#endif*/
- CBFile *File = OpenFileRaw(Filename);
+ Common::SeekableReadStream *File = OpenFileRaw(Filename);
if (File) _openFiles.Add(File);
return File;
}
//////////////////////////////////////////////////////////////////////////
-HRESULT CBFileManager::CloseFile(CBFile *File) {
+HRESULT CBFileManager::CloseFile(Common::SeekableReadStream *File) {
for (int i = 0; i < _openFiles.GetSize(); i++) {
if (_openFiles[i] == File) {
- _openFiles[i]->Close();
delete _openFiles[i];
_openFiles.RemoveAt(i);
return S_OK;
@@ -785,30 +783,29 @@ HRESULT CBFileManager::CloseFile(CBFile *File) { //////////////////////////////////////////////////////////////////////////
-CBFile *CBFileManager::OpenFileRaw(const Common::String &Filename) {
+Common::SeekableReadStream *CBFileManager::OpenFileRaw(const Common::String &Filename) {
RestoreCurrentDir();
if (scumm_strnicmp(Filename.c_str(), "savegame:", 9) == 0) {
CBSaveThumbFile *SaveThumbFile = new CBSaveThumbFile(Game);
- if (SUCCEEDED(SaveThumbFile->Open(Filename))) return SaveThumbFile;
+ if (SUCCEEDED(SaveThumbFile->Open(Filename))) return SaveThumbFile->getMemStream();
else {
delete SaveThumbFile;
return NULL;
}
}
- CBDiskFile *DiskFile = new CBDiskFile(Game);
- if (SUCCEEDED(DiskFile->Open(Filename))) return DiskFile;
-
- delete DiskFile;
- CBPkgFile *PkgFile = new CBPkgFile(Game);
- if (SUCCEEDED(PkgFile->Open(Filename))) return PkgFile;
+ Common::SeekableReadStream *ret = NULL;
+
+ ret = openDiskFile(Filename, this);
+ if (ret) return ret;
- delete PkgFile;
- CBResourceFile *ResFile = new CBResourceFile(Game);
- if (SUCCEEDED(ResFile->Open(Filename))) return ResFile;
+ ret = openPkgFile(Filename, this);
+ if (ret) return ret;
+
+ ret = CBResources::getFile(Filename);
+ if (ret) return ret;
- delete ResFile;
warning("BFileManager::OpenFileRaw - Failed to open %s", Filename.c_str());
return NULL;
}
diff --git a/engines/wintermute/Base/BFileManager.h b/engines/wintermute/Base/BFileManager.h index cf0e284cc1..77f99c8570 100644 --- a/engines/wintermute/Base/BFileManager.h +++ b/engines/wintermute/Base/BFileManager.h @@ -50,9 +50,9 @@ public: HRESULT RestoreCurrentDir();
char *_basePath;
bool GetFullPath(const char *Filename, char *Fullname);
- CBFile *OpenFileRaw(const Common::String &filename);
- HRESULT CloseFile(CBFile *File);
- CBFile *OpenFile(const char *Filename, bool AbsPathWarning = true);
+ Common::SeekableReadStream *OpenFileRaw(const Common::String &filename);
+ HRESULT CloseFile(Common::SeekableReadStream *File);
+ Common::SeekableReadStream *OpenFile(const char *Filename, bool AbsPathWarning = true);
CBFileEntry *GetPackageEntry(const char *Filename);
Common::File *OpenSingleFile(const char *Name);
Common::File *OpenPackage(const char *Name);
@@ -71,7 +71,7 @@ public: CBArray<char *, char *> _singlePaths;
CBArray<char *, char *> _packagePaths;
CBArray<CBPackage *, CBPackage *> _packages;
- CBArray<CBFile *, CBFile *> _openFiles;
+ CBArray<Common::SeekableReadStream *, Common::SeekableReadStream *> _openFiles;
Common::HashMap<Common::String, CBFileEntry *> _files;
private:
diff --git a/engines/wintermute/Base/BFontTT.cpp b/engines/wintermute/Base/BFontTT.cpp index 6ec9382a63..e18279a73d 100644 --- a/engines/wintermute/Base/BFontTT.cpp +++ b/engines/wintermute/Base/BFontTT.cpp @@ -611,7 +611,7 @@ HRESULT CBFontTT::InitFont() { if (!_fontFile) return E_FAIL;
warning("BFontTT::InitFont - Not ported yet");
- CBFile *file = Game->_fileManager->OpenFile(_fontFile);
+ Common::SeekableReadStream *file = Game->_fileManager->OpenFile(_fontFile);
if (!file) {
// the requested font file is not in wme file space; try loading a system font
AnsiString fontFileName = PathUtil::Combine(CBPlatform::GetSystemFontPath(), PathUtil::GetFileName(_fontFile));
diff --git a/engines/wintermute/Base/BGame.cpp b/engines/wintermute/Base/BGame.cpp index 9b840cd273..c9b122759d 100644 --- a/engines/wintermute/Base/BGame.cpp +++ b/engines/wintermute/Base/BGame.cpp @@ -1722,7 +1722,7 @@ HRESULT CBGame::ScCallMethod(CScScript *Script, CScStack *Stack, CScStack *ThisS Stack->CorrectParams(1);
const char *Filename = Stack->Pop()->GetString();
- CBFile *File = _fileManager->OpenFile(Filename, false);
+ Common::SeekableReadStream *File = _fileManager->OpenFile(Filename, false);
if (!File) Stack->PushBool(false);
else {
_fileManager->CloseFile(File);
@@ -2073,17 +2073,16 @@ HRESULT CBGame::ScCallMethod(CScScript *Script, CScStack *Stack, CScStack *ThisS const char *Filename = Stack->Pop()->GetString();
bool AsHex = Stack->Pop()->GetBool(false);
- CBFile *File = _fileManager->OpenFile(Filename, false);
+ Common::SeekableReadStream *File = _fileManager->OpenFile(Filename, false);
if (File) {
crc remainder = crc_initialize();
byte Buf[1024];
int BytesRead = 0;
- while (BytesRead < File->getSize()) {
- int BufSize = MIN((uint32)1024, File->getSize() - BytesRead);
- BytesRead += BufSize;
+ while (BytesRead < File->size()) {
+ int BufSize = MIN((uint32)1024, (uint32)(File->size() - BytesRead));
+ BytesRead += File->read(Buf, BufSize);
- File->Read(Buf, BufSize);
for (int i = 0; i < BufSize; i++) {
remainder = crc_process_byte(Buf[i], remainder);
}
@@ -3922,7 +3921,7 @@ bool CBGame::IsSaveSlotUsed(int Slot) { char Filename[MAX_PATH + 1];
GetSaveSlotFilename(Slot, Filename);
- CBFile *File = _fileManager->OpenFile(Filename, false);
+ Common::SeekableReadStream *File = _fileManager->OpenFile(Filename, false);
if (!File) return false;
_fileManager->CloseFile(File);
diff --git a/engines/wintermute/Base/BResources.cpp b/engines/wintermute/Base/BResources.cpp index d0714abaf2..3b6d0a264c 100644 --- a/engines/wintermute/Base/BResources.cpp +++ b/engines/wintermute/Base/BResources.cpp @@ -29,6 +29,7 @@ #include "engines/wintermute/PlatformSDL.h"
#include "engines/wintermute/Base/BResources.h"
#include "common/str.h"
+#include "common/memstream.h"
namespace WinterMute {
@@ -2805,26 +2806,15 @@ unsigned char systemfont[] = { 0x01, 0x01, 0x01, 0x01, 0x01, 0x01
} ;
-
-//////////////////////////////////////////////////////////////////////////
-bool CBResources::GetFile(const char *fileName, byte *&buffer, uint32 &size) {
- // better!
- if (scumm_stricmp(fileName, "invalid.bmp") == 0) {
- buffer = invalid;
- size = sizeof(invalid);
- return true;
- } else if (scumm_stricmp(fileName, "invalid_debug.bmp") == 0) {
- buffer = invaliddebug;
- size = sizeof(invaliddebug);
- return true;
- } else if (scumm_stricmp(fileName, "syste_font.bmp") == 0) {
- buffer = systemfont;
- size = sizeof(systemfont);
- return true;
+Common::SeekableReadStream *CBResources::getFile(const Common::String& fileName) {
+ if (scumm_stricmp(fileName.c_str(), "invalid.bmp") == 0) {
+ return new Common::MemoryReadStream(invalid, sizeof(invalid), DisposeAfterUse::NO);
+ } else if (scumm_stricmp(fileName.c_str(), "invalid_debug.bmp") == 0) {
+ return new Common::MemoryReadStream(invaliddebug, sizeof(invalid), DisposeAfterUse::NO);
+ } else if (scumm_stricmp(fileName.c_str(), "syste_font.bmp") == 0) {
+ return new Common::MemoryReadStream(systemfont, sizeof(invalid), DisposeAfterUse::NO);
}
-
-
- return false;
+ return NULL;
}
} // end of namespace WinterMute
diff --git a/engines/wintermute/Base/BResources.h b/engines/wintermute/Base/BResources.h index 26d92af525..f9a28865b4 100644 --- a/engines/wintermute/Base/BResources.h +++ b/engines/wintermute/Base/BResources.h @@ -29,11 +29,14 @@ #ifndef WINTERMUTE_BRESOURCES_H
#define WINTERMUTE_BRESOURCES_H
+#include "common/stream.h"
+#include "common/str.h"
+
namespace WinterMute {
class CBResources {
public:
- static bool GetFile(const char *fileName, byte *&buffer, uint32 &size);
+ static Common::SeekableReadStream *getFile(const Common::String& fileName);
};
} // end of namespace WinterMute
diff --git a/engines/wintermute/Base/BSoundBuffer.cpp b/engines/wintermute/Base/BSoundBuffer.cpp index dd269d5b4e..62a9bd78b6 100644 --- a/engines/wintermute/Base/BSoundBuffer.cpp +++ b/engines/wintermute/Base/BSoundBuffer.cpp @@ -112,7 +112,7 @@ HRESULT CBSoundBuffer::LoadFromFile(const char *Filename, bool ForceReload) { return E_FAIL;
}
- _stream = Audio::makeVorbisStream(_file->getMemStream(), DisposeAfterUse::YES);
+ _stream = Audio::makeVorbisStream(_file, DisposeAfterUse::NO);
CBUtils::SetString(&_filename, Filename);
return S_OK;
diff --git a/engines/wintermute/Base/BSoundBuffer.h b/engines/wintermute/Base/BSoundBuffer.h index 5445376555..9fa9dec1cf 100644 --- a/engines/wintermute/Base/BSoundBuffer.h +++ b/engines/wintermute/Base/BSoundBuffer.h @@ -31,7 +31,7 @@ #include "engines/wintermute/Base/BBase.h"
-//#include "bass.h"
+#include "common/stream.h"
namespace Audio {
class SeekableAudioStream;
@@ -84,7 +84,7 @@ public: uint32 _loopStart;
TSoundType _type;
bool _looping;
- CBFile *_file;
+ Common::SeekableReadStream *_file;
char *_filename;
bool _streamed;
int _privateVolume;
diff --git a/engines/wintermute/Base/BSoundMgr.cpp b/engines/wintermute/Base/BSoundMgr.cpp index 8c98f83dc2..bac53f6b22 100644 --- a/engines/wintermute/Base/BSoundMgr.cpp +++ b/engines/wintermute/Base/BSoundMgr.cpp @@ -137,7 +137,7 @@ CBSoundBuffer *CBSoundMgr::addSound(const char *Filename, TSoundType Type, bool AnsiString name = PathUtil::GetFileNameWithoutExtension(Filename);
AnsiString newFile = PathUtil::Combine(path, name + "ogg");
- CBFile *file = Game->_fileManager->OpenFile(newFile.c_str());
+ Common::SeekableReadStream *file = Game->_fileManager->OpenFile(newFile.c_str());
if (file) {
Filename = newFile.c_str();
Game->_fileManager->CloseFile(file);
diff --git a/engines/wintermute/Base/BSprite.cpp b/engines/wintermute/Base/BSprite.cpp index 87da65e9d0..f3f35a8364 100644 --- a/engines/wintermute/Base/BSprite.cpp +++ b/engines/wintermute/Base/BSprite.cpp @@ -123,7 +123,7 @@ HRESULT CBSprite::Draw(int X, int Y, CBObject *Register, float ZoomX, float Zoom //////////////////////////////////////////////////////////////////////
HRESULT CBSprite::LoadFile(const char *Filename, int LifeTime, TSpriteCacheType CacheType) {
- CBFile *File = Game->_fileManager->OpenFile(Filename);
+ Common::SeekableReadStream *File = Game->_fileManager->OpenFile(Filename);
if (!File) {
Game->LOG(0, "CBSprite::LoadFile failed for file '%s'", Filename);
if (Game->_dEBUG_DebugMode) return LoadFile("invalid_debug.bmp", LifeTime, CacheType);
diff --git a/engines/wintermute/Base/BSurfaceSDL.cpp b/engines/wintermute/Base/BSurfaceSDL.cpp index 166fbc171b..f41839a244 100644 --- a/engines/wintermute/Base/BSurfaceSDL.cpp +++ b/engines/wintermute/Base/BSurfaceSDL.cpp @@ -85,10 +85,10 @@ HRESULT CBSurfaceSDL::Create(const char *Filename, bool default_ck, byte ck_red, error("CBSurfaceSDL::Create : Unsupported fileformat %s", Filename);
}
- CBFile *file = Game->_fileManager->OpenFile(Filename);
+ Common::SeekableReadStream *file = Game->_fileManager->OpenFile(Filename);
if (!file) return E_FAIL;
- imgDecoder->loadStream(*file->getMemStream());
+ imgDecoder->loadStream(*file);
const Graphics::Surface *surface = imgDecoder->getSurface();
Game->_fileManager->CloseFile(file);
diff --git a/engines/wintermute/Base/BSurfaceStorage.cpp b/engines/wintermute/Base/BSurfaceStorage.cpp index 538b9a2649..1ff31e1338 100644 --- a/engines/wintermute/Base/BSurfaceStorage.cpp +++ b/engines/wintermute/Base/BSurfaceStorage.cpp @@ -105,7 +105,7 @@ CBSurface *CBSurfaceStorage::AddSurface(const char *Filename, bool default_ck, b }
}
- CBFile *File = Game->_fileManager->OpenFile(Filename);
+ Common::SeekableReadStream *File = Game->_fileManager->OpenFile(Filename);
if (!File) {
if (Filename) Game->LOG(0, "Missing image: '%s'", Filename);
if (Game->_dEBUG_DebugMode)
diff --git a/engines/wintermute/Base/PartEmitter.cpp b/engines/wintermute/Base/PartEmitter.cpp index e37d0f1373..29d51c063d 100644 --- a/engines/wintermute/Base/PartEmitter.cpp +++ b/engines/wintermute/Base/PartEmitter.cpp @@ -123,7 +123,7 @@ HRESULT CPartEmitter::AddSprite(const char *Filename) { }
// check if file exists
- CBFile *File = Game->_fileManager->OpenFile(Filename);
+ Common::SeekableReadStream *File = Game->_fileManager->OpenFile(Filename);
if (!File) {
Game->LOG(0, "Sprite '%s' not found", Filename);
return E_FAIL;
diff --git a/engines/wintermute/Base/file/BDiskFile.cpp b/engines/wintermute/Base/file/BDiskFile.cpp index 8540829f09..57e9a0a0f0 100644 --- a/engines/wintermute/Base/file/BDiskFile.cpp +++ b/engines/wintermute/Base/file/BDiskFile.cpp @@ -33,198 +33,98 @@ #include "engines/wintermute/Base/file/BDiskFile.h"
#include "engines/wintermute/Base/BFileManager.h"
#include "common/stream.h"
+#include "common/memstream.h"
#include "common/file.h"
+#include "common/zlib.h"
namespace WinterMute {
-//////////////////////////////////////////////////////////////////////////
-CBDiskFile::CBDiskFile(CBGame *inGame): CBFile(inGame) {
- _file = NULL;
- _data = NULL;
- _compressed = false;
- _prefixSize = 0;
-}
-
-
-//////////////////////////////////////////////////////////////////////////
-CBDiskFile::~CBDiskFile() {
- Close();
+void correctSlashes(char *fileName) {
+ for (size_t i = 0; i < strlen(fileName); i++) {
+ if (fileName[i] == '\\') fileName[i] = '/';
+ }
}
-
-//////////////////////////////////////////////////////////////////////////
-HRESULT CBDiskFile::Open(const Common::String &Filename) {
- Close();
-
+Common::SeekableReadStream *openDiskFile(const Common::String &Filename, CBFileManager *fileManager) {
char FullPath[MAX_PATH];
+ uint32 prefixSize = 0;
+ Common::SeekableReadStream *file = NULL;
- for (int i = 0; i < Game->_fileManager->_singlePaths.GetSize(); i++) {
- sprintf(FullPath, "%s%s", Game->_fileManager->_singlePaths[i], Filename.c_str());
+ for (int i = 0; i < fileManager->_singlePaths.GetSize(); i++) {
+ sprintf(FullPath, "%s%s", fileManager->_singlePaths[i], Filename.c_str());
correctSlashes(FullPath);
- //_file = Common::createFileStream(FullPath);
Common::File *tempFile = new Common::File();
if (tempFile->open(FullPath)) {
- _file = tempFile;
+ file = tempFile;
} else {
delete tempFile;
}
- /* if (_file != NULL) {
- error("Tried to open %s, but failed", Filename.c_str());
- break;
- }*/
}
-
+
// if we didn't find it in search paths, try to open directly
- if (!_file) {
+ if (!file) {
strcpy(FullPath, Filename.c_str());
correctSlashes(FullPath);
- //error("Tried to open %s, TODO: add SearchMan-support", Filename.c_str());
- //_file = Common::createFileStream(FullPath);
+
Common::File *tempFile = new Common::File();
if (tempFile->open(FullPath)) {
- _file = tempFile;
+ file = tempFile;
} else {
delete tempFile;
}
}
-
- if (_file) {
+
+ if (file) {
uint32 magic1, magic2;
- magic1 = _file->readUint32LE();
- magic2 = _file->readUint32LE();
-
- if (magic1 == DCGF_MAGIC && magic2 == COMPRESSED_FILE_MAGIC) _compressed = true;
-
- if (_compressed) {
+ magic1 = file->readUint32LE();
+ magic2 = file->readUint32LE();
+
+ bool compressed = false;
+ if (magic1 == DCGF_MAGIC && magic2 == COMPRESSED_FILE_MAGIC) compressed = true;
+
+ if (compressed) {
uint32 DataOffset, CompSize, UncompSize;
- DataOffset = _file->readUint32LE();
- CompSize = _file->readUint32LE();
- UncompSize = _file->readUint32LE();
-
+ DataOffset = file->readUint32LE();
+ CompSize = file->readUint32LE();
+ UncompSize = file->readUint32LE();
+
byte *CompBuffer = new byte[CompSize];
if (!CompBuffer) {
- Game->LOG(0, "Error allocating memory for compressed file '%s'", Filename.c_str());
- Close();
- return E_FAIL;
+ error("Error allocating memory for compressed file '%s'", Filename.c_str());
+ delete file;
+ return NULL;
}
-
- _data = new byte[UncompSize];
- if (!_data) {
- Game->LOG(0, "Error allocating buffer for file '%s'", Filename.c_str());
+
+ byte *data = new byte[UncompSize];
+ if (!data) {
+ error("Error allocating buffer for file '%s'", Filename.c_str());
delete [] CompBuffer;
- Close();
- return E_FAIL;
+ delete file;
+ return NULL;
}
- _file->seek(DataOffset + _prefixSize, SEEK_SET);
- _file->read(CompBuffer, CompSize);
-
- if (uncompress(_data, (uLongf *)&UncompSize, CompBuffer, CompSize) != Z_OK) {
- Game->LOG(0, "Error uncompressing file '%s'", Filename.c_str());
+ file->seek(DataOffset + prefixSize, SEEK_SET);
+ file->read(CompBuffer, CompSize);
+
+ if (Common::uncompress(data, (unsigned long *)&UncompSize, CompBuffer, CompSize) != true) {
+ error("Error uncompressing file '%s'", Filename.c_str());
delete [] CompBuffer;
- Close();
- return E_FAIL;
+ delete file;
+ return NULL;
}
-
+
delete [] CompBuffer;
- _size = UncompSize;
- _pos = 0;
- delete _file;
- _file = NULL;
+
+ return new Common::MemoryReadStream(data, UncompSize, DisposeAfterUse::YES);
+ delete file;
+ file = NULL;
} else {
- _pos = 0;
- _file->seek(0, SEEK_END);
- _size = _file->pos() - _prefixSize;
- _file->seek(_prefixSize, SEEK_SET);
- }
-
- return S_OK;
- } else return E_FAIL;
-}
-
-
-//////////////////////////////////////////////////////////////////////////
-HRESULT CBDiskFile::Close() {
- if (_file) {
- delete _file;
- }
- _file = NULL;
- _pos = 0;
- _size = 0;
-
- delete[] _data;
- _data = NULL;
-
- _compressed = false;
-
- return S_OK;
-}
-
-
-//////////////////////////////////////////////////////////////////////////
-HRESULT CBDiskFile::Read(void *buffer, uint32 size) {
- if (_compressed) {
- memcpy(buffer, _data + _pos, size);
- _pos += size;
- return S_OK;
- } else {
-
- if (_file) {
- size_t count = _file->read(buffer, size);
- _pos += count;
- return S_OK;
- } else return E_FAIL;
- }
-}
-
-
-//////////////////////////////////////////////////////////////////////////
-HRESULT CBDiskFile::Seek(uint32 pos, TSeek origin) {
- // TODO: Should this really need to use uint32?
- if (_compressed) {
- uint32 newPos = 0;
-
- switch (origin) {
- case SEEK_TO_BEGIN:
- newPos = pos;
- break;
- case SEEK_TO_END:
- newPos = _size + pos;
- break;
- case SEEK_TO_CURRENT:
- newPos = _pos + pos;
- break;
- }
-
- if (newPos < 0 || newPos > _size) return E_FAIL;
- else _pos = newPos;
- return S_OK;
- } else {
- if (!_file) return E_FAIL;
- int ret = 1;
-
- switch (origin) {
- case SEEK_TO_BEGIN:
- ret = _file->seek(_prefixSize + pos, SEEK_SET);
- break;
- case SEEK_TO_END:
- ret = _file->seek(pos, SEEK_END);
- break;
- case SEEK_TO_CURRENT:
- ret = _file->seek(pos, SEEK_CUR);
- break;
+ return file;
}
- if (ret == 0) {
- _pos = _file->pos() - _prefixSize;
- return S_OK;
- } else return E_FAIL;
- }
-}
+
+ return file;
-//////////////////////////////////////////////////////////////////////////
-void CBDiskFile::correctSlashes(char *fileName) {
- for (size_t i = 0; i < strlen(fileName); i++) {
- if (fileName[i] == '\\') fileName[i] = '/';
}
+ return NULL;
}
} // end of namespace WinterMute
diff --git a/engines/wintermute/Base/file/BDiskFile.h b/engines/wintermute/Base/file/BDiskFile.h index d9e7af548f..ebe1400128 100644 --- a/engines/wintermute/Base/file/BDiskFile.h +++ b/engines/wintermute/Base/file/BDiskFile.h @@ -29,30 +29,13 @@ #ifndef WINTERMUTE_BDISKFILE_H
#define WINTERMUTE_BDISKFILE_H
-
-#include "engines/wintermute/Base/file/BFile.h"
-
namespace Common {
class SeekableReadStream;
}
namespace WinterMute {
-class CBDiskFile : public CBFile {
-public:
- CBDiskFile(CBGame *inGame);
- virtual ~CBDiskFile();
- virtual HRESULT Seek(uint32 pos, TSeek origin = SEEK_TO_BEGIN);
- virtual HRESULT Read(void *buffer, uint32 size);
- virtual HRESULT Close();
- virtual HRESULT Open(const Common::String &filename);
-private:
- void correctSlashes(char *fileName);
- Common::SeekableReadStream *_file;
- byte *_data;
- bool _compressed;
- uint32 _prefixSize;
-};
+Common::SeekableReadStream *openDiskFile(const Common::String &Filename, CBFileManager *fileManager);
} // end of namespace WinterMute
diff --git a/engines/wintermute/Base/file/BFile.h b/engines/wintermute/Base/file/BFile.h index fa6fafcb25..caeac3e14b 100644 --- a/engines/wintermute/Base/file/BFile.h +++ b/engines/wintermute/Base/file/BFile.h @@ -32,6 +32,7 @@ #include "engines/wintermute/Base/BBase.h"
#include "common/str.h"
+#include "common/stream.h"
namespace Common {
class SeekableReadStream;
diff --git a/engines/wintermute/Base/file/BPkgFile.cpp b/engines/wintermute/Base/file/BPkgFile.cpp index fe04b816d2..ed3a24f313 100644 --- a/engines/wintermute/Base/file/BPkgFile.cpp +++ b/engines/wintermute/Base/file/BPkgFile.cpp @@ -39,24 +39,23 @@ namespace WinterMute {
-//////////////////////////////////////////////////////////////////////////
-CBPkgFile::CBPkgFile(CBGame *inGame): CBFile(inGame) {
- _fileEntry = NULL;
- _file = NULL;
- _compressed = false;
-
-}
-
-//////////////////////////////////////////////////////////////////////////
-CBPkgFile::~CBPkgFile() {
- Close();
-}
-
-
-//////////////////////////////////////////////////////////////////////////
-HRESULT CBPkgFile::Open(const Common::String &Filename) {
- Close();
-
+// HACK: wrapCompressedStream might set the size to 0, so we need a way to override it.
+class CBPkgFile : public Common::SeekableReadStream {
+ uint32 _size;
+ Common::SeekableReadStream *_stream;
+public:
+ CBPkgFile(Common::SeekableReadStream *stream, uint32 knownLength) : _size(knownLength), _stream(stream) {}
+ virtual ~CBPkgFile() { delete _stream; }
+ virtual uint32 read(void *dataPtr, uint32 dataSize) { return _stream->read(dataPtr, dataSize); }
+ virtual bool eos() const { return _stream->eos(); }
+ virtual int32 pos() const { return _stream->pos(); }
+ virtual int32 size() const { return _size; }
+ virtual bool seek(int32 offset, int whence = SEEK_SET) { return _stream->seek(offset, whence); }
+};
+
+Common::SeekableReadStream *openPkgFile(const Common::String &Filename, CBFileManager *fileManager) {
+ CBFileEntry *fileEntry;
+ Common::SeekableReadStream *file = NULL;
char fileName[MAX_PATH];
strcpy(fileName, Filename.c_str());
@@ -65,97 +64,30 @@ HRESULT CBPkgFile::Open(const Common::String &Filename) { if (fileName[i] == '/') fileName[i] = '\\';
}
- _fileEntry = Game->_fileManager->GetPackageEntry(fileName);
- if (!_fileEntry) return E_FAIL;
-
- _file = _fileEntry->_package->GetFilePointer();
- if (!_file) return E_FAIL;
-
+ fileEntry = fileManager->GetPackageEntry(fileName);
+ if (!fileEntry) return NULL;
+
+ file = fileEntry->_package->GetFilePointer();
+ if (!file) return NULL;
+
// TODO: Cleanup
- _compressed = (_fileEntry->_compressedLength != 0);
- _size = _fileEntry->_length;
-
- if (_compressed) {
+ bool compressed = (fileEntry->_compressedLength != 0);
+ /* _size = fileEntry->_length; */
+
+ if (compressed) {
// TODO: Really, most of this logic might be doable directly in the fileEntry?
// But for now, this should get us rolling atleast.
- _file = Common::wrapCompressedReadStream(new Common::SeekableSubReadStream(_file, _fileEntry->_offset, _fileEntry->_offset + _fileEntry->_length, DisposeAfterUse::YES));
+ file = Common::wrapCompressedReadStream(new Common::SeekableSubReadStream(file, fileEntry->_offset, fileEntry->_offset + fileEntry->_length, DisposeAfterUse::YES));
} else {
- _file = new Common::SeekableSubReadStream(_file, _fileEntry->_offset, _fileEntry->_offset + _fileEntry->_length, DisposeAfterUse::YES);
+ file = new Common::SeekableSubReadStream(file, fileEntry->_offset, fileEntry->_offset + fileEntry->_length, DisposeAfterUse::YES);
}
-
- SeekToPos(0);
-
- return S_OK;
-}
-
-
-//////////////////////////////////////////////////////////////////////////
-HRESULT CBPkgFile::Close() {
- if (_fileEntry) {
- _fileEntry->_package->CloseFilePointer(_file);
- _fileEntry = NULL;
+ if (file->size() == 0) {
+ file = new CBPkgFile(file, fileEntry->_length);
}
- _file = NULL;
-
- // TODO: Do we really need to take care of our position and size at all (or could (Safe)SubStreams fix that for us?
- _pos = 0;
- _size = 0;
-
- return S_OK;
-}
-
-
-//////////////////////////////////////////////////////////////////////////
-HRESULT CBPkgFile::Read(void *Buffer, uint32 Size) {
- if (!_fileEntry) return E_FAIL;
-
- HRESULT ret = S_OK;
-
- if (_pos + Size > _size) {
- Size = _size - _pos;
- if (Size == 0) return E_FAIL;
- }
-
- ret = _file->read(Buffer, Size);
-
- _pos += Size;
-
- return ret;
-}
-
-
-//////////////////////////////////////////////////////////////////////////
-HRESULT CBPkgFile::Seek(uint32 pos, TSeek origin) {
- if (!_fileEntry) return E_FAIL;
-
- uint32 newPos = 0;
-
- switch (origin) {
- case SEEK_TO_BEGIN:
- newPos = pos;
- break;
- case SEEK_TO_END:
- newPos = _size + pos;
- break;
- case SEEK_TO_CURRENT:
- newPos = _pos + pos;
- break;
- }
-
- if (newPos < 0 || newPos > _size) return E_FAIL;
-
- return SeekToPos(newPos);
-}
-
-
-#define STREAM_BUFFER_SIZE 4096
-//////////////////////////////////////////////////////////////////////////
-HRESULT CBPkgFile::SeekToPos(uint32 newPos) {
- HRESULT ret = S_OK;
- // seek compressed stream to NewPos
- _pos = newPos;
- return ret;
+ file->seek(0);
+
+ return file;
}
} // end of namespace WinterMute
diff --git a/engines/wintermute/Base/file/BPkgFile.h b/engines/wintermute/Base/file/BPkgFile.h index 912b351ac8..e2d90e2b50 100644 --- a/engines/wintermute/Base/file/BPkgFile.h +++ b/engines/wintermute/Base/file/BPkgFile.h @@ -29,12 +29,7 @@ #ifndef WINTERMUTE_BPKGFILE_H
#define WINTERMUTE_BPKGFILE_H
-
-#include "engines/wintermute/Base/file/BFile.h"
#include "engines/wintermute/Base/BFileEntry.h"
-#include <zlib.h> // Added by ClassView
-
-#define COMPRESSED_BUFFER_SIZE 4096
namespace Common {
class SeekableReadStream;
@@ -43,21 +38,8 @@ class File; namespace WinterMute {
-class CBPkgFile : public CBFile {
-public:
- CBPkgFile(CBGame *inGame);
- virtual ~CBPkgFile();
- virtual HRESULT Seek(uint32 pos, TSeek origin = SEEK_TO_BEGIN);
- virtual HRESULT Read(void *buffer, uint32 size);
- virtual HRESULT Close();
- virtual HRESULT Open(const Common::String &filename);
-private:
- bool _inflateInit;
- HRESULT SeekToPos(uint32 newPos);
- bool _compressed;
- CBFileEntry *_fileEntry;
- Common::SeekableReadStream *_file;
-};
+class CBFileManager;
+Common::SeekableReadStream *openPkgFile(const Common::String &Filename, CBFileManager *fileManager);
} // end of namespace WinterMute
diff --git a/engines/wintermute/Base/file/BResourceFile.cpp b/engines/wintermute/Base/file/BResourceFile.cpp deleted file mode 100644 index 9ac93c4f9b..0000000000 --- a/engines/wintermute/Base/file/BResourceFile.cpp +++ /dev/null @@ -1,103 +0,0 @@ -/* ScummVM - Graphic Adventure Engine
- *
- * ScummVM is the legal property of its developers, whose names
- * are too numerous to list here. Please refer to the COPYRIGHT
- * file distributed with this source distribution.
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
-
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
-
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- *
- */
-
-/*
- * This file is based on WME Lite.
- * http://dead-code.org/redir.php?target=wmelite
- * Copyright (c) 2011 Jan Nedoma
- */
-
-#include "engines/wintermute/dcgf.h"
-#include "engines/wintermute/Base/file/BResourceFile.h"
-#include "engines/wintermute/Base/BResources.h"
-
-namespace WinterMute {
-
-//////////////////////////////////////////////////////////////////////////
-CBResourceFile::CBResourceFile(CBGame *inGame): CBFile(inGame) {
- _data = NULL;
-}
-
-
-//////////////////////////////////////////////////////////////////////////
-CBResourceFile::~CBResourceFile() {
- Close();
-}
-
-
-//////////////////////////////////////////////////////////////////////////
-HRESULT CBResourceFile::Open(const Common::String &filename) {
- Close();
-
- if (CBResources::GetFile(filename.c_str(), _data, _size)) {
- _pos = 0;
- return S_OK;
- }
- return E_FAIL;
-}
-
-//////////////////////////////////////////////////////////////////////////
-HRESULT CBResourceFile::Close() {
- _data = NULL;
- _pos = 0;
- _size = 0;
-
- return S_OK;
-}
-
-
-//////////////////////////////////////////////////////////////////////////
-HRESULT CBResourceFile::Read(void *buffer, uint32 size) {
- if (!_data || _pos + size > _size) return E_FAIL;
-
- memcpy(buffer, (byte *)_data + _pos, size);
- _pos += size;
-
- return S_OK;
-}
-
-
-//////////////////////////////////////////////////////////////////////////
-HRESULT CBResourceFile::Seek(uint32 pos, TSeek origin) {
- if (!_data) return E_FAIL;
-
- int32 newPos = 0;
-
- switch (origin) {
- case SEEK_TO_BEGIN:
- newPos = pos;
- break;
- case SEEK_TO_END:
- newPos = _size + pos;
- break;
- case SEEK_TO_CURRENT:
- newPos = _pos + pos;
- break;
- }
-
- if (newPos < 0 || newPos > _size) return E_FAIL;
- else _pos = newPos;
-
- return S_OK;
-}
-
-} // end of namespace WinterMute
diff --git a/engines/wintermute/Base/file/BResourceFile.h b/engines/wintermute/Base/file/BResourceFile.h deleted file mode 100644 index 77d8b629b1..0000000000 --- a/engines/wintermute/Base/file/BResourceFile.h +++ /dev/null @@ -1,50 +0,0 @@ -/* ScummVM - Graphic Adventure Engine
- *
- * ScummVM is the legal property of its developers, whose names
- * are too numerous to list here. Please refer to the COPYRIGHT
- * file distributed with this source distribution.
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
-
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
-
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- *
- */
-
-/*
- * This file is based on WME Lite.
- * http://dead-code.org/redir.php?target=wmelite
- * Copyright (c) 2011 Jan Nedoma
- */
-
-#ifndef WINTERMUTE_BRESOURCEFILE_H
-#define WINTERMUTE_BRESOURCEFILE_H
-
-#include "engines/wintermute/Base/file/BFile.h"
-
-namespace WinterMute {
-
-class CBResourceFile : public CBFile {
-public:
- CBResourceFile(CBGame *inGame);
- virtual ~CBResourceFile();
- virtual HRESULT Seek(uint32 Pos, TSeek Origin = SEEK_TO_BEGIN);
- virtual HRESULT Read(void *Buffer, uint32 Size);
- virtual HRESULT Close();
- virtual HRESULT Open(const Common::String &Filename);
-private:
- byte *_data;
-};
-
-} // end of namespace WinterMute
-
-#endif
diff --git a/engines/wintermute/Base/scriptables/SXFile.cpp b/engines/wintermute/Base/scriptables/SXFile.cpp index e73f244f00..c869b6985d 100644 --- a/engines/wintermute/Base/scriptables/SXFile.cpp +++ b/engines/wintermute/Base/scriptables/SXFile.cpp @@ -209,8 +209,8 @@ HRESULT CSXFile::ScCallMethod(CScScript *Script, CScStack *Stack, CScStack *This bool FoundNewLine = false;
HRESULT Ret = E_FAIL;
do {
- Ret = _readFile->Read(&b, 1);
- if (FAILED(Ret)) break;
+ Ret = _readFile->read(&b, 1);
+ if (Ret != 1) break;
if (Counter > BufSize) {
Buf = (byte *)realloc(Buf, BufSize + FILE_BUFFER_SIZE);
@@ -260,8 +260,8 @@ HRESULT CSXFile::ScCallMethod(CScScript *Script, CScStack *Stack, CScStack *This HRESULT Ret = E_FAIL;
while (Counter < TextLen) {
- Ret = _readFile->Read(&b, 1);
- if (FAILED(Ret)) break;
+ Ret = _readFile->read(&b, 1);
+ if (Ret != 1) break;
if (Counter > BufSize) {
Buf = (byte *)realloc(Buf, BufSize + FILE_BUFFER_SIZE);
@@ -321,7 +321,7 @@ HRESULT CSXFile::ScCallMethod(CScScript *Script, CScStack *Stack, CScStack *This return S_OK;
}
bool Val;
- if (SUCCEEDED(_readFile->Read(&Val, sizeof(bool)))) Stack->PushBool(Val);
+ if (_readFile->read(&Val, sizeof(bool)) == sizeof(bool)) Stack->PushBool(Val);
else Stack->PushNULL();
return S_OK;
@@ -338,7 +338,7 @@ HRESULT CSXFile::ScCallMethod(CScScript *Script, CScStack *Stack, CScStack *This return S_OK;
}
byte Val;
- if (SUCCEEDED(_readFile->Read(&Val, sizeof(byte)))) Stack->PushInt(Val);
+ if (_readFile->read(&Val, sizeof(byte)) == sizeof(byte)) Stack->PushInt(Val);
else Stack->PushNULL();
return S_OK;
@@ -355,7 +355,7 @@ HRESULT CSXFile::ScCallMethod(CScScript *Script, CScStack *Stack, CScStack *This return S_OK;
}
short Val;
- if (SUCCEEDED(_readFile->Read(&Val, sizeof(short)))) Stack->PushInt(65536 + Val);
+ if (_readFile->read(&Val, sizeof(short)) == sizeof(short)) Stack->PushInt(65536 + Val);
else Stack->PushNULL();
return S_OK;
@@ -372,7 +372,7 @@ HRESULT CSXFile::ScCallMethod(CScScript *Script, CScStack *Stack, CScStack *This return S_OK;
}
int Val;
- if (SUCCEEDED(_readFile->Read(&Val, sizeof(int)))) Stack->PushInt(Val);
+ if (_readFile->read(&Val, sizeof(int)) == sizeof(int)) Stack->PushInt(Val);
else Stack->PushNULL();
return S_OK;
@@ -389,7 +389,7 @@ HRESULT CSXFile::ScCallMethod(CScScript *Script, CScStack *Stack, CScStack *This return S_OK;
}
float Val;
- if (SUCCEEDED(_readFile->Read(&Val, sizeof(float)))) Stack->PushFloat(Val);
+ if (_readFile->read(&Val, sizeof(float)) == sizeof(float)) Stack->PushFloat(Val);
else Stack->PushNULL();
return S_OK;
@@ -406,7 +406,7 @@ HRESULT CSXFile::ScCallMethod(CScScript *Script, CScStack *Stack, CScStack *This return S_OK;
}
double Val;
- if (SUCCEEDED(_readFile->Read(&Val, sizeof(double)))) Stack->PushFloat(Val);
+ if (_readFile->read(&Val, sizeof(double)) == sizeof(double)) Stack->PushFloat(Val);
else Stack->PushNULL();
return S_OK;
@@ -423,10 +423,10 @@ HRESULT CSXFile::ScCallMethod(CScScript *Script, CScStack *Stack, CScStack *This return S_OK;
}
uint32 Size;
- if (SUCCEEDED(_readFile->Read(&Size, sizeof(uint32)))) {
+ if (_readFile->read(&Size, sizeof(uint32)) == sizeof(uint32)) {
byte *Str = new byte[Size + 1];
if (Str) {
- if (SUCCEEDED(_readFile->Read(Str, Size))) {
+ if (_readFile->read(Str, Size) == Size) {
Str[Size] = '\0';
Stack->PushString((char *)Str);
}
@@ -652,21 +652,21 @@ HRESULT CSXFile::ScSetProperty(const char *Name, CScValue *Value) { //////////////////////////////////////////////////////////////////////////
uint32 CSXFile::GetPos() {
- if (_mode == 1 && _readFile) return _readFile->getPos();
+ if (_mode == 1 && _readFile) return _readFile->pos();
else if ((_mode == 2 || _mode == 3) && _writeFile) return ftell(_writeFile);
else return 0;
}
//////////////////////////////////////////////////////////////////////////
-bool CSXFile::SetPos(uint32 Pos, TSeek Origin) {
- if (_mode == 1 && _readFile) return SUCCEEDED(_readFile->Seek(Pos, Origin));
- else if ((_mode == 2 || _mode == 3) && _writeFile) return fseek(_writeFile, Pos, (int)Origin) == 0;
+bool CSXFile::SetPos(uint32 pos, TSeek origin) {
+ if (_mode == 1 && _readFile) return _readFile->seek(pos, origin);
+ else if ((_mode == 2 || _mode == 3) && _writeFile) return fseek(_writeFile, pos, (int)origin) == 0;
else return false;
}
//////////////////////////////////////////////////////////////////////////
uint32 CSXFile::GetLength() {
- if (_mode == 1 && _readFile) return _readFile->getSize();
+ if (_mode == 1 && _readFile) return _readFile->size();
else if ((_mode == 2 || _mode == 3) && _writeFile) {
uint32 CurrentPos = ftell(_writeFile);
fseek(_writeFile, 0, SEEK_END);
diff --git a/engines/wintermute/Base/scriptables/SXFile.h b/engines/wintermute/Base/scriptables/SXFile.h index f05a0e11ec..f1c6552a71 100644 --- a/engines/wintermute/Base/scriptables/SXFile.h +++ b/engines/wintermute/Base/scriptables/SXFile.h @@ -31,6 +31,7 @@ #include "engines/wintermute/Base/BScriptable.h"
+#include "common/stream.h"
namespace WinterMute {
@@ -46,7 +47,7 @@ public: CSXFile(CBGame *inGame, CScStack *Stack);
virtual ~CSXFile();
private:
- CBFile *_readFile;
+ Common::SeekableReadStream *_readFile;
FILE *_writeFile;
int _mode; // 0..none, 1..read, 2..write, 3..append
bool _textMode;
diff --git a/engines/wintermute/module.mk b/engines/wintermute/module.mk index 47c41be5cc..217317ece6 100644 --- a/engines/wintermute/module.mk +++ b/engines/wintermute/module.mk @@ -42,7 +42,6 @@ MODULE_OBJS := \ Base/scriptables/SXString.o \ Base/file/BDiskFile.o \ Base/file/BFile.o \ - Base/file/BResourceFile.o \ Base/file/BSaveThumbFile.o \ Base/file/BPkgFile.o \ Base/BActiveRect.o \ |