From c224d35a432fff7e1d0a6bf5368f7f2e81a45e27 Mon Sep 17 00:00:00 2001 From: Paul Gilbert Date: Sat, 3 Sep 2016 10:34:38 -0400 Subject: TITANIC: Identified sound balance usage in the engine --- engines/titanic/core/game_object.cpp | 8 ++++---- engines/titanic/core/game_object.h | 20 +++++++++++++------- 2 files changed, 17 insertions(+), 11 deletions(-) (limited to 'engines/titanic/core') 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 -- cgit v1.2.3