diff options
author | Paul Gilbert | 2016-08-03 21:47:11 -0400 |
---|---|---|
committer | Paul Gilbert | 2016-08-03 21:47:11 -0400 |
commit | 3fda4f0ef5ec56caad0332e473993f5628ca6e42 (patch) | |
tree | f5b279f67335fb0b4cf71a26c70059b6f9138027 /engines/titanic/sound/sound.h | |
parent | 9f316a5b37c2065c960dca88953c988d923d748f (diff) | |
download | scummvm-rg350-3fda4f0ef5ec56caad0332e473993f5628ca6e42.tar.gz scummvm-rg350-3fda4f0ef5ec56caad0332e473993f5628ca6e42.tar.bz2 scummvm-rg350-3fda4f0ef5ec56caad0332e473993f5628ca6e42.zip |
TITANIC: Add CSound sound loading methods
Diffstat (limited to 'engines/titanic/sound/sound.h')
-rw-r--r-- | engines/titanic/sound/sound.h | 52 |
1 files changed, 34 insertions, 18 deletions
diff --git a/engines/titanic/sound/sound.h b/engines/titanic/sound/sound.h index f550493624..bc61d488ef 100644 --- a/engines/titanic/sound/sound.h +++ b/engines/titanic/sound/sound.h @@ -24,8 +24,9 @@ #define TITANIC_SOUND_H #include "titanic/support/simple_file.h" -#include "titanic/support/proximity.h" +#include "titanic/sound/proximity.h" #include "titanic/sound/sound_manager.h" +#include "titanic/sound/sound_resource.h" #include "titanic/core/list.h" #include "titanic/core/view_item.h" #include "titanic/true_talk/dialogue_file.h" @@ -37,16 +38,18 @@ class CGameManager; class CSoundItem : public ListItem { public: CString _name; - int _soundHandle; - int _field1C; - int _field20; + CSoundResource *_soundResource; + File *_dialogueFileHandle; + int _speechId; int _field24; int _field28; public: - CSoundItem() : ListItem(), _soundHandle(0), _field1C(0), - _field20(0), _field24(0), _field28(0) {} - CSoundItem(const CString &name) : ListItem(), _name(name), - _soundHandle(0), _field1C(0), _field20(0), _field24(0), _field28(0) {} + CSoundItem() : ListItem(), _soundResource(nullptr), _dialogueFileHandle(nullptr), + _speechId(0), _field24(0), _field28(0) {} + CSoundItem(const CString &name) : ListItem(), _name(name), _soundResource(nullptr), + _dialogueFileHandle(nullptr), _speechId(0), _field24(0), _field28(0) {} + CSoundItem(File *dialogueFile, int speechId) : ListItem(), _soundResource(nullptr), + _dialogueFileHandle(dialogueFile), _speechId(speechId), _field24(0), _field28(0) {} int fn1(); }; @@ -109,25 +112,38 @@ public: */ void preEnterView(CViewItem *newView, bool isNewRoom); + bool fn1(int val); + void fn2(int handle); + void fn3(int handle, int val2, int val3); + void fn4(CSoundResource *soundRes, int val); + + void managerProc8(int v) { _soundManager.proc8(v); } + + CSoundItem *getTrueTalkSound(CDialogueFile *dialogueFile, int index); + /** * Load a sound * @param name Name of sound resource - * @returns Sound handle Id + * @returns Sound item record */ - uint loadSound(const CString &name); - - bool fn1(int val); - void fn2(int handle); - void fn3(int handle, int val2, int val3); + CSoundResource *loadSpeech(CDialogueFile *dialogueFile, int speechId); /** * Play a speech */ - int playSpeech(CDialogueFile *dialogueFile, int speechId, const CProximity &prox); - - void managerProc8(int v) { _soundManager.proc8(v); } + int playSpeech(CDialogueFile *dialogueFile, int speechId, CProximity &prox); - CSoundItem *getTrueTalkSound(CDialogueFile *dialogueFile, int index); + /** + * Load a sound + * @param name Name of sound resource + * @returns Sound item record + */ + CSoundResource *loadSound(const CString &name); + + /** + * Play a sound + */ + int playSound(const CString &name, CProximity &prox); }; } // End of namespace Titanic |