summaryrefslogtreecommitdiff
path: root/src/tiled2c.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/tiled2c.h')
-rw-r--r--src/tiled2c.h23
1 files changed, 22 insertions, 1 deletions
diff --git a/src/tiled2c.h b/src/tiled2c.h
index f57c83a..bbf7ce8 100644
--- a/src/tiled2c.h
+++ b/src/tiled2c.h
@@ -1,4 +1,7 @@
#pragma once
+#ifdef __cplusplus
+extern "C" {
+#endif
typedef struct {
double duration;
@@ -28,12 +31,26 @@ typedef struct {
} Tiled2cSet;
typedef struct {
+ const unsigned int *data;
+} Tiled2cTilelayer;
+
+typedef struct {
+ const char *image;
+ int x;
+ int y;
+} Tiled2cImagelayer;
+
+typedef struct {
const char *name;
+ unsigned int type;
double opacity;
unsigned int visible;
double parallaxx;
double parallaxy;
- const unsigned int *data;
+ union {
+ Tiled2cTilelayer tilelayer;
+ Tiled2cImagelayer imagelayer;
+ };
} Tiled2cLayer;
typedef struct {
@@ -59,3 +76,7 @@ typedef struct {
const Tiled2cObject *objects;
unsigned int numobjects;
} Tiled2cMap;
+
+#ifdef __cplusplus
+}
+#endif