aboutsummaryrefslogtreecommitdiff
path: root/sound.cpp
diff options
context:
space:
mode:
authorLudvig Strigeus2001-11-29 22:29:38 +0000
committerLudvig Strigeus2001-11-29 22:29:38 +0000
commit5ff70c5de11ad1c68b8f53e41324f3e5a264b255 (patch)
tree03e3ee44740c53744fca712a12732b58a02a058f /sound.cpp
parentf61b4b7c96b17e0595f172d642ecd3ddd008d760 (diff)
downloadscummvm-rg350-5ff70c5de11ad1c68b8f53e41324f3e5a264b255.tar.gz
scummvm-rg350-5ff70c5de11ad1c68b8f53e41324f3e5a264b255.tar.bz2
scummvm-rg350-5ff70c5de11ad1c68b8f53e41324f3e5a264b255.zip
open <_exe_name>.sou if that file exists instead of monster.sou
svn-id: r3509
Diffstat (limited to 'sound.cpp')
-rw-r--r--sound.cpp13
1 files changed, 12 insertions, 1 deletions
diff --git a/sound.cpp b/sound.cpp
index 1a0c0a6564..a645a0552a 100644
--- a/sound.cpp
+++ b/sound.cpp
@@ -367,7 +367,18 @@ void Scumm::startSfxSound(void *file) {
}
void *Scumm::openSfxFile() {
- return fopen("monster.sou", "rb");
+ char buf[50];
+ FILE *file;
+
+ /* Try opening the file <_exe_name>.sou first, eg tentacle.sou.
+ * That way, you can keep .sou files for multiple games in the
+ * same directory */
+
+ sprintf(buf, "%s.sou", _exe_name);
+ file = fopen(buf, "rb");
+ if (!file)
+ file = fopen("monster.sou", "rb");
+ return file;
}
#define NUM_MIXER 4