1 | Index: scummvm/scumm/sound.cpp
|
---|
2 | ===================================================================
|
---|
3 | RCS file: /cvsroot/scummvm/scummvm/scumm/sound.cpp,v
|
---|
4 | retrieving revision 1.2
|
---|
5 | diff -c -r1.2 sound.cpp
|
---|
6 | *** scummvm/scumm/sound.cpp 31 Aug 2002 09:50:36 -0000 1.2
|
---|
7 | --- scummvm/scumm/sound.cpp 1 Sep 2002 19:18:18 -0000
|
---|
8 | ***************
|
---|
9 | *** 711,716 ****
|
---|
10 | --- 711,717 ----
|
---|
11 | void * Sound::openSfxFile() {
|
---|
12 | char buf[256];
|
---|
13 | FILE *file = NULL;
|
---|
14 | + char *ptr;
|
---|
15 |
|
---|
16 | /* Try opening the file <_exe_name>.sou first, eg tentacle.sou.
|
---|
17 | * That way, you can keep .sou files for multiple games in the
|
---|
18 | ***************
|
---|
19 | *** 721,729 ****
|
---|
20 | --- 722,741 ----
|
---|
21 | sprintf(buf, "%s%s.so3", _scumm->getGameDataPath(), _scumm->_exe_name);
|
---|
22 | file = fopen(buf, "rb");
|
---|
23 | if (!file) {
|
---|
24 | + ptr=buf+strlen(_scumm->getGameDataPath());
|
---|
25 | + do
|
---|
26 | + *ptr++ = toupper(*ptr);
|
---|
27 | + while (*ptr);
|
---|
28 | + file = fopen(buf, "rb");
|
---|
29 | + }
|
---|
30 | + if (!file) {
|
---|
31 | sprintf(buf, "%smonster.so3", _scumm->getGameDataPath());
|
---|
32 | file = fopen(buf, "rb");
|
---|
33 | }
|
---|
34 | + if (!file) {
|
---|
35 | + sprintf(buf, "%sMONSTER.SO3", _scumm->getGameDataPath());
|
---|
36 | + file = fopen(buf, "rb");
|
---|
37 | + }
|
---|
38 | if (file != NULL) {
|
---|
39 | /* Now load the 'offset' index in memory to be able to find the MP3 data
|
---|
40 |
|
---|
41 | ***************
|
---|
42 | *** 762,768 ****
|
---|
43 | --- 774,791 ----
|
---|
44 | sprintf(buf, "%s%s.sou", _scumm->getGameDataPath(), _scumm->_exe_name);
|
---|
45 | file = fopen(buf, "rb");
|
---|
46 | if (!file) {
|
---|
47 | + ptr=buf+strlen(_scumm->getGameDataPath());
|
---|
48 | + do
|
---|
49 | + *ptr++ = toupper(*ptr);
|
---|
50 | + while (*ptr);
|
---|
51 | + file = fopen(buf, "rb");
|
---|
52 | + }
|
---|
53 | + if (!file) {
|
---|
54 | sprintf(buf, "%smonster.sou", _scumm->getGameDataPath());
|
---|
55 | + file = fopen(buf, "rb");
|
---|
56 | + }
|
---|
57 | + if (!file) {
|
---|
58 | + sprintf(buf, "%sMONSTER.SOU", _scumm->getGameDataPath());
|
---|
59 | file = fopen(buf, "rb");
|
---|
60 | }
|
---|
61 | return file;
|
---|