[Scummvm-cvs-logs] CVS: scummvm/simon simon.cpp,1.29,1.30 simon.h,1.5,1.6
Max Horn
fingolfin at users.sourceforge.net
Fri Oct 25 09:20:20 CEST 2002
Update of /cvsroot/scummvm/scummvm/simon
In directory usw-pr-cvs1:/tmp/cvs-serv18362
Modified Files:
simon.cpp simon.h
Log Message:
cleanup
Index: simon.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/simon/simon.cpp,v
retrieving revision 1.29
retrieving revision 1.30
diff -u -d -r1.29 -r1.30
--- simon.cpp 24 Oct 2002 09:40:20 -0000 1.29
+++ simon.cpp 25 Oct 2002 15:32:56 -0000 1.30
@@ -4750,9 +4750,9 @@
_voice_file->seek(_voice_offsets[voice], SEEK_SET);
const char *s2 = gss->wav_filename2;
- _music_file = new File();
- _music_file->open(s2, _gameDataPath);
- if (_music_file->isOpen() == false) { /* WAVE audio */
+ File music_file;
+ music_file.open(s2, _gameDataPath);
+ if (music_file.isOpen() == false) { /* WAVE audio */
WaveHeader wave_hdr;
uint32 data[2];
@@ -4842,9 +4842,9 @@
/* Simon 2 dos talkie sfx aren't supported */
/* Simon 2 dos sfx isn't supported */
const char *s2 = gss->wav_filename2;
- _music_file = new File();
- _music_file->open(s2, _gameDataPath);
- if (_music_file->isOpen() == false) {
+ File music_file;
+ music_file.open(s2, _gameDataPath);
+ if (music_file.isOpen() == false) {
byte *p;
@@ -4885,31 +4885,31 @@
/* Simon 1/2 dos talkie music aren't supported */
/* Simon 2 dos music isn't supported */
const char *s2 = gss->wav_filename2;
- _music_file = new File();
- _music_file->open(s2, _gameDataPath);
- if (_music_file->isOpen() == false) {
-
- midi.shutdown();
+ File music_file;
+ music_file.open(s2, _gameDataPath);
+ if (music_file.isOpen() == false) {
- if (_game & GAME_WIN) {
- _game_file->seek(_game_offsets_ptr[gss->MUSIC_INDEX_BASE + music], SEEK_SET);
- File *f = _game_file;
- midi.read_all_songs(f);
- } else {
- char buf[50];
- File *f = new File();
- sprintf(buf, "MOD%d.MUS", music);
- f->open(buf, _gameDataPath);
- if (f->isOpen() == false) {
- warning("Cannot load music from '%s'", buf);
- return;
+ midi.shutdown();
+
+ if (_game & GAME_WIN) {
+ _game_file->seek(_game_offsets_ptr[gss->MUSIC_INDEX_BASE + music], SEEK_SET);
+ File *f = _game_file;
+ midi.read_all_songs(f);
+ } else {
+ char buf[50];
+ File *f = new File();
+ sprintf(buf, "MOD%d.MUS", music);
+ f->open(buf, _gameDataPath);
+ if (f->isOpen() == false) {
+ warning("Cannot load music from '%s'", buf);
+ return;
+ }
+ midi.read_all_songs_old(f);
+ delete f;
}
- midi.read_all_songs_old(f);
- delete f;
- }
-
- midi.initialize();
- midi.play();
+
+ midi.initialize();
+ midi.play();
}
}
Index: simon.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/simon/simon.h,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -d -r1.5 -r1.6
--- simon.h 24 Oct 2002 09:40:20 -0000 1.5
+++ simon.h 25 Oct 2002 15:32:56 -0000 1.6
@@ -124,9 +124,7 @@
GAME_SIMON1DEMO = 4,
};
-
File *_game_file;
- File *_music_file;
File *_voice_file;
uint32 *_voice_offsets;
File *_effects_file;
More information about the Scummvm-git-logs
mailing list