diff options
author | davidovski <david@davidovski.xyz> | 2023-07-11 21:37:38 +0100 |
---|---|---|
committer | davidovski <david@davidovski.xyz> | 2023-07-11 21:37:38 +0100 |
commit | ce892407370be42479bb05e9a2faa60a297c9886 (patch) | |
tree | d28da24f8f9978568cdcf2fd393e8c1bd2a7d74a /src/editor.c | |
parent | ebbb6c8b0302589626a594399ec04e3c4555d5f6 (diff) |
make render changes on texture rather than image
Diffstat (limited to 'src/editor.c')
-rw-r--r-- | src/editor.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/src/editor.c b/src/editor.c index 52e653f..ac38891 100644 --- a/src/editor.c +++ b/src/editor.c @@ -27,12 +27,11 @@ void drawOverlay(Tiled tiled) { void modifyTile(Tiled *tiled, int i) { if (selectedTile[0] >= 0 && selectedTile[0] < tiled->tiledMap.width && selectedTile[1] >= 0 && selectedTile[1] < tiled->tiledMap.height) { - printf("%d,%d", selectedTile[0], selectedTile[1]); int tile = getTiledMapTile(tiled->tiledMap, selectedTile); int tileCount = tiled->tiledMap.atlasSize[0] * tiled->tiledMap.atlasSize[1] + 1; tile = (tile + i) % (tileCount); setTiledMapTile(tiled->tiledMap, selectedTile, tile); - renderTilemapTexture(&tiled->tilemapTexture, tiled->tiledMap); + redrawTiledMap(*tiled); } } |