aboutsummaryrefslogtreecommitdiff
path: root/engines/mads/resources.cpp
diff options
context:
space:
mode:
authorPaul Gilbert2016-07-26 19:48:14 -0400
committerPaul Gilbert2016-07-26 19:48:14 -0400
commit504cf6ecb688a3f1c65a857bffd527d8b0e6ba63 (patch)
tree0c0d96d4061c11850c851f0fc981c75a58c20515 /engines/mads/resources.cpp
parentd8c28d15ae553d047b7e571f98727fa79ee143f3 (diff)
parente19922d181e775791f9105b8be7ff410770ede51 (diff)
downloadscummvm-rg350-504cf6ecb688a3f1c65a857bffd527d8b0e6ba63.tar.gz
scummvm-rg350-504cf6ecb688a3f1c65a857bffd527d8b0e6ba63.tar.bz2
scummvm-rg350-504cf6ecb688a3f1c65a857bffd527d8b0e6ba63.zip
Merge branch 'master' into xeen
Diffstat (limited to 'engines/mads/resources.cpp')
-rw-r--r--engines/mads/resources.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/engines/mads/resources.cpp b/engines/mads/resources.cpp
index d5352fb205..16019a4b07 100644
--- a/engines/mads/resources.cpp
+++ b/engines/mads/resources.cpp
@@ -79,7 +79,7 @@ private:
*/
ResourceType getResourceType(const Common::String &resourceName) const;
public:
- HagArchive(MADSEngine *vm);
+ explicit HagArchive(MADSEngine *vm);
virtual ~HagArchive();
// Archive implementation
@@ -151,7 +151,7 @@ void HagArchive::loadIndex(MADSEngine *vm) {
Common::File hagFile;
for (int sectionIndex = -1; sectionIndex < 11; ++sectionIndex) {
- if (sectionIndex == 0)
+ if (sectionIndex == 0 && !Common::File::exists("SECTION0.HAG"))
continue;
// Dragonsphere does not have some sections - skip them
@@ -239,7 +239,7 @@ Common::String HagArchive::getResourceFilename(const Common::String &resourceNam
int value = atoi(resourceName.c_str() + 2);
int hagFileNum = (resType == RESTYPE_ROOM) ? value / 100 : value;
- if (hagFileNum > 0)
+ if (hagFileNum >= 0)
outputFilename = Common::String::format("SECTION%d.HAG", hagFileNum);
}