diff options
-rw-r--r-- | engines/sci/engine/savegame.cpp | 16 | ||||
-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 |
4 files changed, 28 insertions, 28 deletions
diff --git a/engines/sci/engine/savegame.cpp b/engines/sci/engine/savegame.cpp index 0f97025229..c8d95a221f 100644 --- a/engines/sci/engine/savegame.cpp +++ b/engines/sci/engine/savegame.cpp @@ -126,10 +126,10 @@ static void syncSong(Common::Serializer &s, MusicEntry *song) { song->volume = 100; song->dataInc = 0; // No fading info - song->FadeTo = 0; - song->FadeStep = 0; - song->FadeTicker = 0; - song->FadeTickerStep = 0; + song->fadeTo = 0; + song->fadeStep = 0; + song->fadeTicker = 0; + song->fadeTickerStep = 0; } else { // A bit more optimized saving sync_reg_t(s, song->soundObj); @@ -139,10 +139,10 @@ static void syncSong(Common::Serializer &s, MusicEntry *song) { s.syncAsByte(song->prio); s.syncAsByte(song->loop); s.syncAsByte(song->volume); - s.syncAsByte(song->FadeTo); - s.syncAsSint16LE(song->FadeStep); - s.syncAsSint32LE(song->FadeTicker); - s.syncAsSint32LE(song->FadeTickerStep); + s.syncAsByte(song->fadeTo); + s.syncAsSint16LE(song->fadeStep); + s.syncAsSint32LE(song->fadeTicker); + s.syncAsSint32LE(song->fadeTickerStep); s.syncAsByte(song->status); } 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 } |