diff options
| -rw-r--r-- | simon/simon.cpp | 26 | ||||
| -rw-r--r-- | simon/simon.h | 1 | 
2 files changed, 6 insertions, 21 deletions
| diff --git a/simon/simon.cpp b/simon/simon.cpp index 16ad0fb352..4e6d5b1062 100644 --- a/simon/simon.cpp +++ b/simon/simon.cpp @@ -828,46 +828,32 @@ void SimonState::loadTablesIntoMem(uint subr_id)  		warning("loadTablesIntoMem: didn't find %d", subr_id);  } -bool SimonState::readSting(uint a) +void SimonState::playSting(uint a)  { +	if (!midi._midi_sfx_toggle) +		return; +  	char filename[11];  	uint16 size;  	_mus_file = new File(); -	 -	sprintf(filename, "stings%i.mus", a); - +	sprintf(filename, "STINGS%i.MUS", a);  	_mus_file->open(filename, _gameDataPath); -  	if (!_mus_file->isOpen()) {  		warning("Can't load sound effect from '%s'", filename); -		return false; +		return;  	}  	size = _mus_file->readUint16LE(); -  	_mus_offsets = (uint16 *)malloc(size);  	_mus_file->seek(0, SEEK_SET); -  	if (_mus_file->read(_mus_offsets, size) != size)  		error("Cannot read offsets"); -	return true; -} - -void SimonState::playSting(uint a) -{ -	if (!midi._midi_sfx_toggle) -		return; - -	if (!readSting(_midi_sfx)) -		return; -	  	midi.shutdown();  	_mus_file->seek(_mus_offsets[a], SEEK_SET);  	midi.read_all_songs_old(_mus_file, a, _mus_offsets[a+1] - _mus_offsets[a]); -  	midi.initialize();  	midi.play();  } diff --git a/simon/simon.h b/simon/simon.h index 079e1ac8b8..11bf50b67b 100644 --- a/simon/simon.h +++ b/simon/simon.h @@ -103,7 +103,6 @@ public:  	File *_mus_file;  	uint16 *_mus_offsets; -	bool readSting(uint a);  	void playSting(uint a);  	byte *_vc_ptr;								/* video code ptr */ | 
