From 2d7f199341bc2732cc2a238b6caf57424fcc35ac Mon Sep 17 00:00:00 2001 From: ilotterytea Date: Sun, 26 Jan 2025 17:11:56 +0500 Subject: feat: draw tiles --- src/editor.h | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) (limited to 'src/editor.h') diff --git a/src/editor.h b/src/editor.h index 02966f1..5e51682 100644 --- a/src/editor.h +++ b/src/editor.h @@ -17,12 +17,18 @@ typedef struct { typedef struct { XdTileData data; Texture2D texture; +} EditorTileData; + +typedef struct { + EditorTileData *tile; + Vector2 position; } EditorTile; typedef struct { - int tileCacheSize; - EditorTile *tiles[200]; - Texture2D *textureCache[]; + int tileDataSize; + int tilesCount; + EditorTileData *tileData[200]; + EditorTile *tiles[]; } EditorCache; typedef struct { @@ -30,8 +36,8 @@ typedef struct { EditorCreateBlockState *createBlockState; Rectangle panelView; Vector2 panelScroll; + EditorTileData *selectedTile; EditorCache cache; - EditorTile *selectedTile; } EditorState; typedef struct { -- cgit v1.2.3