SCI/newmusic: now clipping volume in cmdFadeSound
svn-id: r46876
This commit is contained in:
parent
513a56cd5e
commit
df94844db0
1 changed files with 1 additions and 1 deletions
|
@ -639,7 +639,7 @@ void SoundCommandParser::cmdFadeSound(reg_t obj, int16 value) {
|
|||
}
|
||||
|
||||
int volume = musicSlot->volume;
|
||||
musicSlot->fadeTo = _argv[2].toUint16();
|
||||
musicSlot->fadeTo = CLIP<uint16>(_argv[2].toUint16(), 0, MUSIC_VOLUME_MAX);
|
||||
musicSlot->fadeStep = volume > _argv[2].toUint16() ? -_argv[4].toUint16() : _argv[4].toUint16();
|
||||
musicSlot->fadeTickerStep = _argv[3].toUint16() * 16667 / _music->soundGetTempo();
|
||||
musicSlot->fadeTicker = 0;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue