diff options
Diffstat (limited to 'engines/mads/resources.cpp')
-rw-r--r-- | engines/mads/resources.cpp | 6 |
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); } |