aboutsummaryrefslogtreecommitdiff
path: root/headers/TZR_types.h
diff options
context:
space:
mode:
authorkdx <kikoodx@paranoici.org>2023-02-13 05:50:53 +0100
committerkdx <kikoodx@paranoici.org>2023-02-13 05:52:04 +0100
commitf19a436add2b40f723596299f1ad0d6d9e5ef449 (patch)
treec266b58af87192c8ae06db7493328d098e63c494 /headers/TZR_types.h
parent2330d648c665e59212c5b1482ac9b9e392bfbf25 (diff)
downloadtzr-f19a436add2b40f723596299f1ad0d6d9e5ef449.tar.gz
organization
Diffstat (limited to 'headers/TZR_types.h')
-rw-r--r--headers/TZR_types.h44
1 files changed, 44 insertions, 0 deletions
diff --git a/headers/TZR_types.h b/headers/TZR_types.h
new file mode 100644
index 0000000..69f0258
--- /dev/null
+++ b/headers/TZR_types.h
@@ -0,0 +1,44 @@
+#pragma once
+#include <stdbool.h>
+
+enum TZR_ResourceType {
+ TZR_RES_UNKNOWN,
+ TZR_RES_IMAGE,
+};
+
+typedef unsigned int TZR_Uint;
+typedef struct TZR_Point TZR_Point;
+typedef struct TZR_Rect TZR_Rect;
+typedef enum TZR_ResourceType TZR_ResourceType;
+typedef struct TZR_Image TZR_Image;
+typedef struct TZR_Resource TZR_Resource;
+typedef struct TZR_Element TZR_Element;
+
+struct TZR_Point {
+ int x;
+ int y;
+};
+
+struct TZR_Rect {
+ TZR_Point from;
+ TZR_Point to;
+};
+
+struct TZR_Image {
+ int width, height;
+};
+
+struct TZR_Resource {
+ TZR_ResourceType type;
+ char *path; /* allocated and freed by TZR; can be NULL */
+ union {
+ void *unknown; /* raw file data */
+ struct TZR_Image image;
+ };
+};
+
+struct TZR_Element {
+ TZR_Rect area;
+ TZR_Resource *resource;
+ TZR_Element *next;
+};