From 555b4dfd6e076dd5ef5cfc982fb5dbf3e211d198 Mon Sep 17 00:00:00 2001 From: Filippos Karapetis Date: Tue, 20 May 2014 15:07:45 +0300 Subject: MADS: Load scene speech resources for V2 CD games --- engines/mads/resources.cpp | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/engines/mads/resources.cpp b/engines/mads/resources.cpp index 83077b602f..0d5aee1526 100644 --- a/engines/mads/resources.cpp +++ b/engines/mads/resources.cpp @@ -149,7 +149,7 @@ Common::SeekableReadStream *HagArchive::createReadStreamForMember(const Common:: void HagArchive::loadIndex(MADSEngine *vm) { Common::File hagFile; - for (int sectionIndex = -1; sectionIndex < 10; ++sectionIndex) { + for (int sectionIndex = -1; sectionIndex < 11; ++sectionIndex) { if (sectionIndex == 0) continue; @@ -167,6 +167,13 @@ void HagArchive::loadIndex(MADSEngine *vm) { Common::String filename = (sectionIndex == -1) ? "GLOBAL.HAG" : Common::String::format("SECTION%d.HAG", sectionIndex); + if (sectionIndex == 10) { + // Speech + if (!Common::File::exists("SPEECH.HAG")) + break; + else + filename = "SPEECH.HAG"; + } if (!hagFile.open(filename)) error("Could not locate HAG file - %s", filename.c_str()); -- cgit v1.2.3