aboutsummaryrefslogtreecommitdiff
path: root/sword2/sound.cpp
diff options
context:
space:
mode:
authorTorbjörn Andersson2004-04-28 11:47:19 +0000
committerTorbjörn Andersson2004-04-28 11:47:19 +0000
commit6a432d10b5f873d68cc3be8d849bf72d7061d1c7 (patch)
treec3b59915129c55dde287bf757cbfeec0027d4265 /sword2/sound.cpp
parent20a6c89068a6160cab330af7e4a7318a6159620a (diff)
downloadscummvm-rg350-6a432d10b5f873d68cc3be8d849bf72d7061d1c7.tar.gz
scummvm-rg350-6a432d10b5f873d68cc3be8d849bf72d7061d1c7.tar.bz2
scummvm-rg350-6a432d10b5f873d68cc3be8d849bf72d7061d1c7.zip
Cleanup. I plan to take a closer look at the sound effects handling later.
svn-id: r13661
Diffstat (limited to 'sword2/sound.cpp')
-rw-r--r--sword2/sound.cpp42
1 files changed, 21 insertions, 21 deletions
diff --git a/sword2/sound.cpp b/sword2/sound.cpp
index fe97d44437..7d8c4b157e 100644
--- a/sword2/sound.cpp
+++ b/sword2/sound.cpp
@@ -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 @@ void Sword2Engine::processFxQueue(void) {
}
}
-// called from processFxQueue only
-
void Sword2Engine::triggerFx(uint8 j) {
byte *data;
int32 id;
@@ -114,7 +114,9 @@ void Sword2Engine::triggerFx(uint8 j) {
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 @@ void Sword2Engine::unpauseAllSound(void) {
_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 @@ int32 Logic::fnSoundFetch(int32 *params) {
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 @@ int32 Logic::fnSetFxVolAndPan(int32 *params) {
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 @@ int32 Logic::fnSetFxVol(int32 *params) {
return IR_CONT;
}
-// called from script only
-
int32 Logic::fnStopFx(int32 *params) {
// params: 0 position in queue
@@ -326,8 +328,6 @@ int32 Logic::fnStopFx(int32 *params) {
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 @@ int32 Logic::fnPrepareMusic(int32 *params) {
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 @@ int32 Logic::fnPlayMusic(int32 *params) {
return IR_CONT;
}
-// called from script only
-
int32 Logic::fnStopMusic(int32 *params) {
// params: none