summaryrefslogtreecommitdiffhomepage
path: root/editor/draw.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'editor/draw.cpp')
-rw-r--r--editor/draw.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/editor/draw.cpp b/editor/draw.cpp
index d1e18292..590c2ff1 100644
--- a/editor/draw.cpp
+++ b/editor/draw.cpp
@@ -162,10 +162,10 @@ void app::draw_collision_boxes()
constexpr auto m = TILE_SIZE2 * Vector2(1- eps, 1- eps);
const auto tile_ = Vector2(M->pixel_to_tile_(Vector2d(pixel)));
const auto curchunk = Vector2(tile.chunk()), curtile = Vector2(tile.local());
- const auto subpixel_ = Math::fmod(tile_, 1.f);
+ const auto subpixelʹ = Math::fmod(tile_, 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]);
+ 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++)
for (int16_t x = minx; x <= maxx; x++)
{
@@ -229,8 +229,8 @@ clickable* app::find_clickable_scenery(const Optional<Vector2i>& pixel)
for (clickable& c : array)
if (c.depth > depth && c.dest.contains(p))
{
- const auto pos_ = *pixel - c.dest.min() + Vector2i(c.src.min());
- const auto pos = !c.mirrored ? pos_ : Vector2i(int(c.src.sizeX()) - 1 - pos_[0], pos_[1]);
+ const auto posʹ = *pixel - c.dest.min() + Vector2i(c.src.min());
+ const auto pos = !c.mirrored ? posʹ : Vector2i(int(c.src.sizeX()) - 1 - posʹ[0], posʹ[1]);
size_t idx = unsigned(pos.y()) * c.stride + unsigned(pos.x());
fm_assert(c.bitmask.isEmpty() || idx < c.bitmask.size());
if (c.bitmask.isEmpty() || c.bitmask[idx])