diff options
| author | Stanislaw Halik <sthalik@misaki.pl> | 2023-03-16 12:26:01 +0100 |
|---|---|---|
| committer | Stanislaw Halik <sthalik@misaki.pl> | 2023-03-17 23:23:11 +0100 |
| commit | 489db3043caa82942ef7dc5a6d4b1ee30fd56b9d (patch) | |
| tree | 4f5ba8567141bf4955c886d53ceab3907b9502f2 /editor/update.cpp | |
| parent | d7ea52c8c86e607dc3e7557c96d07910d21be1f4 (diff) | |
a
Diffstat (limited to 'editor/update.cpp')
| -rw-r--r-- | editor/update.cpp | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/editor/update.cpp b/editor/update.cpp index 6107cfa6..470e8b9f 100644 --- a/editor/update.cpp +++ b/editor/update.cpp @@ -69,7 +69,7 @@ void app::do_mouse_up_down(std::uint8_t button, bool is_down, int mods) if (button == mouse_button_left) { if (auto* cl = find_clickable_scenery(*cursor.pixel)) - return (void)cl->e->activate(cl->e->iter()); + return (void)cl->e->activate(cl->e->index()); } // TODO it should open on mouseup if still on the same item as on mousedown else if (button == mouse_button_right) @@ -110,7 +110,7 @@ void app::do_rotate(bool backward) auto r = backward ? e.atlas->prev_rotation_from(e.r) : e.atlas->next_rotation_from(e.r); if (r != e.r) { - e.rotate(e.iter(), r); + e.rotate(e.index(), r); e.chunk().mark_scenery_modified(); } } @@ -190,9 +190,8 @@ void app::update_world(float dt) const auto size = es.size(); for (auto i = size-1; i != (std::size_t)-1; i--) { - auto iter = es.cbegin() + std::ptrdiff_t(i); auto& e = *es[i]; - c.with_scenery_update(e, [&] { return e.update(iter, dt); }); + c.with_scenery_update(e, [&] { return e.update(i, dt); }); } } } |
