diff options
| author | Oliver Kiehl | 2002-12-08 23:06:11 +0000 | 
|---|---|---|
| committer | Oliver Kiehl | 2002-12-08 23:06:11 +0000 | 
| commit | 4598518dbc6562e1025f8d3fc02fe97f8099c55a (patch) | |
| tree | 72f66fa2005bcd0348896e07d4c8b862b2c3dc6e | |
| parent | a112545d7ebe9620aed629640f3504df54912b9d (diff) | |
| download | scummvm-rg350-4598518dbc6562e1025f8d3fc02fe97f8099c55a.tar.gz scummvm-rg350-4598518dbc6562e1025f8d3fc02fe97f8099c55a.tar.bz2 scummvm-rg350-4598518dbc6562e1025f8d3fc02fe97f8099c55a.zip | |
now simon versions with trailing dots after filenames also load correctly
svn-id: r5891
| -rw-r--r-- | simon/res.cpp | 17 | ||||
| -rw-r--r-- | simon/sound.cpp | 12 | 
2 files changed, 22 insertions, 7 deletions
| diff --git a/simon/res.cpp b/simon/res.cpp index fcf4444a2e..f179986936 100644 --- a/simon/res.cpp +++ b/simon/res.cpp @@ -102,8 +102,14 @@ bool SimonState::loadGamePcFile(const char *filename)  	/* read main gamepc file */  	in->open(filename, _gameDataPath); -	if (in->isOpen() == false) -		return false; +	if (in->isOpen() == false) { +		char filename2[strlen(filename) + 1]; +		strcpy(filename2, filename); +		strcat(filename2, "."); +		in->open(filename2, _gameDataPath); +		if (in->isOpen() == false) +			return false; +	}  	num_inited_objects = allocGamePcVars(in); @@ -121,8 +127,11 @@ bool SimonState::loadGamePcFile(const char *filename)  	/* Read list of TABLE resources */  	in->open("TBLLIST", _gameDataPath); -	if (in->isOpen() == false) -		return false; +	if (in->isOpen() == false) { +		in->open("TBLLIST.", _gameDataPath); +		if (in->isOpen() == false) +			return false; +	}  	file_size = in->size(); 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); | 
