summaryrefslogtreecommitdiffhomepage
path: root/editor
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2023-02-27 17:58:04 +0100
committerStanislaw Halik <sthalik@misaki.pl>2023-02-27 17:58:04 +0100
commit883545889d94fea794ff2ba989d4e93be50b9a78 (patch)
treedceeadbe482b9f14e861a3271fc9970600de0fed /editor
parent670057cbec1ba8f01edf4c8ced4fded33a8f90eb (diff)
src: add Vector3 conversion to {local,chunk}_coords
Diffstat (limited to 'editor')
-rw-r--r--editor/draw.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/editor/draw.cpp b/editor/draw.cpp
index f5161b7d..41a5c713 100644
--- a/editor/draw.cpp
+++ b/editor/draw.cpp
@@ -23,8 +23,7 @@ void app::draw_cursor()
if (cursor.tile && !cursor.in_imgui)
{
const auto draw = [&, pos = *cursor.tile](auto& mesh, const auto& size) {
- const auto pt = pos.to_signed();
- const auto center = Vector3(Vector3i(pt, 0) * iTILE_SIZE);
+ const auto center = Vector3(pos.to_signed3() * iTILE_SIZE);
mesh.draw(shader, {center, size, LINE_WIDTH});
};
@@ -51,7 +50,7 @@ void app::draw_cursor()
{
shader.set_tint({1, 1, 1, 0.75f});
auto [_f, _w, anim_mesh] = M->meshes();
- const auto pos = Vector3i(cursor.tile->to_signed(), 0)*iTILE_SIZE;
+ const auto pos = cursor.tile->to_signed3()*iTILE_SIZE;
anim_mesh.draw(shader, *sel.atlas, sel.frame.r, sel.frame.frame, Vector3(pos), 1);
}
}