Implemented load audio and music files as well the basic audio playback

functionality.
This commit is contained in:
abdelrahman committed 2022-09-25 02:19:21 +01:00
1 parent dfee36ffe9
commit e3f4f9c94f
9 files changed
+464 -61

No files matched your search

+11 -11
View File
@@ -136,23 +136,23 @@ void render_all_objects(ObjectStore *os) {
}
}
void destroy_object_store(ObjectStore *os) {
if (!os) {
void destroy_object_store(ObjectStore **os) {
if (!(*os)) {
return;
}
for (size_t i = 0; i < os->count; ++i) {
os->object_ptrs[i] = NULL;
os->event_handlers[i] = NULL;
os->update_funcs[i] = NULL;
os->render_funcs[i] = NULL;
for (size_t i = 0; i < (*os)->count; ++i) {
(*os)->object_ptrs[i] = NULL;
(*os)->event_handlers[i] = NULL;
(*os)->update_funcs[i] = NULL;
(*os)->render_funcs[i] = NULL;
}
os->count = 0;
os->deleted_count = 0;
(*os)->count = 0;
(*os)->deleted_count = 0;
free(os);
os = NULL;
free(*os);
*os = NULL;
}
#ifdef DEBUG_ENGINE