[Scummvm-cvs-logs] CVS: scummvm/scumm imuse_digi.cpp,1.50,1.51 imuse_digi.h,1.16,1.17 midiparser_eup.cpp,1.5,1.6 player_mod.cpp,2.8,2.9 player_mod.h,2.7,2.8 player_v1.cpp,1.12,1.13 player_v1.h,1.10,1.11 player_v2.cpp,2.37,2.38 player_v2.h,2.19,2.20 player_v2a.cpp,2.10,2.11 player_v2a.h,2.4,2.5 player_v3a.cpp,1.14,1.15 player_v3a.h,1.12,1.13

Max Horn fingolfin at users.sourceforge.net
Fri Oct 3 16:33:03 CEST 2003


Update of /cvsroot/scummvm/scummvm/scumm
In directory sc8-pr-cvs1:/tmp/cvs-serv29686

Modified Files:
	imuse_digi.cpp imuse_digi.h midiparser_eup.cpp player_mod.cpp 
	player_mod.h player_v1.cpp player_v1.h player_v2.cpp 
	player_v2.h player_v2a.cpp player_v2a.h player_v3a.cpp 
	player_v3a.h 
Log Message:
cleanup / doxygenification

Index: imuse_digi.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/imuse_digi.cpp,v
retrieving revision 1.50
retrieving revision 1.51
diff -u -d -r1.50 -r1.51
--- imuse_digi.cpp	3 Oct 2003 18:33:54 -0000	1.50
+++ imuse_digi.cpp	3 Oct 2003 23:32:34 -0000	1.51
@@ -28,13 +28,6 @@
 
 namespace Scumm {
 
-////////////////////////////////////////
-//
-// iMuse Digital Implementation
-//   for SCUMM v7 and higher
-//
-////////////////////////////////////////
-
 struct imuse_music_table {
 	int room;
 	int id;

Index: imuse_digi.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/imuse_digi.h,v
retrieving revision 1.16
retrieving revision 1.17
diff -u -d -r1.16 -r1.17
--- imuse_digi.h	3 Oct 2003 18:33:54 -0000	1.16
+++ imuse_digi.h	3 Oct 2003 23:32:34 -0000	1.17
@@ -35,6 +35,9 @@
 
 class ScummEngine;
 
+/**
+ * iMuse Digital Implementation for SCUMM v7 and higher.
+ */
 class IMuseDigital : public MusicEngine {
 private:
 

Index: midiparser_eup.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/midiparser_eup.cpp,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -d -r1.5 -r1.6
--- midiparser_eup.cpp	3 Oct 2003 18:33:54 -0000	1.5
+++ midiparser_eup.cpp	3 Oct 2003 23:32:34 -0000	1.6
@@ -27,12 +27,9 @@
 
 namespace Scumm {
 
-//////////////////////////////////////////////////
-//
-// The FM Towns Euphony version of MidiParser
-//
-//////////////////////////////////////////////////
-
+/**
+ * The FM Towns Euphony version of MidiParser.
+ */
 class MidiParser_EUP : public MidiParser {
 protected:
 	struct {

Index: player_mod.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/player_mod.cpp,v
retrieving revision 2.8
retrieving revision 2.9
diff -u -d -r2.8 -r2.9
--- player_mod.cpp	3 Oct 2003 18:33:54 -0000	2.8
+++ player_mod.cpp	3 Oct 2003 23:32:34 -0000	2.9
@@ -24,12 +24,6 @@
 
 namespace Scumm {
 
-////////////////////////////////////////
-//
-// Generic Amiga MOD mixer - provides a 60Hz 'update' routine.
-//
-////////////////////////////////////////
-
 Player_MOD::Player_MOD(ScummEngine *scumm) {
 	int i;
 	_mixer = scumm->_mixer;

Index: player_mod.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/player_mod.h,v
retrieving revision 2.7
retrieving revision 2.8
diff -u -d -r2.7 -r2.8
--- player_mod.h	3 Oct 2003 18:33:54 -0000	2.7
+++ player_mod.h	3 Oct 2003 23:32:34 -0000	2.8
@@ -30,8 +30,9 @@
 
 namespace Scumm {
 
-#define	MOD_MAXCHANS	16
-
+/**
+ * Generic Amiga MOD mixer - provides a 60Hz 'update' routine.
+ */
 class Player_MOD {
 public:
 	Player_MOD(ScummEngine *scumm);
@@ -50,11 +51,9 @@
 	virtual void clearUpdateProc();
 
 private:
-	SoundMixer *_mixer;
-
-	uint32 _mixamt;
-	uint32 _mixpos;
-	int _samplerate;
+	enum {
+		MOD_MAXCHANS = 16
+	};
 
 	struct soundChan
 	{
@@ -66,6 +65,13 @@
 		RateConverter *converter;
 		AudioInputStream *input;
 	};
+
+	SoundMixer *_mixer;
+
+	uint32 _mixamt;
+	uint32 _mixpos;
+	int _samplerate;
+
 	soundChan _channels[MOD_MAXCHANS];
 
 	uint8 _maxvol;

Index: player_v1.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/player_v1.cpp,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -d -r1.12 -r1.13
--- player_v1.cpp	3 Oct 2003 18:33:54 -0000	1.12
+++ player_v1.cpp	3 Oct 2003 23:32:34 -0000	1.13
@@ -27,14 +27,11 @@
 
 namespace Scumm {
 
+#define FB_WNOISE 0x12000       /* feedback for white noise */
+#define FB_PNOISE 0x08000       /* feedback for periodic noise */
+
 #define TIMER_BASE_FREQ 1193000
 #define FIXP_SHIFT  16
-
-////////////////////////////////////////
-//
-// V1 PC-Speaker player
-//
-////////////////////////////////////////
 
 
 Player_V1::Player_V1(ScummEngine *scumm) : Player_V2(scumm) {	

Index: player_v1.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/player_v1.h,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -d -r1.10 -r1.11
--- player_v1.h	3 Oct 2003 18:33:54 -0000	1.10
+++ player_v1.h	3 Oct 2003 23:32:34 -0000	1.11
@@ -27,23 +27,9 @@
 
 namespace Scumm {
 
-#define FB_WNOISE 0x12000       /* feedback for white noise */
-#define FB_PNOISE 0x08000       /* feedback for periodic noise */
-
-struct channel_data_v1 {
-	uint freq;
-	uint volume;
-	byte *cmd_ptr;
-	uint notelen;
-	uint hull_counter;
-	uint attack;
-	uint decay;
-	uint level;
-	uint sustain_1;
-	uint sustain_2;
-	int  sustctr;
-};
-
+/**
+ * V1 PC-Speaker player.
+ */
 class Player_V1 : public Player_V2 {
 public:
 	Player_V1(ScummEngine *scumm);
@@ -63,7 +49,6 @@
 	virtual void generatePCjrSamples(int16 *data, uint len);
 
 	void restartSound();
-	void next_speaker_cmd(ChannelInfo *channel);
 
 	void set_mplex(uint mplex);
 	void parseSpeakerChunk();
@@ -72,6 +57,20 @@
 	void nextPCjrCmd();
 
 private:
+	struct channel_data_v1 {
+		uint freq;
+		uint volume;
+		byte *cmd_ptr;
+		uint notelen;
+		uint hull_counter;
+		uint attack;
+		uint decay;
+		uint level;
+		uint sustain_1;
+		uint sustain_2;
+		int  sustctr;
+	};
+
 	channel_data_v1 _channels[4];
 
 	byte *_next_chunk;

Index: player_v2.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/player_v2.cpp,v
retrieving revision 2.37
retrieving revision 2.38
diff -u -d -r2.37 -r2.38
--- player_v2.cpp	3 Oct 2003 18:33:54 -0000	2.37
+++ player_v2.cpp	3 Oct 2003 23:32:34 -0000	2.38
@@ -340,12 +340,6 @@
 };
 #endif
 
-////////////////////////////////////////
-//
-// V2 PC-Speaker MIDI driver
-//
-////////////////////////////////////////
-
 
 Player_V2::Player_V2(ScummEngine *scumm) {
 	int i;

Index: player_v2.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/player_v2.h,v
retrieving revision 2.19
retrieving revision 2.20
diff -u -d -r2.19 -r2.20
--- player_v2.h	3 Oct 2003 18:33:54 -0000	2.19
+++ player_v2.h	3 Oct 2003 23:32:34 -0000	2.20
@@ -67,11 +67,9 @@
 #endif
 
 
-union ChannelInfo {
-	channel_data d;
-	uint16 array[sizeof(channel_data)/2];
-};
-
+/**
+ * V2 PC-Speaker MIDI driver.
+ */
 class Player_V2 : public MusicEngine {
 public:
 	Player_V2(ScummEngine *scumm);
@@ -112,6 +110,11 @@
 	byte *_retaddr;
 
 private:
+	union ChannelInfo {
+		channel_data d;
+		uint16 array[sizeof(channel_data)/2];
+	};
+	
 	int _music_timer;
 	int _music_timer_ctr;
 	int _ticks_per_music_timer;

Index: player_v2a.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/player_v2a.cpp,v
retrieving revision 2.10
retrieving revision 2.11
diff -u -d -r2.10 -r2.11
--- player_v2a.cpp	3 Oct 2003 18:33:54 -0000	2.10
+++ player_v2a.cpp	3 Oct 2003 23:32:34 -0000	2.11
@@ -29,12 +29,6 @@
 
 #define BASE_FREQUENCY 3579545
 
-////////////////////////////////////////
-//
-// V2 Amiga sound/music driver
-//
-////////////////////////////////////////
-
 static uint32	CRCtable[256];
 static void	InitCRC (void)
 {
@@ -49,6 +43,7 @@
 		CRCtable[i] = n;
 	}
 }
+
 static uint32 GetCRC (byte *data, int len)
 {
 	uint32 CRC = 0xFFFFFFFF;

Index: player_v2a.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/player_v2a.h,v
retrieving revision 2.4
retrieving revision 2.5
diff -u -d -r2.4 -r2.5
--- player_v2a.h	3 Oct 2003 18:33:54 -0000	2.4
+++ player_v2a.h	3 Oct 2003 23:32:34 -0000	2.5
@@ -32,11 +32,12 @@
 
 namespace Scumm {
 
-#define	V2A_MAXSLOTS 8
-
 class ScummEngine;
 class V2A_Sound;
 
+/**
+ * V2 Amiga sound/music driver.
+ */
 class Player_V2A : public MusicEngine {
 public:
 	Player_V2A(ScummEngine *scumm);
@@ -50,17 +51,22 @@
 	virtual int  getSoundStatus(int sound) const;
 
 private:
-	OSystem *_system;
-	ScummEngine *_scumm;
-	Player_MOD *_mod;
+	enum {
+		V2A_MAXSLOTS = 8
+	};
 
 	struct soundSlot
 	{
 		int id;
 		V2A_Sound *sound;
-	} _slot[V2A_MAXSLOTS];
-	int getSoundSlot (int id = 0) const;
+	};
+
+	OSystem *_system;
+	ScummEngine *_scumm;
+	Player_MOD *_mod;
+	soundSlot _slot[V2A_MAXSLOTS];
 
+	int getSoundSlot (int id = 0) const;
 	static void update_proc(void *param);
 	void updateSound();
 };

Index: player_v3a.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/player_v3a.cpp,v
retrieving revision 1.14
retrieving revision 1.15
diff -u -d -r1.14 -r1.15
--- player_v3a.cpp	3 Oct 2003 18:33:54 -0000	1.14
+++ player_v3a.cpp	3 Oct 2003 23:32:34 -0000	1.15
@@ -34,12 +34,6 @@
 	{0x00D6,0x00CA,0x00BE,0x00B4,0x00A9,0x00A0,0x0097,0x008E,0x0086,0x007F,0x00F0,0x00E2}
 };
 
-////////////////////////////////////////
-//
-// V3 Amiga sound/music driver
-//
-////////////////////////////////////////
-
 Player_V3A::Player_V3A(ScummEngine *scumm) {
 	int i;
 	_scumm = scumm;

Index: player_v3a.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/player_v3a.h,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -d -r1.12 -r1.13
--- player_v3a.h	3 Oct 2003 18:33:55 -0000	1.12
+++ player_v3a.h	3 Oct 2003 23:32:34 -0000	1.13
@@ -32,11 +32,11 @@
 
 namespace Scumm {
 
-#define	V3A_MAXMUS	8
-#define	V3A_MAXSFX	8
-
 class ScummEngine;
 
+/**
+ * V3 Amiga sound/music driver.
+ */
 class Player_V3A : public MusicEngine {
 public:
 	Player_V3A(ScummEngine *scumm);
@@ -50,31 +50,23 @@
 	virtual int  getSoundStatus(int sound) const;
 
 private:
-	OSystem *_system;
-	ScummEngine *_scumm;
-	Player_MOD *_mod;
+	enum {
+		V3A_MAXMUS = 8,
+		V3A_MAXSFX = 8
+	};
 
 	struct musChan
 	{
 		int id;
 		int dur;
-	} _mus[V3A_MAXMUS];
-	int getMusChan (int id = 0) const;
+	};
 
 	struct sfxChan
 	{
 		int id;
 		int dur;
 		// SFX will eventually have pitch bends
-	} _sfx[V3A_MAXSFX];
-	int getSfxChan (int id = 0) const;
-
-	int _curSong;
-	uint8 *_songData;
-	uint16 _songPtr;
-	uint16 _songDelay;
-	int _music_timer;
-	bool _isinit;
+	};
 
 	struct instData
 	{
@@ -84,8 +76,26 @@
 		uint16 _llen[6];
 		uint16 _oct[6];
 		int16 _pitadjust;
-	} **_wavetable;
+	};
+
+	OSystem *_system;
+	ScummEngine *_scumm;
+	Player_MOD *_mod;
+
+	musChan _mus[V3A_MAXMUS];
+	sfxChan _sfx[V3A_MAXSFX];
 
+	int _curSong;
+	uint8 *_songData;
+	uint16 _songPtr;
+	uint16 _songDelay;
+	int _music_timer;
+	bool _isinit;
+
+	instData **_wavetable;
+
+	int getMusChan (int id = 0) const;
+	int getSfxChan (int id = 0) const;
 	static void update_proc(void *param);
 	void playMusic();
 };





More information about the Scummvm-git-logs mailing list