From 346e697f40c83d26b4037467b86e8a7726855b40 Mon Sep 17 00:00:00 2001 From: Travis Howell Date: Sun, 15 Jun 2003 05:04:17 +0000 Subject: Small cleanup svn-id: r8500 --- simon/simon.cpp | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'simon') diff --git a/simon/simon.cpp b/simon/simon.cpp index 9cd8985081..2a28483acd 100644 --- a/simon/simon.cpp +++ b/simon/simon.cpp @@ -1075,23 +1075,23 @@ void SimonEngine::playSting(uint a) { char filename[11]; uint16 size; - _mus_file = new File(); + File _mus_file; sprintf(filename, "STINGS%i.MUS", _midi_sfx); - _mus_file->open(filename, _gameDataPath); - if (!_mus_file->isOpen()) { + _mus_file.open(filename, _gameDataPath); + if (!_mus_file.isOpen()) { warning("Can't load sound effect from '%s'", filename); return; } - size = _mus_file->readUint16LE(); + size = _mus_file.readUint16LE(); _mus_offsets = (uint16 *)malloc(size); - _mus_file->seek(0, SEEK_SET); - if (_mus_file->read(_mus_offsets, size) != size) + _mus_file.seek(0, SEEK_SET); + if (_mus_file.read(_mus_offsets, size) != size) error("Can't read offsets"); - _mus_file->seek(_mus_offsets[a], SEEK_SET); - midi.loadSMF (_mus_file, a, true); + _mus_file.seek(_mus_offsets[a], SEEK_SET); + midi.loadSMF (&_mus_file, a, true); midi.startTrack (0); } -- cgit v1.2.3