diff options
Diffstat (limited to 'engines/sci/sfx')
-rw-r--r-- | engines/sci/sfx/music.cpp | 16 | ||||
-rw-r--r-- | engines/sci/sfx/music.h | 8 | ||||
-rw-r--r-- | engines/sci/sfx/soundcmd.cpp | 16 |
3 files changed, 20 insertions, 20 deletions
diff --git a/engines/sci/sfx/music.cpp b/engines/sci/sfx/music.cpp index 289efa14b1..d4bca294c1 100644 --- a/engines/sci/sfx/music.cpp +++ b/engines/sci/sfx/music.cpp @@ -349,7 +349,7 @@ void SciMusic::onTimer() { if (_playList[i]->status != kSndStatusPlaying) continue; if (_playList[i]->pMidiParser) { - if (_playList[i]->FadeStep) + if (_playList[i]->fadeStep) doFade(_playList[i]); _playList[i]->pMidiParser->onTimer(); _playList[i]->ticker = (uint16)_playList[i]->pMidiParser->getTick(); @@ -372,15 +372,15 @@ void SciMusic::onTimer() { } //--------------------------------------------- void SciMusic::doFade(MusicEntry *pSnd) { - if (pSnd->FadeTicker) - pSnd->FadeTicker--; + if (pSnd->fadeTicker) + pSnd->fadeTicker--; else { - pSnd->FadeTicker = pSnd->FadeTickerStep; - if (pSnd->volume + pSnd->FadeStep > pSnd->FadeTo) { - pSnd->volume = pSnd->FadeTo; - pSnd->FadeStep = 0; + pSnd->fadeTicker = pSnd->fadeTickerStep; + if (pSnd->volume + pSnd->fadeStep > pSnd->fadeTo) { + pSnd->volume = pSnd->fadeTo; + pSnd->fadeStep = 0; } else - pSnd->volume += pSnd->FadeStep; + pSnd->volume += pSnd->fadeStep; pSnd->pMidiParser->setVolume(pSnd->volume); } } diff --git a/engines/sci/sfx/music.h b/engines/sci/sfx/music.h index 0c23a0bdbe..3ea363baa2 100644 --- a/engines/sci/sfx/music.h +++ b/engines/sci/sfx/music.h @@ -84,10 +84,10 @@ struct MusicEntry { byte loop; byte volume; - byte FadeTo; - short FadeStep; - uint32 FadeTicker; - uint32 FadeTickerStep; + byte fadeTo; + short fadeStep; + uint32 fadeTicker; + uint32 fadeTickerStep; MidiParser_SCI *pMidiParser; Audio::AudioStream* pStreamAud; diff --git a/engines/sci/sfx/soundcmd.cpp b/engines/sci/sfx/soundcmd.cpp index 2172ec936c..61a49ef4d2 100644 --- a/engines/sci/sfx/soundcmd.cpp +++ b/engines/sci/sfx/soundcmd.cpp @@ -292,10 +292,10 @@ void SoundCommandParser::cmdInitHandle(reg_t obj, int16 value) { newSound->pStreamAud = 0; newSound->pMidiParser = 0; newSound->ticker = 0; - newSound->FadeTo = 0; - newSound->FadeStep = 0; - newSound->FadeTicker = 0; - newSound->FadeTickerStep = 0; + newSound->fadeTo = 0; + newSound->fadeStep = 0; + newSound->fadeTicker = 0; + newSound->fadeTickerStep = 0; newSound->status = kSndStatusStopped; _music->_playList.push_back(newSound); @@ -624,10 +624,10 @@ void SoundCommandParser::cmdFadeHandle(reg_t obj, int16 value) { } int volume = GET_SEL32V(_segMan, obj, vol); - _music->_playList[slot]->FadeTo = _argv[2].toUint16(); - _music->_playList[slot]->FadeStep = volume > _argv[2].toUint16() ? -_argv[4].toUint16() : _argv[4].toUint16(); - _music->_playList[slot]->FadeTickerStep = _argv[3].toUint16() * 16667 / _music->soundGetTempo(); - _music->_playList[slot]->FadeTicker = 0; + _music->_playList[slot]->fadeTo = _argv[2].toUint16(); + _music->_playList[slot]->fadeStep = volume > _argv[2].toUint16() ? -_argv[4].toUint16() : _argv[4].toUint16(); + _music->_playList[slot]->fadeTickerStep = _argv[3].toUint16() * 16667 / _music->soundGetTempo(); + _music->_playList[slot]->fadeTicker = 0; #endif } |