summaryrefslogtreecommitdiff
path: root/src/tiledmap.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/tiledmap.h')
-rw-r--r--src/tiledmap.h23
1 files changed, 23 insertions, 0 deletions
diff --git a/src/tiledmap.h b/src/tiledmap.h
new file mode 100644
index 0000000..fb9c789
--- /dev/null
+++ b/src/tiledmap.h
@@ -0,0 +1,23 @@
+#include <raylib.h>
+
+typedef struct TiledMap {
+ int width;
+ int height;
+ char * tilelayout;
+ int tileSize;
+ int atlasSize[2];
+ int tileCount;
+ Color * atlasData;
+} TiledMap;
+
+void textureFromPixels(Texture2D *texOut, Color *pixels, int width, int height);
+
+void setTiledMapTile(TiledMap tiledMap, int pos[2], char tile);
+
+char getTiledMapTile(TiledMap tiledMap, int pos[2]);
+
+TiledMap loadTiledMap(char * filename);
+
+void saveTiledMap(char * filename, TiledMap tiledMap);
+
+TiledMap newTiledMap(Image atlas, int tileSize, int width, int height);