aboutsummaryrefslogtreecommitdiff
path: root/engines/mads/resources.cpp
diff options
context:
space:
mode:
authorFilippos Karapetis2014-05-20 15:07:45 +0300
committerFilippos Karapetis2014-05-20 15:07:45 +0300
commit555b4dfd6e076dd5ef5cfc982fb5dbf3e211d198 (patch)
tree8ac0137523df2353d6d437daecb39a66c29563dd /engines/mads/resources.cpp
parenteb7d018b4acc4c0d0614ed185b632c618636d727 (diff)
downloadscummvm-rg350-555b4dfd6e076dd5ef5cfc982fb5dbf3e211d198.tar.gz
scummvm-rg350-555b4dfd6e076dd5ef5cfc982fb5dbf3e211d198.tar.bz2
scummvm-rg350-555b4dfd6e076dd5ef5cfc982fb5dbf3e211d198.zip
MADS: Load scene speech resources for V2 CD games
Diffstat (limited to 'engines/mads/resources.cpp')
-rw-r--r--engines/mads/resources.cpp9
1 files changed, 8 insertions, 1 deletions
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());