LILLIPUT: Minor Sound Function Name Change For Consistency.

This has no functional change, but improves the consistency with the
renamed stopSound() function.

Also, minor fixes for formatting, removal of redundant comments and code
in sound class.
This commit is contained in:
D G Turner 2018-07-29 05:30:37 +01:00
parent dd8e003602
commit 8f1e1bdd8c
4 changed files with 9 additions and 11 deletions

View File

@ -1714,7 +1714,7 @@ byte LilliputEngine::sequenceSound(int index, Common::Point var1) {
debugC(2, kDebugEngine, "sequenceSound(%d, %d - %d)", index, var1.x, var1.y);
int param4x = ((index | 0xFF00) >> 8);
_soundHandler->play(var1.y, _scriptHandler->_viewportPos,
_soundHandler->playSound(var1.y, _scriptHandler->_viewportPos,
_scriptHandler->_characterTilePos[index], Common::Point(param4x, 0));
return kSeqRepeat;
}

View File

@ -3288,7 +3288,7 @@ void LilliputScript::OC_playObjectSound() {
Common::Point var4 = Common::Point(0xFF, index & 0xFF);
int soundId = (_currScript->readUint16LE() & 0xFF);
_vm->_soundHandler->play(soundId, _viewportPos, _characterTilePos[index], var4);
_vm->_soundHandler->playSound(soundId, _viewportPos, _characterTilePos[index], var4);
}
void LilliputScript::OC_startLocationSound() {
@ -3299,7 +3299,7 @@ void LilliputScript::OC_startLocationSound() {
Common::Point var2 = _viewportPos;
int var1 = (_currScript->readUint16LE() & 0xFF);
_vm->_soundHandler->play(var1, var2, var3, var4);
_vm->_soundHandler->playSound(var1, var2, var3, var4);
}
void LilliputScript::OC_stopObjectSound() {
@ -3333,7 +3333,7 @@ void LilliputScript::OC_playMusic() {
warning("OC_playMusic: unknown value for var3");
Common::Point var3 = Common::Point(-1, -1);
_vm->_soundHandler->play(var1, var2, var3, var4);
_vm->_soundHandler->playSound(var1, var2, var3, var4);
}
void LilliputScript::OC_stopMusic() {

View File

@ -168,7 +168,6 @@ void LilliputSound::sendToChannel(byte channel, uint32 b) {
_channelsTable[channel]->send(b);
}
// Used during initialization
void LilliputSound::init() {
debugC(1, kDebugSound, "LilliputSound::init()");
@ -179,9 +178,9 @@ void LilliputSound::refresh() {
debugC(1, kDebugSound, "LilliputSound::refresh()");
}
void LilliputSound::play(int var1, Common::Point var2, Common::Point var3, Common::Point var4) {
debugC(1, kDebugSound, "LilliputSound::play(%d, %d - %d, %d - %d, %d - %d)", var1, var2.x, var2.y, var3.x, var3.y, var4.x, var4.y);
// warning("LilliputSound::play(%d, %d - %d, %d - %d, %d - %d)", var1, var2.x, var2.y, var3.x, var3.y, var4.x, var4.y);
void LilliputSound::playSound(int var1, Common::Point var2, Common::Point var3, Common::Point var4) {
debugC(1, kDebugSound, "LilliputSound::playSound(%d, %d - %d, %d - %d, %d - %d)", var1, var2.x, var2.y, var3.x, var3.y, var4.x, var4.y);
// warning("LilliputSound::playSound(%d, %d - %d, %d - %d, %d - %d)", var1, var2.x, var2.y, var3.x, var3.y, var4.x, var4.y);
// save camera (var2)
if (_aliasArr[var1] == 0xFF) {
@ -195,9 +194,8 @@ void LilliputSound::play(int var1, Common::Point var2, Common::Point var3, Commo
} else {
warning("longterm");
}
return;
}
void LilliputSound::playMusic(int var1) {
int idx = _aliasArr[var1];
bool loop = _loopArr[var1];

View File

@ -41,7 +41,7 @@ public:
void init();
void refresh();
void play(int var1, Common::Point var2, Common::Point var3, Common::Point var4);
void playSound(int var1, Common::Point var2, Common::Point var3, Common::Point var4);
void stopSound(Common::Point pos);
void toggleOnOff();
void update();