summaryrefslogtreecommitdiff
path: root/in_practice/breakout/audio.c
blob: 2a62de4a93254421a68e424e4337e5247e9dd11d (plain)
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;
}