aboutsummaryrefslogtreecommitdiff
path: root/simon
diff options
context:
space:
mode:
authorTravis Howell2003-06-15 05:04:17 +0000
committerTravis Howell2003-06-15 05:04:17 +0000
commit346e697f40c83d26b4037467b86e8a7726855b40 (patch)
treee83b0cb6bd1d77fd5d0a4d56c70fbc0205906b7b /simon
parent46e8ed44c0d31ec4a5612f1ce6c3ebc0232312cb (diff)
downloadscummvm-rg350-346e697f40c83d26b4037467b86e8a7726855b40.tar.gz
scummvm-rg350-346e697f40c83d26b4037467b86e8a7726855b40.tar.bz2
scummvm-rg350-346e697f40c83d26b4037467b86e8a7726855b40.zip
Small cleanup
svn-id: r8500
Diffstat (limited to 'simon')
-rw-r--r--simon/simon.cpp16
1 files changed, 8 insertions, 8 deletions
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);
}