mirror of
https://github.com/libretro/scummvm.git
synced 2025-02-06 19:08:15 +00:00
The intro asks to play song number 0. I'm almost sure that the music that
is supposed to play at this point has resource number 32. _songTable[0] contains the value 32 at this point, so song 0 is probably a valid music request, and not a request to stop the music. At the other end of the list, I believe the song number has to be *less* than _songTableLen, not less or equal to it. But feel free to revert this change if I'm messing things up. svn-id: r18719
This commit is contained in:
parent
ea4d3fcca1
commit
df7f81c905
@ -1643,13 +1643,13 @@ void Script::sfPlayMusic(SCRIPTFUNC_PARAMS) {
|
||||
int16 param1 = thread->pop();
|
||||
int16 param2 = thread->pop();
|
||||
|
||||
if (param1 < 1) {
|
||||
if (param1 < 0) {
|
||||
_vm->_music->stop();
|
||||
return;
|
||||
}
|
||||
|
||||
if (param1 > _vm->_music->_songTableLen) {
|
||||
warning("sfPlayMusic: Wrong song number (%d > %d)", param1, _vm->_music->_songTableLen);
|
||||
if (param1 >= _vm->_music->_songTableLen) {
|
||||
warning("sfPlayMusic: Wrong song number (%d > %d)", param1, _vm->_music->_songTableLen - 1);
|
||||
} else {
|
||||
_vm->_music->setVolume(-1, 1);
|
||||
_vm->_music->play(_vm->_music->_songTable[param1], param2 ? MUSIC_LOOP: MUSIC_NORMAL);
|
||||
|
Loading…
x
Reference in New Issue
Block a user