HDB: Small loop changes in sound
This commit is contained in:
parent
27e852e17a
commit
a9be9c1453
1 changed files with 2 additions and 6 deletions
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue