From 6b9f686913efc3725b2690033cd4f398e07076ba Mon Sep 17 00:00:00 2001 From: Xavier Del Campo Romero Date: Sat, 3 Jul 2021 00:49:03 +0200 Subject: Add project source code --- src/container/inc/container.h | 43 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 43 insertions(+) create mode 100644 src/container/inc/container.h (limited to 'src/container/inc') diff --git a/src/container/inc/container.h b/src/container/inc/container.h new file mode 100644 index 0000000..59ab5fd --- /dev/null +++ b/src/container/inc/container.h @@ -0,0 +1,43 @@ +#ifndef CONTAINER_H +#define CONTAINER_H + +#include +#include +#include +#include + +#ifdef __cplusplus +extern "C" +{ +#endif + +struct container +{ + const char *path; + + enum + { + CONTAINER_TYPE_SPRITE, + CONTAINER_TYPE_SOUND + } type; + + union + { + struct sprite *sprite; + struct sound *sound; + } data; + + struct container_rt + { + struct container *c; + } *rt; +}; + +int container_load_ex(const char *path, const struct container *list, size_t n); +void container_free(const struct container *list, size_t n); + +#ifdef __cplusplus +} +#endif + +#endif /* CONTAINER_H */ -- cgit v1.2.3