From 23e387fb9086f9fdf2d15c01f29907f1fd593d29 Mon Sep 17 00:00:00 2001 From: Paul Gilbert Date: Thu, 4 Aug 2016 21:21:34 -0400 Subject: TITANIC: Rename WaveFile to CWaveFile for consistency --- engines/titanic/sound/sound.cpp | 12 ++++++------ engines/titanic/sound/sound.h | 10 +++++----- engines/titanic/sound/sound_manager.cpp | 8 ++++---- engines/titanic/sound/sound_manager.h | 16 ++++++++-------- engines/titanic/sound/wave_file.cpp | 2 +- engines/titanic/sound/wave_file.h | 4 ++-- engines/titanic/true_talk/true_talk_manager.cpp | 2 +- 7 files changed, 27 insertions(+), 27 deletions(-) (limited to 'engines') diff --git a/engines/titanic/sound/sound.cpp b/engines/titanic/sound/sound.cpp index e8084d79e0..40f5c4335e 100644 --- a/engines/titanic/sound/sound.cpp +++ b/engines/titanic/sound/sound.cpp @@ -71,7 +71,7 @@ void CSound::fn3(int handle, int val2, int val3) { warning("TODO: CSound::fn3"); } -void CSound::fn4(WaveFile *waveFile, int val) { +void CSound::fn4(CWaveFile *waveFile, int val) { // TODO } @@ -99,11 +99,11 @@ void CSound::removeOldest() { } } -WaveFile *CSound::getTrueTalkSound(CDialogueFile *dialogueFile, int index) { +CWaveFile *CSound::getTrueTalkSound(CDialogueFile *dialogueFile, int index) { return loadSpeech(dialogueFile, index); } -WaveFile *CSound::loadSound(const CString &name) { +CWaveFile *CSound::loadSound(const CString &name) { checkSounds(); // Check whether an entry for the given name is already active @@ -139,7 +139,7 @@ WaveFile *CSound::loadSound(const CString &name) { } int CSound::playSound(const CString &name, CProximity &prox) { - WaveFile *waveFile = loadSound(name); + CWaveFile *waveFile = loadSound(name); if (!waveFile) return -1; @@ -149,7 +149,7 @@ int CSound::playSound(const CString &name, CProximity &prox) { return _soundManager.playSound(*waveFile, prox); } -WaveFile *CSound::loadSpeech(CDialogueFile *dialogueFile, int speechId) { +CWaveFile *CSound::loadSpeech(CDialogueFile *dialogueFile, int speechId) { checkSounds(); // Check whether an entry for the given name is already active @@ -186,7 +186,7 @@ WaveFile *CSound::loadSpeech(CDialogueFile *dialogueFile, int speechId) { } int CSound::playSpeech(CDialogueFile *dialogueFile, int speechId, CProximity &prox) { - WaveFile *waveFile = loadSpeech(dialogueFile, speechId); + CWaveFile *waveFile = loadSpeech(dialogueFile, speechId); if (!waveFile) return -1; diff --git a/engines/titanic/sound/sound.h b/engines/titanic/sound/sound.h index c14c9e17c4..8c953c8f2b 100644 --- a/engines/titanic/sound/sound.h +++ b/engines/titanic/sound/sound.h @@ -38,7 +38,7 @@ class CGameManager; class CSoundItem : public ListItem { public: CString _name; - WaveFile *_waveFile; + CWaveFile *_waveFile; File *_dialogueFileHandle; int _speechId; int _field24; @@ -115,7 +115,7 @@ public: bool fn1(int val); void fn2(int handle); void fn3(int handle, int val2, int val3); - void fn4(WaveFile *waveFile, int val); + void fn4(CWaveFile *waveFile, int val); void managerProc8(int v) { _soundManager.proc8(v); } @@ -125,7 +125,7 @@ public: * @param speechId Speech Id within dialogue * @returns Wave file instance */ - WaveFile *getTrueTalkSound(CDialogueFile *dialogueFile, int index); + CWaveFile *getTrueTalkSound(CDialogueFile *dialogueFile, int index); /** * Load a speech resource @@ -133,7 +133,7 @@ public: * @param speechId Speech Id within dialogue * @returns Wave file instance */ - WaveFile *loadSpeech(CDialogueFile *dialogueFile, int speechId); + CWaveFile *loadSpeech(CDialogueFile *dialogueFile, int speechId); /** * Play a speech @@ -148,7 +148,7 @@ public: * @param name Name of sound resource * @returns Sound item record */ - WaveFile *loadSound(const CString &name); + CWaveFile *loadSound(const CString &name); /** * Play a sound diff --git a/engines/titanic/sound/sound_manager.cpp b/engines/titanic/sound/sound_manager.cpp index 61ad59ce7f..bf087b6317 100644 --- a/engines/titanic/sound/sound_manager.cpp +++ b/engines/titanic/sound/sound_manager.cpp @@ -34,12 +34,12 @@ QSoundManager::QSoundManager() : _field18(0), _field1C(0) { Common::fill(&_field4A0[0], &_field4A0[16], 0); } -WaveFile *QSoundManager::loadSound(const CString &name) { +CWaveFile *QSoundManager::loadSound(const CString &name) { warning("TODO"); return nullptr; } -WaveFile *QSoundManager::loadSpeech(CDialogueFile *dialogueFile, int speechId) { +CWaveFile *QSoundManager::loadSpeech(CDialogueFile *dialogueFile, int speechId) { warning("TODO"); return nullptr; } @@ -49,7 +49,7 @@ int QSoundManager::proc5() const { return 0; } -int QSoundManager::playSound(WaveFile &soundRes, CProximity &prox) { +int QSoundManager::playSound(CWaveFile &soundRes, CProximity &prox) { warning("TODO"); return 0; } @@ -87,7 +87,7 @@ bool QSoundManager::proc14() { return false; } -bool QSoundManager::isActive(const WaveFile *waveFile) const { +bool QSoundManager::isActive(const CWaveFile *waveFile) const { warning("TODO"); return false; } diff --git a/engines/titanic/sound/sound_manager.h b/engines/titanic/sound/sound_manager.h index 85ee00a3f7..ddfcba0d0f 100644 --- a/engines/titanic/sound/sound_manager.h +++ b/engines/titanic/sound/sound_manager.h @@ -46,21 +46,21 @@ public: * @param name Name of sound resource * @returns Loaded wave file */ - virtual WaveFile *loadSound(const CString &name) { return nullptr; } + virtual CWaveFile *loadSound(const CString &name) { return nullptr; } /** * Loads a speech resource from a dialogue file * @param name Name of sound resource * @returns Loaded wave file */ - virtual WaveFile *loadSpeech(CDialogueFile *dialogueFile, int speechId) { return 0; } + virtual CWaveFile *loadSpeech(CDialogueFile *dialogueFile, int speechId) { return 0; } virtual int proc5() const { return 0; } /** * Start playing a previously loaded wave file */ - virtual int playSound(WaveFile &waveFile, CProximity &prox) = 0; + virtual int playSound(CWaveFile &waveFile, CProximity &prox) = 0; virtual void proc7() = 0; virtual void proc8(int v) = 0; @@ -74,7 +74,7 @@ public: /** * Returns true if the given sound is currently active */ - virtual bool isActive(const WaveFile *waveFile) const { return false; } + virtual bool isActive(const CWaveFile *waveFile) const { return false; } virtual int proc16() const { return 0; } virtual void WaveMixPump() {} @@ -136,21 +136,21 @@ public: * @param name Name of sound resource * @returns Loaded wave file */ - virtual WaveFile *loadSound(const CString &name); + virtual CWaveFile *loadSound(const CString &name); /** * Loads a speech resource from a dialogue file * @param name Name of sound resource * @returns Loaded wave file */ - virtual WaveFile *loadSpeech(CDialogueFile *dialogueFile, int speechId); + virtual CWaveFile *loadSpeech(CDialogueFile *dialogueFile, int speechId); virtual int proc5() const; /** * Start playing a previously loaded sound resource */ - virtual int playSound(WaveFile &waveFile, CProximity &prox); + virtual int playSound(CWaveFile &waveFile, CProximity &prox); virtual void proc7(); virtual void proc8(int v); @@ -164,7 +164,7 @@ public: /** * Returns true if the given sound is currently active */ - virtual bool isActive(const WaveFile *soundRes) const; + virtual bool isActive(const CWaveFile *soundRes) const; virtual int proc16() const; virtual void WaveMixPump(); diff --git a/engines/titanic/sound/wave_file.cpp b/engines/titanic/sound/wave_file.cpp index 2459f1eee6..7749a7bdfc 100644 --- a/engines/titanic/sound/wave_file.cpp +++ b/engines/titanic/sound/wave_file.cpp @@ -24,7 +24,7 @@ namespace Titanic { -int WaveFile::fn1() { +int CWaveFile::fn1() { // TODO return 0; } diff --git a/engines/titanic/sound/wave_file.h b/engines/titanic/sound/wave_file.h index b27e5e7707..0d8d8634ac 100644 --- a/engines/titanic/sound/wave_file.h +++ b/engines/titanic/sound/wave_file.h @@ -29,7 +29,7 @@ namespace Titanic { class CSoundManager; -class WaveFile { +class CWaveFile { public: int _field0; int _field4; @@ -44,7 +44,7 @@ public: int _field28; int _field2C; public: - WaveFile() : _field0(2), _field4(0), _field8(0), _handle(0), + CWaveFile() : _field0(2), _field4(0), _field8(0), _handle(0), _owner(nullptr), _field14(1), _field18(0), _field1C(0), _field20(0), _field24(0), _field28(0), _field2C(-1) {} diff --git a/engines/titanic/true_talk/true_talk_manager.cpp b/engines/titanic/true_talk/true_talk_manager.cpp index 977fc892c6..da3336f432 100644 --- a/engines/titanic/true_talk/true_talk_manager.cpp +++ b/engines/titanic/true_talk/true_talk_manager.cpp @@ -408,7 +408,7 @@ int CTrueTalkManager::readDialogSound() { _field18 = 0; for (uint idx = 0; idx < _titleEngine._indexes.size(); ++idx) { - WaveFile *waveFile = _gameManager->_sound.getTrueTalkSound( + CWaveFile *waveFile = _gameManager->_sound.getTrueTalkSound( _dialogueFile, _titleEngine._indexes[idx] - _dialogueId); if (waveFile) { _field18 = waveFile->fn1(); -- cgit v1.2.3