Searches thru all sounds for a specific name, returns -1 if not found or index of sound with name
| 557 | // Searches thru all sounds for a specific name, returns -1 if not found |
| 558 | // or index of sound with name |
| 559 | int FindSoundName(const char *name) { |
| 560 | int i; |
| 561 | |
| 562 | ASSERT(name != NULL); |
| 563 | |
| 564 | for (i = 0; i < MAX_SOUNDS; i++) |
| 565 | if (Sounds[i].used && !stricmp(name, Sounds[i].name)) |
| 566 | return i; |
| 567 | |
| 568 | return -1; |
| 569 | } |
| 570 | |
| 571 | // Given a filename, loads the sound. |
| 572 | int LoadSound(char *filename) { |
no outgoing calls
no test coverage detected