aboutsummaryrefslogtreecommitdiff
path: root/engines/titanic/core
diff options
context:
space:
mode:
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