diff options
Diffstat (limited to 'editor')
-rw-r--r-- | editor/app.cpp | 4 | ||||
-rw-r--r-- | editor/camera.cpp | 10 | ||||
-rw-r--r-- | editor/draw.cpp | 12 | ||||
-rw-r--r-- | editor/imgui.cpp | 12 | ||||
-rw-r--r-- | editor/inspect-draw.cpp | 6 | ||||
-rw-r--r-- | editor/update.cpp | 6 |
6 files changed, 25 insertions, 25 deletions
diff --git a/editor/app.cpp b/editor/app.cpp index 35aa1230..c8c5aa0f 100644 --- a/editor/app.cpp +++ b/editor/app.cpp @@ -32,7 +32,7 @@ shared_ptr_wrapper<critter> app::ensure_player_character(world& w) return w.ensure_player_character(_character_id); } -void app::reset_world(class world&& w_) +void app::reset_world(class world&& wʹ) { if (!M) return; @@ -51,7 +51,7 @@ void app::reset_world(class world&& w_) _render_all_z_levels = true; _timestamp = 0; - auto& w = M->reset_world(move(w_)); + auto& w = M->reset_world(move(wʹ)); w.collect(true); ensure_player_character(w); update_cursor_tile(pixel); diff --git a/editor/camera.cpp b/editor/camera.cpp index 34f02e51..429dbdba 100644 --- a/editor/camera.cpp +++ b/editor/camera.cpp @@ -91,10 +91,10 @@ object_id app::get_object_colliding_with_cursor() for (int16_t x = minx; x <= maxx; x++) { const chunk_coords_ c_pos{x, y, _z_level}; - auto* c_ = world.at(c_pos); - if (!c_) + auto* cʹ = world.at(c_pos); + if (!cʹ) continue; - auto& c = *c_; + auto& c = *cʹ; c.ensure_passability(); const with_shifted_camera_offset o{shader, c_pos, {minx, miny}, {maxx, maxy}}; if (floormat_main::check_chunk_visible(shader.camera_offset(), sz)) @@ -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; diff --git a/editor/draw.cpp b/editor/draw.cpp index 40ba0235..d1e18292 100644 --- a/editor/draw.cpp +++ b/editor/draw.cpp @@ -122,10 +122,10 @@ void app::draw_collision_boxes() for (int16_t x = minx; x <= maxx; x++) { const chunk_coords_ pos{x, y, z}; - auto* c_ = world.at(pos); - if (!c_) + auto* cʹ = world.at(pos); + if (!cʹ) continue; - auto& c = *c_; + auto& c = *cʹ; c.ensure_passability(); const with_shifted_camera_offset o{shader, pos, {minx, miny}, {maxx, maxy}}; if (floormat_main::check_chunk_visible(shader.camera_offset(), sz)) @@ -170,10 +170,10 @@ void app::draw_collision_boxes() for (int16_t x = minx; x <= maxx; x++) { const chunk_coords_ c_pos{x, y, _z_level}; - auto* c_ = world.at(c_pos); - if (!c_) + auto* cʹ = world.at(c_pos); + if (!cʹ) continue; - auto& c = *c_; + auto& c = *cʹ; c.ensure_passability(); const with_shifted_camera_offset o{shader, c_pos, {minx, miny}, {maxx, maxy}}; if (floormat_main::check_chunk_visible(shader.camera_offset(), sz)) diff --git a/editor/imgui.cpp b/editor/imgui.cpp index 62a0850d..45e0268a 100644 --- a/editor/imgui.cpp +++ b/editor/imgui.cpp @@ -267,11 +267,11 @@ void app::do_lightmap_test() if (auto* chunk = w.at(c)) { auto offset = Vector2(Vector2i(c.x) - Vector2i(x, y)); - for (const auto& e_ : chunk->objects()) + for (const auto& eʹ : chunk->objects()) { - if (e_->type() == object_type::light) + if (eʹ->type() == object_type::light) { - const auto& li = static_cast<const light&>(*e_); + const auto& li = static_cast<const light&>(*eʹ); if (li.max_distance < 1e-6f) continue; light_s L { @@ -338,16 +338,16 @@ void app::do_popup_menu() { const auto [id, target] = _popup_target; auto& w = M->world(); - auto e_ = w.find_object(id); + auto eʹ = w.find_object(id); - if (target == popup_target_type::none || !e_) + if (target == popup_target_type::none || !eʹ) { _popup_target = {}; _pending_popup = {}; return; } - auto& e = *e_; + auto& e = *eʹ; auto b0 = push_id(SCENERY_POPUP_NAME); //if (_popup_target.target != popup_target_type::scenery) {...} diff --git a/editor/inspect-draw.cpp b/editor/inspect-draw.cpp index 7b2e5009..128e619f 100644 --- a/editor/inspect-draw.cpp +++ b/editor/inspect-draw.cpp @@ -26,13 +26,13 @@ void app::draw_inspector() for (auto i = (int)(inspectors.size()-1); i >= 0; i--) { auto [id, target] = inspectors[i]; - auto e_ = w.find_object(id); - if (!e_) + auto eʹ = w.find_object(id); + if (!eʹ) { erase_inspector((unsigned)i); continue; } - auto& e = *e_; + auto& e = *eʹ; char buf[256], buf2[32], buf3[128]; ImGui::SetNextWindowSize({375*dpi[0], 0}); diff --git a/editor/update.cpp b/editor/update.cpp index 6e5269cc..6987b411 100644 --- a/editor/update.cpp +++ b/editor/update.cpp @@ -232,10 +232,10 @@ void app::update_world(Ns dt) for (int16_t y = miny; y <= maxy; y++) for (int16_t x = minx; x <= maxx; x++) { - auto* c_ = world.at({x, y, z}); - if (!c_) + auto* cʹ = world.at({x, y, z}); + if (!cʹ) continue; - auto& c = *c_; + auto& c = *cʹ; const auto& es = c.objects(); const auto size = es.size(); for (auto i = (int)(size-1); i >= 0; i--) |