summaryrefslogtreecommitdiff
path: root/src/tiled.c
diff options
context:
space:
mode:
authordavidovski <david@davidovski.xyz>2023-07-10 01:46:56 +0100
committerdavidovski <david@davidovski.xyz>2023-07-10 01:46:56 +0100
commit12a53d83e062fc7ec5838c94d575b94a7310d6cd (patch)
tree4a630b755c32696cd7c8fe2be7e7574b8fe7d622 /src/tiled.c
parentb87245927e08887af7746ce0f7a91d3f73af0572 (diff)
add tile atlas to mapfile
Diffstat (limited to 'src/tiled.c')
-rw-r--r--src/tiled.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/tiled.c b/src/tiled.c
index 2cb1cb0..b679e3c 100644
--- a/src/tiled.c
+++ b/src/tiled.c
@@ -6,16 +6,16 @@
#define SCREEN_W 1280
#define SCREEN_H 720
-const int atlasSize[2] = {2, 2};
int main() {
InitWindow(SCREEN_W, SCREEN_H, "tiled");
Shader shader = LoadShader(0, "tiled.glsl");
- Texture2D tilemap = loadTileMap("map.tiles");
+ int atlasSize[2] = {0, 0};
+ Texture2D tilemap, atlas;
+ loadTileMap("map.tiles", &tilemap, &atlas, atlasSize);
- Texture atlas = LoadTexture("atlas.png");
RenderTexture2D target = LoadRenderTexture(SCREEN_W, SCREEN_H);
float resolution[2] = {SCREEN_W, SCREEN_H};