diff options
author | Eugene Sandulenko | 2013-06-20 17:21:37 -0400 |
---|---|---|
committer | Eugene Sandulenko | 2013-09-06 14:48:14 +0300 |
commit | 925f41b9c4055d39498c61c8f22388176ee25cce (patch) | |
tree | f82d06ee8ba7c3fc3c570ed3ab0036c624c5bc68 /engines/fullpipe/utils.cpp | |
parent | bb4ea153ffa5eaf5be3e912e206566f7c9278a87 (diff) | |
download | scummvm-rg350-925f41b9c4055d39498c61c8f22388176ee25cce.tar.gz scummvm-rg350-925f41b9c4055d39498c61c8f22388176ee25cce.tar.bz2 scummvm-rg350-925f41b9c4055d39498c61c8f22388176ee25cce.zip |
FULLPIPE: Made MfcArchive work with both files and archives
Diffstat (limited to 'engines/fullpipe/utils.cpp')
-rw-r--r-- | engines/fullpipe/utils.cpp | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/engines/fullpipe/utils.cpp b/engines/fullpipe/utils.cpp index 26c03ceeea..468d03b6f9 100644 --- a/engines/fullpipe/utils.cpp +++ b/engines/fullpipe/utils.cpp @@ -30,12 +30,14 @@ namespace Fullpipe { bool CObject::loadFile(const char *fname) { - MfcArchive file; + Common::File file; if (!file.open(fname)) return false; - return load(file); + MfcArchive archive(&file); + + return load(archive); } bool CObList::load(MfcArchive &file) { @@ -201,7 +203,7 @@ static CObject *createObject(int objectId) { return 0; } -MfcArchive::MfcArchive() { +MfcArchive::MfcArchive(Common::SeekableReadStream *stream) { for (int i = 0; classMap[i].name; i++) { _classMap[classMap[i].name] = classMap[i].id; } @@ -209,6 +211,8 @@ MfcArchive::MfcArchive() { _lastIndex = 1; _level = 0; + _stream = stream; + _objectMap.push_back(0); _objectIdMap.push_back(kNullObject); } |