mirror of
https://github.com/libretro/scummvm.git
synced 2025-02-20 19:21:46 +00:00
TITANIC: Renaming methods in CMusicRoomHandler
This commit is contained in:
parent
e00fb13809
commit
c33962f69d
@ -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();
|
||||
|
@ -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);
|
||||
|
Loading…
x
Reference in New Issue
Block a user