diff options
author | davidovski <david@davidovski.xyz> | 2023-07-23 16:46:05 +0200 |
---|---|---|
committer | davidovski <david@davidovski.xyz> | 2023-07-23 16:46:05 +0200 |
commit | c726acd0467906afee74afb7051bb2e705e26565 (patch) | |
tree | e8b9422ba926f09b85c229d51d5a99a077ea69e8 /src/editor.c | |
parent | 0d78ec0e53d9824a029840e74bf0721ed2187e6a (diff) |
add chunk offset to rendering
Diffstat (limited to 'src/editor.c')
-rw-r--r-- | src/editor.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/src/editor.c b/src/editor.c index 2c9de3a..73c1e5a 100644 --- a/src/editor.c +++ b/src/editor.c @@ -59,13 +59,11 @@ void update(Tiled *tiled) { updateTiledCamera(tiled); Vector2 mousePos = GetMousePosition(); Vector2 mapPos = translateTiledPosition(*tiled, mousePos); - if (mapPos.x >= 0 && mapPos.x < tiled->mapSize[0] - && mapPos.y >= 0 && mapPos.y < tiled->mapSize[1]) { + lastSelectedTile[0] = selectedTile[0]; lastSelectedTile[1] = selectedTile[1]; selectedTile[0] = mapPos.x; selectedTile[1] = mapPos.y; - } handleInputs(tiled); } |