From 12a53d83e062fc7ec5838c94d575b94a7310d6cd Mon Sep 17 00:00:00 2001 From: davidovski Date: Mon, 10 Jul 2023 01:46:56 +0100 Subject: add tile atlas to mapfile --- src/tiled.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/tiled.c') 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}; -- cgit v1.2.1