diff options
author | davidovski <david@davidovski.xyz> | 2023-07-10 01:46:56 +0100 |
---|---|---|
committer | davidovski <david@davidovski.xyz> | 2023-07-10 01:46:56 +0100 |
commit | 12a53d83e062fc7ec5838c94d575b94a7310d6cd (patch) | |
tree | 4a630b755c32696cd7c8fe2be7e7574b8fe7d622 /src/tiled.c | |
parent | b87245927e08887af7746ce0f7a91d3f73af0572 (diff) |
add tile atlas to mapfile
Diffstat (limited to 'src/tiled.c')
-rw-r--r-- | src/tiled.c | 6 |
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}; |