[Scummvm-cvs-logs] CVS: scummvm/backends/midi adlib.cpp,1.23,1.24

Max Horn fingolfin at users.sourceforge.net
Tue May 20 07:18:04 CEST 2003


Update of /cvsroot/scummvm/scummvm/backends/midi
In directory sc8-pr-cvs1:/tmp/cvs-serv20324/backends/midi

Modified Files:
	adlib.cpp 
Log Message:
yet more memoy init fixes

Index: adlib.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/backends/midi/adlib.cpp,v
retrieving revision 1.23
retrieving revision 1.24
diff -u -d -r1.23 -r1.24
--- adlib.cpp	20 May 2003 14:08:33 -0000	1.23
+++ adlib.cpp	20 May 2003 14:17:18 -0000	1.24
@@ -49,6 +49,8 @@
 	byte flags_b;
 	InstrumentExtra extra_b;
 	byte duration;
+
+	AdlibInstrument() { memset(this, 0, sizeof(AdlibInstrument)); }
 };
 
 class AdlibPart : public MidiChannel {
@@ -77,6 +79,22 @@
 	void allocate() { _allocated = true; }
 
 public:
+	AdlibPart() {
+		_voice = 0;
+		_pitchbend = 0;
+		_transpose_eff = 0;
+		_vol_eff = 0;
+		_detune_eff = 0;
+		_modwheel = 0;
+		_pedal = 0;
+		_program = 0;
+		_pri_eff = 0;
+		
+		_owner = 0;
+		_allocated = false;
+		_channel = 0;
+	}
+
 	MidiDriver *device();
 	byte getNumber() { return _channel; }
 	void release() { _allocated = false; }





More information about the Scummvm-git-logs mailing list