1 2 3 4 5 6 7 8 9 10 11 12 13 14
#include "audio.h" #include <string.h> struct sound sounds[max_sounds] = {0}; i32 get_sound(const char *name) { for (i32 i = 0; i < max_sounds; i++) { if (sounds[i].name && strstr(sounds[i].name, name)) return i; } return -1; }