[Scummvm-cvs-logs] CVS: scummvm/simon sound.cpp,1.18,1.19 sound.h,1.6,1.7 simon.h,1.75,1.76
Oliver Kiehl
olki at users.sourceforge.net
Sun Jun 15 02:56:06 CEST 2003
Update of /cvsroot/scummvm/scummvm/simon
In directory sc8-pr-cvs1:/tmp/cvs-serv5205
Modified Files:
sound.cpp sound.h simon.h
Log Message:
cleanup
Index: sound.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/simon/sound.cpp,v
retrieving revision 1.18
retrieving revision 1.19
diff -u -d -r1.18 -r1.19
--- sound.cpp 14 Jun 2003 15:19:41 -0000 1.18
+++ sound.cpp 15 Jun 2003 09:55:10 -0000 1.19
@@ -138,12 +138,14 @@
}
}
+ delete _effects;
_effects = new WavSound(_mixer, file);
}
void SimonSound::loadSfxTable(File *gameFile, uint32 base) {
stopAll();
+ delete _effects;
if (_game & GF_WIN)
_effects = new WavSound(_mixer, gameFile, base);
else
@@ -159,6 +161,7 @@
if (file->isOpen() == false) {
warning("Can't open voice file %s", filename);
} else {
+ delete _voice;
_voice = new WavSound(_mixer, file, _offsets);
}
}
@@ -264,6 +267,11 @@
_file = file;
_offsets = offsets;
}
+
+SimonSound::Sound::~Sound() { delete _file; }
+SimonSound::WavSound::~WavSound() { delete _file; }
+SimonSound::VocSound::~VocSound() { delete _file; }
+SimonSound::MP3Sound::~MP3Sound() { delete _file; }
#if !defined(__GNUC__)
#pragma START_PACK_STRUCTS
Index: sound.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/simon/sound.h,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -d -r1.6 -r1.7
--- sound.h 20 May 2003 15:17:21 -0000 1.6
+++ sound.h 15 Jun 2003 09:55:10 -0000 1.7
@@ -31,6 +31,7 @@
public:
Sound(SoundMixer *mixer, File *file, uint32 base = 0);
Sound(SoundMixer *mixer, File *file, uint32 *offsets);
+ virtual ~Sound();
virtual int playSound(uint sound, PlayingSoundHandle *handle, byte flags = 0) = 0;
};
@@ -38,18 +39,21 @@
public:
WavSound(SoundMixer *mixer, File *file, uint32 base = 0) : Sound(mixer, file, base) {};
WavSound(SoundMixer *mixer, File *file, uint32 *offsets) : Sound(mixer, file, offsets) {};
+ ~WavSound();
int playSound(uint sound, PlayingSoundHandle *handle, byte flags = 0);
};
class VocSound : public Sound {
public:
VocSound(SoundMixer *mixer, File *file, uint32 base = 0) : Sound(mixer, file, base) {};
+ ~VocSound();
int playSound(uint sound, PlayingSoundHandle *handle, byte flags = 0);
};
class MP3Sound : public Sound {
public:
MP3Sound(SoundMixer *mixer, File *file, uint32 base = 0) : Sound(mixer, file, base) {};
+ ~MP3Sound();
int playSound(uint sound, PlayingSoundHandle *handle, byte flags = 0);
};
Index: simon.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/simon/simon.h,v
retrieving revision 1.75
retrieving revision 1.76
diff -u -d -r1.75 -r1.76
--- simon.h 15 Jun 2003 05:19:00 -0000 1.75
+++ simon.h 15 Jun 2003 09:55:10 -0000 1.76
@@ -104,9 +104,6 @@
class SimonEngine : public Engine {
void errorString(const char *buf_input, char *buf_output);
public:
- File *_mus_file;
- uint16 *_mus_offsets;
-
void playSting(uint a);
byte *_vc_ptr; /* video code ptr */
More information about the Scummvm-git-logs
mailing list