From ad04490ef84d7565fbec0fa878a21694ad2d61f0 Mon Sep 17 00:00:00 2001 From: pryazha Date: Tue, 26 Aug 2025 10:55:18 +0500 Subject: guess that's all --- in_practice/breakout/audio.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 in_practice/breakout/audio.c (limited to 'in_practice/breakout/audio.c') diff --git a/in_practice/breakout/audio.c b/in_practice/breakout/audio.c new file mode 100644 index 0000000..2a62de4 --- /dev/null +++ b/in_practice/breakout/audio.c @@ -0,0 +1,14 @@ +#include "audio.h" + +#include + +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; +} -- cgit v1.2.3-70-g09d2