summaryrefslogtreecommitdiff
path: root/map
diff options
context:
space:
mode:
authorkdx <kikoodx@paranoici.org>2023-03-26 18:59:06 +0200
committerkdx <kikoodx@paranoici.org>2023-03-26 18:59:06 +0200
commitccc24cda99a6972bdd92d2674da1273e499a3844 (patch)
tree476a994676d75116abb3c43959e34ab4836aa9e9 /map
parent49fe8dd96d673c4ff63590c169815c4340bc67b0 (diff)
download006-ccc24cda99a6972bdd92d2674da1273e499a3844.tar.gz
base done
Diffstat (limited to 'map')
-rw-r--r--map/brulez.tmj65
-rw-r--r--map/tmj2c.h32
2 files changed, 81 insertions, 16 deletions
diff --git a/map/brulez.tmj b/map/brulez.tmj
index 1497182..d5997f7 100644
--- a/map/brulez.tmj
+++ b/map/brulez.tmj
@@ -3,20 +3,20 @@
"infinite":false,
"layers":[
{
- "data":[1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
- 1, 5, 5, 0, 0, 0, 0, 0, 0, 5, 5, 5, 0, 0, 0, 0, 0, 0, 0, 5, 5, 0, 1, 1, 1,
- 1, 5, 0, 0, 0, 0, 0, 0, 0, 0, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 5, 5, 0, 1, 1,
- 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 5, 0, 1, 1,
- 1, 0, 0, 0, 5, 5, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 5, 5, 0, 1, 1,
- 1, 0, 0, 5, 5, 5, 0, 0, 0, 1, 0, 0, 0, 5, 5, 0, 0, 0, 0, 0, 0, 5, 0, 1, 1,
- 1, 0, 4, 5, 0, 5, 5, 0, 0, 5, 5, 1, 5, 5, 1, 0, 0, 0, 0, 0, 0, 5, 5, 0, 1,
- 1, 0, 5, 5, 0, 0, 5, 5, 5, 5, 5, 5, 5, 0, 5, 1, 0, 0, 0, 0, 0, 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 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
"height":14,
"id":1,
"name":"Tile Layer 1",
@@ -26,9 +26,42 @@
"width":25,
"x":0,
"y":0
+ },
+ {
+ "draworder":"topdown",
+ "id":2,
+ "name":"Object Layer 1",
+ "objects":[
+ {
+ "height":16,
+ "id":1,
+ "name":"player",
+ "rotation":0,
+ "type":"",
+ "visible":true,
+ "width":16,
+ "x":144,
+ "y":96
+ },
+ {
+ "height":32,
+ "id":2,
+ "name":"player",
+ "rotation":0,
+ "type":"",
+ "visible":true,
+ "width":32,
+ "x":256,
+ "y":144
+ }],
+ "opacity":1,
+ "type":"objectgroup",
+ "visible":true,
+ "x":0,
+ "y":0
}],
- "nextlayerid":2,
- "nextobjectid":1,
+ "nextlayerid":3,
+ "nextobjectid":3,
"orientation":"orthogonal",
"renderorder":"right-down",
"tiledversion":"1.10.0",
diff --git a/map/tmj2c.h b/map/tmj2c.h
new file mode 100644
index 0000000..ff5baba
--- /dev/null
+++ b/map/tmj2c.h
@@ -0,0 +1,32 @@
+#pragma once
+
+typedef struct {
+ const char *name;
+ double opacity;
+ unsigned int visible;
+ const unsigned int *data;
+} Tmj2cLayer;
+
+typedef struct {
+ const char *name;
+ const char *type;
+ unsigned int id;
+ double x;
+ double y;
+ double width;
+ double height;
+ double rotation;
+ unsigned int visible;
+} Tmj2cObject;
+
+typedef struct {
+ const char *path;
+ unsigned int width;
+ unsigned int height;
+ unsigned int tilewidth;
+ unsigned int tileheight;
+ unsigned int numlayers;
+ const Tmj2cLayer *layers;
+ unsigned int numobjects;
+ const Tmj2cObject *objects;
+} Tmj2cMap;