aboutsummaryrefslogtreecommitdiff
path: root/engines/titanic/core
diff options
context:
space:
mode:
authorPaul Gilbert2016-09-03 10:34:38 -0400
committerPaul Gilbert2016-09-03 10:34:38 -0400
commitc224d35a432fff7e1d0a6bf5368f7f2e81a45e27 (patch)
treec568bc54a2eaf5c0cbc69f76e1e771659690fd7c /engines/titanic/core
parent38cf75e885983b88d03272f35e39f5d874eae575 (diff)
downloadscummvm-rg350-c224d35a432fff7e1d0a6bf5368f7f2e81a45e27.tar.gz
scummvm-rg350-c224d35a432fff7e1d0a6bf5368f7f2e81a45e27.tar.bz2
scummvm-rg350-c224d35a432fff7e1d0a6bf5368f7f2e81a45e27.zip
TITANIC: Identified sound balance usage in the engine
Diffstat (limited to 'engines/titanic/core')
-rw-r--r--engines/titanic/core/game_object.cpp8
-rw-r--r--engines/titanic/core/game_object.h20
2 files changed, 17 insertions, 11 deletions
diff --git a/engines/titanic/core/game_object.cpp b/engines/titanic/core/game_object.cpp
index 7848734792..edfce7f2ee 100644
--- a/engines/titanic/core/game_object.cpp
+++ b/engines/titanic/core/game_object.cpp
@@ -732,10 +732,10 @@ void CGameObject::loadSound(const CString &name) {
}
}
-int CGameObject::playSound(const CString &name, uint volume, int val3, bool repeated) {
+int CGameObject::playSound(const CString &name, uint volume, int balance, bool repeated) {
CProximity prox;
prox._channelVolume = volume;
- prox._fieldC = val3;
+ prox._balance = balance;
prox._repeated = repeated;
return playSound(name, prox);
}
@@ -758,9 +758,9 @@ int CGameObject::playSound(const CString &name, CProximity &prox) {
return 0;
}
-int CGameObject::queueSound(const CString &name, uint priorHandle, uint volume, int val3, bool repeated) {
+int CGameObject::queueSound(const CString &name, uint priorHandle, uint volume, int balance, bool repeated) {
CProximity prox;
- prox._fieldC = val3;
+ prox._balance = balance;
prox._repeated = repeated;
prox._channelVolume = volume;
prox._priorSoundHandle = priorHandle;
diff --git a/engines/titanic/core/game_object.h b/engines/titanic/core/game_object.h
index d72fd94ac4..0da3fad605 100644
--- a/engines/titanic/core/game_object.h
+++ b/engines/titanic/core/game_object.h
@@ -189,24 +189,30 @@ protected:
/**
* Plays a sound
- * @param resName Filename of sound to play
+ * @param name Filename of sound to play
* @param volume Volume level
+ * @param balance Sound balance (not actually used in original)
+ * @param repeated If true, sound will repeat indefinitely
*/
- int playSound(const CString &name, uint volume = 100, int val3 = 0, bool repeated = false);
+ int playSound(const CString &name, uint volume = 100, int balance = 0, bool repeated = false);
/**
* Plays a sound
- * @param resName Filename of sound to play
+ * @param name Filename of sound to play
* @param prox Proximity object with the sound data
*/
int playSound(const CString &name, CProximity &prox);
/**
* Queues a sound to play after a specified one finishes
- * @param resName Filename of sound to play
- * @param volume Volume level
- */
- int queueSound(const CString &name, uint priorHandle, uint volume = 100, int val3 = 0, bool repeated = false);
+ * @param name Filename of sound to play
+ * @param priorHandle Sound to wait until finished before playing
+ * @param volume Volume level
+ * @param balance Sound balance (not actually used by original)
+ * @param repeated If true, sound will repeat indefinitely
+ */
+ int queueSound(const CString &name, uint priorHandle, uint volume = 100,
+ int balance = 0, bool repeated = false);
/**
* Stop a sound