diff options
Diffstat (limited to 'src/container/inc/container.h')
| -rw-r--r-- | src/container/inc/container.h | 43 |
1 files changed, 43 insertions, 0 deletions
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 <container/port.h> +#include <gfx.h> +#include <sfx.h> +#include <stddef.h> + +#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 */ |
