Searches thru all sounds for a specific name, returns -1 if not found or index of sound with name
| 379 | // Searches thru all sounds for a specific name, returns -1 if not found |
| 380 | // or index of sound with name |
| 381 | int FindSoundFileName(char *name) { |
| 382 | int i; |
| 383 | |
| 384 | ASSERT(name != NULL); |
| 385 | |
| 386 | for (i = 0; i < MAX_SOUND_FILES; i++) |
| 387 | if (SoundFiles[i].used && !stricmp(name, SoundFiles[i].name)) |
| 388 | return i; |
| 389 | |
| 390 | return -1; |
| 391 | } |
| 392 | |
| 393 | // gets the filename from a path, plus appends our .wav extension |
| 394 | void ChangeSoundFileName(const char *src, char *dest) { |