aboutsummaryrefslogtreecommitdiff
path: root/engines/simon/sound.cpp
diff options
context:
space:
mode:
authorTorbjörn Andersson2006-04-16 16:56:11 +0000
committerTorbjörn Andersson2006-04-16 16:56:11 +0000
commit75e851777b71b04576b255864e65159faaa79ebd (patch)
treea02f11f7b7c06945383035d2a76ad6ae547a6fbf /engines/simon/sound.cpp
parentd5909ee1228a3f7527642ae1a6ec441273dccc4c (diff)
downloadscummvm-rg350-75e851777b71b04576b255864e65159faaa79ebd.tar.gz
scummvm-rg350-75e851777b71b04576b255864e65159faaa79ebd.tar.bz2
scummvm-rg350-75e851777b71b04576b255864e65159faaa79ebd.zip
The File class automatically tries adding "." to a filename if the file cannot
be found, so there's no need for the Simon engine to do it. (Though the game detector still does at the moment.) svn-id: r21947
Diffstat (limited to 'engines/simon/sound.cpp')
-rw-r--r--engines/simon/sound.cpp26
1 files changed, 5 insertions, 21 deletions
diff --git a/engines/simon/sound.cpp b/engines/simon/sound.cpp
index 4dd7df3b04..87e1151dd0 100644
--- a/engines/simon/sound.cpp
+++ b/engines/simon/sound.cpp
@@ -389,17 +389,9 @@ void Sound::readSfxFile(const char *filename) {
file->open(filename);
if (file->isOpen() == false) {
- char *filename2;
- filename2 = (char *)malloc(strlen(filename) + 2);
- strcpy(filename2, filename);
- strcat(filename2, ".");
- file->open(filename2);
- free(filename2);
- if (file->isOpen() == false) {
- if (atoi(filename + 6) != 1 && atoi(filename + 6) != 30)
- warning("readSfxFile: Can't load sfx file %s", filename);
- return;
- }
+ if (atoi(filename + 6) != 1 && atoi(filename + 6) != 30)
+ warning("readSfxFile: Can't load sfx file %s", filename);
+ return;
}
delete _effects;
@@ -425,16 +417,8 @@ void Sound::readVoiceFile(const char *filename) {
file->open(filename);
if (file->isOpen() == false) {
- char *filename2;
- filename2 = (char *)malloc(strlen(filename) + 2);
- strcpy(filename2, filename);
- strcat(filename2, ".");
- file->open(filename2);
- free(filename2);
- if (file->isOpen() == false) {
- warning("readVoiceFile: Can't load voice file %s", filename);
- return;
- }
+ warning("readVoiceFile: Can't load voice file %s", filename);
+ return;
}
delete _voice;