aboutsummaryrefslogtreecommitdiff
path: root/engines/titanic/core
diff options
context:
space:
mode:
authorPaul Gilbert2016-08-08 21:21:18 -0400
committerPaul Gilbert2016-08-08 21:21:18 -0400
commit0b952c3ceded860f2051c77fefb17593dfb5ff05 (patch)
tree6a195da3ec3749b99ab2cd5f6f94698506afa574 /engines/titanic/core
parent8f8cf6eadc842f97d131437c86e17d1305c9ef56 (diff)
downloadscummvm-rg350-0b952c3ceded860f2051c77fefb17593dfb5ff05.tar.gz
scummvm-rg350-0b952c3ceded860f2051c77fefb17593dfb5ff05.tar.bz2
scummvm-rg350-0b952c3ceded860f2051c77fefb17593dfb5ff05.zip
TITANIC: Implemented CAutoSoundPlayerADSR & CBackgroundSoundMaker
Diffstat (limited to 'engines/titanic/core')
-rw-r--r--engines/titanic/core/game_object.cpp10
-rw-r--r--engines/titanic/core/game_object.h7
2 files changed, 17 insertions, 0 deletions
diff --git a/engines/titanic/core/game_object.cpp b/engines/titanic/core/game_object.cpp
index ecaa415e31..c7742cb8db 100644
--- a/engines/titanic/core/game_object.cpp
+++ b/engines/titanic/core/game_object.cpp
@@ -743,6 +743,16 @@ int CGameObject::playSound(const CString &name, CProximity &prox) {
return 0;
}
+int CGameObject::queueSound(const CString &name, uint priorHandle, uint volume, int val3, bool repeated) {
+ CProximity prox;
+ prox._fieldC = val3;
+ prox._repeated = repeated;
+ prox._channelVolume = volume;
+ prox._soundHandle = priorHandle;
+
+ return playSound(name, prox);
+}
+
void CGameObject::stopSound(int handle, uint seconds) {
if (handle != 0 && handle != -1) {
CGameManager *gameManager = getGameManager();
diff --git a/engines/titanic/core/game_object.h b/engines/titanic/core/game_object.h
index 799cbccbed..bcfc989288 100644
--- a/engines/titanic/core/game_object.h
+++ b/engines/titanic/core/game_object.h
@@ -196,6 +196,13 @@ protected:
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);
+
+ /**
* Stop a sound
* @param handle Sound handle
* @param seconds Optional number of seconds to transition sound off