diff options
author | Paul Gilbert | 2017-02-12 13:56:00 -0500 |
---|---|---|
committer | Paul Gilbert | 2017-02-12 13:56:00 -0500 |
commit | c33962f69d6e112cde337c85a2b947f86d3fbd1d (patch) | |
tree | d20f92f4c3e04a279d126591b9e619eeeee0c619 /engines/titanic | |
parent | e00fb1380949e85afc76163eee47c76027b30e10 (diff) | |
download | scummvm-rg350-c33962f69d6e112cde337c85a2b947f86d3fbd1d.tar.gz scummvm-rg350-c33962f69d6e112cde337c85a2b947f86d3fbd1d.tar.bz2 scummvm-rg350-c33962f69d6e112cde337c85a2b947f86d3fbd1d.zip |
TITANIC: Renaming methods in CMusicRoomHandler
Diffstat (limited to 'engines/titanic')
-rw-r--r-- | engines/titanic/sound/music_room_handler.cpp | 8 | ||||
-rw-r--r-- | engines/titanic/sound/music_room_handler.h | 18 |
2 files changed, 19 insertions, 7 deletions
diff --git a/engines/titanic/sound/music_room_handler.cpp b/engines/titanic/sound/music_room_handler.cpp index 81ba1960cd..b5adbae6e6 100644 --- a/engines/titanic/sound/music_room_handler.cpp +++ b/engines/titanic/sound/music_room_handler.cpp @@ -195,7 +195,7 @@ bool CMusicRoomHandler::update() { } updateAudio(); - fn1(); + updateInstruments(); return _field108 > 0; } @@ -223,7 +223,7 @@ void CMusicRoomHandler::updateAudio() { if (amount > 0) { count -= amount; ptr += amount / sizeof(uint16); - } else if (!updateInstrument(instrument)) { + } else if (!pollInstrument(instrument)) { --_field108; break; } @@ -237,7 +237,7 @@ void CMusicRoomHandler::updateAudio() { _audioBuffer->leaveCriticalSection(); } -void CMusicRoomHandler::fn1() { +void CMusicRoomHandler::updateInstruments() { if (_active && _soundStartTicks) { for (MusicInstrument instrument = BELLS; instrument <= BASS; instrument = (MusicInstrument)((int)instrument + 1)) { @@ -273,7 +273,7 @@ void CMusicRoomHandler::fn1() { } } -bool CMusicRoomHandler::updateInstrument(MusicInstrument instrument) { +bool CMusicRoomHandler::pollInstrument(MusicInstrument instrument) { int &arrIndex = _startPos[instrument]; if (arrIndex < 0) { _instruments[instrument]->clear(); diff --git a/engines/titanic/sound/music_room_handler.h b/engines/titanic/sound/music_room_handler.h index eb274aa10c..34d2b95740 100644 --- a/engines/titanic/sound/music_room_handler.h +++ b/engines/titanic/sound/music_room_handler.h @@ -72,17 +72,29 @@ private: */ void start(); + /** + * Handles updating the raw audio being played for all the instruments + */ void updateAudio(); - void fn1(); /** - * Updates the state of the instrument. + * Handles updating the instruments themselves, and keeping them animating + */ + void updateInstruments(); + + /** + * Polls a specified instrument for any updates to see if it's still active. * @returns Returns true if a given instrument is still active.. * that is, that there is still more data that can be read from it to play */ - bool updateInstrument(MusicInstrument instrument); + bool pollInstrument(MusicInstrument instrument); double fn3(MusicInstrument instrument, int arrIndex); + + /** + * Figures out a pitch value (of some sort) for use in determining + * which wave file the music instruments will use. + */ int getPitch(MusicInstrument instrument, int arrIndex); public: CMusicRoomHandler(CProjectItem *project, CSoundManager *soundManager); |