diff options
| author | Xavier Del Campo Romero <xavi.dcr@tutanota.com> | 2021-07-03 00:49:03 +0200 |
|---|---|---|
| committer | Xavier Del Campo Romero <xavi.dcr@tutanota.com> | 2022-03-30 08:20:20 +0200 |
| commit | 8c10334252821b6310cf744218f7ad8bed7917f2 (patch) | |
| tree | f6f11d71eac56fa834783ef54a977b80f2e5efc2 /src/container/inc | |
| parent | fc9beffe0103a80bf883f85b7ae09dc42b7af50e (diff) | |
| download | rts-8c10334252821b6310cf744218f7ad8bed7917f2.tar.gz | |
Add project source code
Diffstat (limited to 'src/container/inc')
| -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 */ |
