HDB: Small loop changes in sound

This commit is contained in:
Strangerke 2019-09-06 00:44:54 +02:00
parent 27e852e17a
commit a9be9c1453

View file

@ -1980,12 +1980,9 @@ const char *Sound::getSNDLuaName(int index) {
}
int Sound::getSNDIndex(const char *name) {
int i = 0;
while (soundList[i].idx != LAST_SOUND) {
for (int i = 0; soundList[i].idx != LAST_SOUND; ++i) {
if (!scumm_stricmp(soundList[i].luaName, name))
return i;
i++;
}
return 0;
@ -2002,8 +1999,7 @@ SoundType Sound::whatSongIsPlaying() {
}
void Sound::markSoundCacheFreeable() {
int i;
for (i = 0; i < kMaxSounds; i++) {
for (int i = 0; i < kMaxSounds; i++) {
if (_soundCache[i].loaded == SNDMEM_LOADED)
_soundCache[i].loaded = SNDMEM_FREEABLE;
}