diff options
author | Sven Hesse | 2009-07-13 23:42:37 +0000 |
---|---|---|
committer | Sven Hesse | 2009-07-13 23:42:37 +0000 |
commit | 5913895ecc32b630a9645eb985940bf57f10d0e7 (patch) | |
tree | 13a562a32f093f596cefe9e8163854b92fa7fa40 /engines | |
parent | 581be82b8366bca93fc3ea1c70b7aec921ad56a2 (diff) | |
download | scummvm-rg350-5913895ecc32b630a9645eb985940bf57f10d0e7.tar.gz scummvm-rg350-5913895ecc32b630a9645eb985940bf57f10d0e7.tar.bz2 scummvm-rg350-5913895ecc32b630a9645eb985940bf57f10d0e7.zip |
Allow resource loading from EXT even if the TOT has none again
svn-id: r42463
Diffstat (limited to 'engines')
-rw-r--r-- | engines/gob/resources.cpp | 36 |
1 files changed, 18 insertions, 18 deletions
diff --git a/engines/gob/resources.cpp b/engines/gob/resources.cpp index 20427e547b..a16514fcbc 100644 --- a/engines/gob/resources.cpp +++ b/engines/gob/resources.cpp @@ -158,29 +158,29 @@ bool Resources::load(const Common::String &fileName) { _extFile = fileBase + ".ext"; - if (!loadTOTResourceTable()) { - unload(); - return false; - } + bool hasTOTRes = loadTOTResourceTable(); + bool hasEXTRes = loadEXTResourceTable(); - if (!loadEXTResourceTable()) { - unload(); + if (!hasTOTRes && !hasEXTRes) return false; - } - if (!loadTOTTextTable(fileBase)) { - unload(); - return false; - } + if (hasTOTRes) { + if (!loadTOTTextTable(fileBase)) { + unload(); + return false; + } - if (!loadIMFile()) { - unload(); - return false; + if (!loadIMFile()) { + unload(); + return false; + } } - if (!loadEXFile()) { - unload(); - return false; + if (hasEXTRes) { + if (!loadEXFile()) { + unload(); + return false; + } } return true; @@ -286,7 +286,7 @@ bool Resources::loadEXTResourceTable() { DataStream *stream = _vm->_dataIO->getDataStream(_extFile.c_str()); if (!stream) - return true; + return false; _extResourceTable->itemsCount = stream->readSint16LE(); _extResourceTable->unknown = stream->readByte(); |