summaryrefslogtreecommitdiffhomepage
path: root/editor/draw.cpp
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2023-09-10 05:45:58 +0200
committerStanislaw Halik <sthalik@misaki.pl>2023-09-10 05:45:58 +0200
commitc5f90c889835711277d208ccb121760459213774 (patch)
treece4ed82c537aa4cdf8364310dadc16d397388833 /editor/draw.cpp
parenteb87171be32523f7fc88bc0f6d2bbcd47c600ac3 (diff)
a
Diffstat (limited to 'editor/draw.cpp')
-rw-r--r--editor/draw.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/editor/draw.cpp b/editor/draw.cpp
index 539b6c53..c898ed35 100644
--- a/editor/draw.cpp
+++ b/editor/draw.cpp
@@ -145,6 +145,7 @@ void app::draw_collision_boxes()
const auto tile_ = Vector2(M->pixel_to_tile_(Vector2d(pixel)));
const auto curchunk = Vector2(tile.chunk()), curtile = Vector2(tile.local());
const auto subpixel_ = Vector2(std::fmod(tile_[0], 1.f), std::fmod(tile_[1], 1.f));
+ // todo use this formula for dragging objs
const auto subpixel = m * Vector2(curchunk[0] < 0 ? 1 + subpixel_[0] : subpixel_[0],
curchunk[1] < 0 ? 1 + subpixel_[1] : subpixel_[1]);
for (int16_t y = miny; y <= maxy; y++)