diff options
author | Stanislaw Halik <sthalik@misaki.pl> | 2024-03-19 09:03:59 +0100 |
---|---|---|
committer | Stanislaw Halik <sthalik@misaki.pl> | 2024-03-19 14:32:18 +0100 |
commit | 332745db6c2ecaa3a81f1b337be1a0bcae7511b9 (patch) | |
tree | f7fe0e2f2522ce58b51149c6a87b53fba682aa93 /editor | |
parent | 151e6911a8aa56749edbbf0c15ab04752d96c2f3 (diff) |
ddd
rename foo_ -> fooʹ
Diffstat (limited to 'editor')
-rw-r--r-- | editor/camera.cpp | 10 | ||||
-rw-r--r-- | editor/draw.cpp | 10 | ||||
-rw-r--r-- | editor/imgui-editors.cpp | 8 | ||||
-rw-r--r-- | editor/imgui.cpp | 2 |
4 files changed, 15 insertions, 15 deletions
diff --git a/editor/camera.cpp b/editor/camera.cpp index 429dbdba..4bd316e1 100644 --- a/editor/camera.cpp +++ b/editor/camera.cpp @@ -113,8 +113,8 @@ object_id app::get_object_colliding_with_cursor() Vector2 min(rect.m_min[0], rect.m_min[1]), max(rect.m_max[0], rect.m_max[1]); if (t0 >= min && t0 <= max) { - if (auto eʹ = world.find_object(x.data); - eʹ && Vector2ui(eʹ->bbox_size).product() != 0) + if (auto e_ = world.find_object(x.data); + e_ && Vector2ui(e_->bbox_size).product() != 0) { ret = x.data; return false; @@ -142,9 +142,9 @@ void app::update_cursor_tile(const Optional<Vector2i>& pixel) const auto tile_ = Vector2(M->pixel_to_tile_(Vector2d(*pixel))); const auto curchunk = Vector2(tile.chunk()); - const auto subpixel_ = Math::fmod(tile_, 1.f); - auto subpixel = TILE_SIZE2 * Vector2(curchunk.x() < 0 ? 1 + subpixel_.x() : subpixel_.x(), - curchunk.y() < 0 ? 1 + subpixel_.y() : subpixel_.y()); + const auto subpixelʹ = Math::fmod(tile_, 1.f); + auto subpixel = TILE_SIZE2 * Vector2(curchunk.x() < 0 ? 1 + subpixelʹ.x() : subpixelʹ.x(), + curchunk.y() < 0 ? 1 + subpixelʹ.y() : subpixelʹ.y()); constexpr auto half_tile = Vector2(iTILE_SIZE2/2); subpixel -= half_tile; subpixel = Math::clamp(Math::round(subpixel), -half_tile, half_tile-Vector2{1.f}); 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]) diff --git a/editor/imgui-editors.cpp b/editor/imgui-editors.cpp index 0e821909..4872f9a2 100644 --- a/editor/imgui-editors.cpp +++ b/editor/imgui-editors.cpp @@ -171,8 +171,8 @@ void impl_draw_editor_scenery_pane(T& ed, Vector2 dpi) if (ImGui::TableSetColumnIndex(0)) { - auto atlas_ = get_atlas(scenery); - auto& atlas = *atlas_; + auto atlasʹ = get_atlas(scenery); + auto& atlas = *atlasʹ; const auto size = Vector2(get_size(scenery, atlas)); const float c = std::min(thumbnail_width / size[0], row_height / size[1]); const auto texcoords = get_texcoords(scenery, atlas); @@ -187,8 +187,8 @@ void impl_draw_editor_scenery_pane(T& ed, Vector2 dpi) { constexpr ImGuiSelectableFlags flags = ImGuiSelectableFlags_SpanAllColumns; bool selected = is_selected(ed, scenery); - auto name_ = scenery_name(name, scenery); - if (ImGui::Selectable(name_.data(), &selected, flags, {0, row_height}) && selected) + auto nameʹ = scenery_name(name, scenery); + if (ImGui::Selectable(nameʹ.data(), &selected, flags, {0, row_height}) && selected) select_tile(ed, scenery); click_event(); } diff --git a/editor/imgui.cpp b/editor/imgui.cpp index 45e0268a..3867d227 100644 --- a/editor/imgui.cpp +++ b/editor/imgui.cpp @@ -115,7 +115,7 @@ float app::draw_main_menu() void app::draw_ui() { const auto dpi = M->dpi_scale().min(); - [[maybe_unused]] const auto style_ = style_saver{}; + [[maybe_unused]] const auto styleʹ = style_saver{}; auto& style = ImGui::GetStyle(); auto& ctx = *ImGui::GetCurrentContext(); |