From 4598518dbc6562e1025f8d3fc02fe97f8099c55a Mon Sep 17 00:00:00 2001 From: Oliver Kiehl Date: Sun, 8 Dec 2002 23:06:11 +0000 Subject: now simon versions with trailing dots after filenames also load correctly svn-id: r5891 --- simon/sound.cpp | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) (limited to 'simon/sound.cpp') diff --git a/simon/sound.cpp b/simon/sound.cpp index be2eef7803..3c316396b5 100644 --- a/simon/sound.cpp +++ b/simon/sound.cpp @@ -94,9 +94,15 @@ void SimonSound::readSfxFile(const char *filename, const char *gameDataPath) file->open(filename, gameDataPath); if (file->isOpen() == false) { - if (atoi(filename + 6) != 1 && atoi(filename + 6) != 30) - warning("readSfxFile: Cannot load sfx file %s", filename); - return; + char filename2[strlen(filename) + 1]; + strcpy(filename2, filename); + strcat(filename2, "."); + file->open(filename2, gameDataPath); + if (file->isOpen() == false) { + if (atoi(filename + 6) != 1 && atoi(filename + 6) != 30) + warning("readSfxFile: Cannot load sfx file %s", filename); + return; + } } _effects = new WavSound(_mixer, file); -- cgit v1.2.3