diff options
author | Nicolas Bacca | 2004-01-26 07:38:26 +0000 |
---|---|---|
committer | Nicolas Bacca | 2004-01-26 07:38:26 +0000 |
commit | a2038809b2e0c455717e5cb24b54b53251d4efa5 (patch) | |
tree | 6a35979aaa807f2c4820f98b5561a2b6eed3a0b7 /queen/music.cpp | |
parent | 1cbefa8e21e386a28386a9cd4e67ede115e3815b (diff) | |
download | scummvm-rg350-a2038809b2e0c455717e5cb24b54b53251d4efa5.tar.gz scummvm-rg350-a2038809b2e0c455717e5cb24b54b53251d4efa5.tar.bz2 scummvm-rg350-a2038809b2e0c455717e5cb24b54b53251d4efa5.zip |
Yet another stupid EVC fix
svn-id: r12606
Diffstat (limited to 'queen/music.cpp')
-rw-r--r-- | queen/music.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/queen/music.cpp b/queen/music.cpp index d3f448540d..c6ba04a65c 100644 --- a/queen/music.cpp +++ b/queen/music.cpp @@ -290,6 +290,8 @@ static const byte mt32_to_gm[128] = { } uint16 MusicPlayer::nextValidSong() { + int i; + if (_randomLoop && validSongs() > 1) { uint8 pos = randomQueuePos(); while(isBadSong(_songQueue[pos])) @@ -301,13 +303,13 @@ static const byte mt32_to_gm[128] = { if (!_looping && validSongs() < 2) return 0; - for (int i = _queuePos + 1; i < MUSIC_QUEUE_SIZE; i++) + for (i = _queuePos + 1; i < MUSIC_QUEUE_SIZE; i++) if (_songQueue[i] && !isBadSong(_songQueue[i])) { _queuePos = i; return _songQueue[i]; } - for (int i = 0; i < _queuePos; i++) + for (i = 0; i < _queuePos; i++) if (_songQueue[i] && !isBadSong(_songQueue[i])) { _queuePos = i; return _songQueue[i]; |