aboutsummaryrefslogtreecommitdiff
path: root/src/container/inc
diff options
context:
space:
mode:
authorXavier Del Campo Romero <xavi.dcr@tutanota.com>2021-07-03 00:49:03 +0200
committerXavier Del Campo Romero <xavi.dcr@tutanota.com>2022-03-30 08:20:20 +0200
commit6b9f686913efc3725b2690033cd4f398e07076ba (patch)
treee9aa91a6b9f617d78123ebe7ad272fc42a60d306 /src/container/inc
parentc9e6ae44a9aeb89b3f48f3443d6baa80103f7445 (diff)
downloadjancity-6b9f686913efc3725b2690033cd4f398e07076ba.tar.gz
Add project source code
Diffstat (limited to 'src/container/inc')
-rw-r--r--src/container/inc/container.h43
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 */