aboutsummaryrefslogtreecommitdiff
path: root/engines/glk/glk.cpp
diff options
context:
space:
mode:
authorPaul Gilbert2018-12-08 12:18:10 -0800
committerPaul Gilbert2018-12-08 19:05:59 -0800
commit08db684864f0734a2d93641dc7a23ce117073eb4 (patch)
treeb039d24f7ed4c63719a3eb1f905050d92f007e22 /engines/glk/glk.cpp
parent43283ff561233d5e67cc15d8f1c3da4489156c0c (diff)
downloadscummvm-rg350-08db684864f0734a2d93641dc7a23ce117073eb4.tar.gz
scummvm-rg350-08db684864f0734a2d93641dc7a23ce117073eb4.tar.bz2
scummvm-rg350-08db684864f0734a2d93641dc7a23ce117073eb4.zip
GLK: Add support for secondary Blorb files separate from the gamefile
It also hads further support for playing AIFF files. However, the Blorb files for Lurking Horror & Sherlock on the if-archive website don't seem to be valid AIFF files, so sound doesn't play using them
Diffstat (limited to 'engines/glk/glk.cpp')
-rw-r--r--engines/glk/glk.cpp14
1 files changed, 14 insertions, 0 deletions
diff --git a/engines/glk/glk.cpp b/engines/glk/glk.cpp
index c8a63c5bd3..849de8d8f3 100644
--- a/engines/glk/glk.cpp
+++ b/engines/glk/glk.cpp
@@ -122,6 +122,20 @@ Common::Error GlkEngine::run() {
if (!f.open("game", *_blorb))
return Common::kNoGameDataFoundError;
} else {
+ // Check for a secondary blorb file with the same filename
+ Common::String baseName = filename;
+ while (baseName.contains('.'))
+ baseName.deleteLastChar();
+
+ if (f.exists(baseName + ".blorb")) {
+ _blorb = new Blorb(baseName + ".blorb", getInterpreterType());
+ SearchMan.add("blorb", _blorb, 99, false);
+ } else if (f.exists(baseName + ".blb")) {
+ _blorb = new Blorb(baseName + ".blb", getInterpreterType());
+ SearchMan.add("blorb", _blorb, 99, false);
+ }
+
+ // Open up the game file
if (!f.open(filename))
return Common::kNoGameDataFoundError;
}