From 86da5bd3b0b5e0a8d9e68534297ca0446d2f735d Mon Sep 17 00:00:00 2001 From: davidovski Date: Tue, 11 Jul 2023 01:36:53 +0100 Subject: refactor tiled --- src/tiledfile.h | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) (limited to 'src/tiledfile.h') 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 -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); -- cgit v1.2.1