summaryrefslogtreecommitdiff
path: root/src/tiledfile.h
diff options
context:
space:
mode:
authordavidovski <david@davidovski.xyz>2023-07-11 01:36:53 +0100
committerdavidovski <david@davidovski.xyz>2023-07-11 01:36:53 +0100
commit86da5bd3b0b5e0a8d9e68534297ca0446d2f735d (patch)
tree09c0a666674cfdd3703ea01beff6064d09349acd /src/tiledfile.h
parentda40b1083161b1a53e2764ffac3a3a1f8568e24c (diff)
refactor tiled
Diffstat (limited to 'src/tiledfile.h')
-rw-r--r--src/tiledfile.h15
1 files changed, 14 insertions, 1 deletions
diff --git a/src/tiledfile.h b/src/tiledfile.h
index 8c47234..c9bd573 100644
--- a/src/tiledfile.h
+++ b/src/tiledfile.h
@@ -1,3 +1,16 @@
#include <raylib.h>
-int loadTileMap(char * filename, Texture2D * tilemap, Texture2D * atlas, int * atlasSize);
+typedef struct TiledMap {
+ int width;
+ int height;
+ char * tilelayout;
+ int tilesize;
+ int atlasSize[2];
+ Color * atlasData;
+} TiledMap;
+
+void textureFromPixels(Texture2D *texOut, Color *pixels, int width, int height);
+
+void renderTilemapTexture(Texture2D *texOut, TiledMap tiledMap);
+
+TiledMap loadTiledMap(char * filename);