[Scummvm-cvs-logs] CVS: scummvm/sword2 sound.cpp,1.43,1.44 sword2.h,1.59,1.60

Torbj?rn Andersson eriktorbjorn at users.sourceforge.net
Wed Apr 28 04:48:05 CEST 2004


Update of /cvsroot/scummvm/scummvm/sword2
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv26853

Modified Files:
	sound.cpp sword2.h 
Log Message:
Cleanup. I plan to take a closer look at the sound effects handling later.


Index: sound.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/sword2/sound.cpp,v
retrieving revision 1.43
retrieving revision 1.44
diff -u -d -r1.43 -r1.44
--- sound.cpp	24 Apr 2004 12:29:35 -0000	1.43
+++ sound.cpp	28 Apr 2004 11:47:19 -0000	1.44
@@ -38,16 +38,18 @@
 
 namespace Sword2 {
 
-// initialise the fxq by clearing all the entries
+/**
+ * Initialise the fxq by clearing all the entries.
+ */
 
 void Sword2Engine::initFxQueue(void) {
-	for (int i = 0; i < FXQ_LENGTH; i++) {
-		_fxQueue[i].resource = 0;	// 0 resource means 'empty' slot
-		_fxQueue[i].fetchId = 0;	// Not being fetched.
-	}
+	for (int i = 0; i < FXQ_LENGTH; i++)
+		_fxQueue[i].resource = 0;
 }
 
-// process the fx queue once every game cycle
+/**
+ * Process the fx queue once every game cycle
+ */
 
 void Sword2Engine::processFxQueue(void) {
 	for (int i = 0; i < FXQ_LENGTH; i++) {
@@ -79,8 +81,6 @@
 	}
 }
 
-// called from processFxQueue only
-
 void Sword2Engine::triggerFx(uint8 j) {
 	byte *data;
 	int32 id;
@@ -114,7 +114,9 @@
 		debug(5, "SFX ERROR: playFx() returned %.8x", rv);
 }
 
-// Stops all looped & random fx and clears the entire queue
+/**
+ * Stop all looped & random fx and clear the entire queue
+ */
 
 void Sword2Engine::clearFxQueue(void) {
 	// stop all fx & remove the samples from sound memory
@@ -141,8 +143,6 @@
 	_sound->unpauseFx();
 }
 
-// called from script only
-
 int32 Logic::fnPlayFx(int32 *params) {
 	// params:	0 sample resource id
 	//		1 type		(FX_SPOT, FX_RANDOM, FX_LOOP)
@@ -269,7 +269,9 @@
 	return IR_CONT;
 }
 
-// to alter the volume and pan of a currently playing fx
+/**
+ * Alter the volume and pan of a currently playing fx
+ */
 
 int32 Logic::fnSetFxVolAndPan(int32 *params) {
 	// params:	0 id of fx (ie. the id returned in 'result' from
@@ -285,7 +287,9 @@
 	return IR_CONT;
 }
 
-// to alter the volume  of a currently playing fx
+/**
+ * Alter the volume of a currently playing fx
+ */
 
 int32 Logic::fnSetFxVol(int32 *params) {
 	// params:	0 id of fx (ie. the id returned in 'result' from
@@ -297,8 +301,6 @@
 	return IR_CONT;
 }
 
-// called from script only
-
 int32 Logic::fnStopFx(int32 *params) {
 	// params:	0 position in queue
 
@@ -326,8 +328,6 @@
 	return IR_CONT;
 }
 
-// called from script only
-
 int32 Logic::fnStopAllFx(int32 *params) {
 	// Stops all looped & random fx and clears the entire queue
 
@@ -342,8 +342,10 @@
 	return IR_CONT;
 }
 
-// Start a tune playing, to play once or to loop until stopped or next one
-// played
+/**
+ * Start a tune playing, to play once or to loop until stopped or next one
+ * played.
+ */
 
 int32 Logic::fnPlayMusic(int32 *params) {
 	// params:	0 tune id
@@ -392,8 +394,6 @@
 	return IR_CONT;
 }
 
-// called from script only
-
 int32 Logic::fnStopMusic(int32 *params) {
 	// params:	none
 

Index: sword2.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/sword2/sword2.h,v
retrieving revision 1.59
retrieving revision 1.60
diff -u -d -r1.59 -r1.60
--- sword2.h	26 Apr 2004 07:37:25 -0000	1.59
+++ sword2.h	28 Apr 2004 11:47:19 -0000	1.60
@@ -323,7 +323,6 @@
 
 	struct FxQueueEntry {
 		uint32 resource;	// resource id of sample
-		uint32 fetchId;		// Id of resource in PSX CD queue. :)
 		uint16 delay;		// cycles to wait before playing (or 'random chance' if FX_RANDOM)
 		uint8 volume;		// 0..16
 		int8 pan;		// -16..16





More information about the Scummvm-git-logs mailing list