summaryrefslogtreecommitdiffhomepage
path: root/editor
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2022-10-29 19:49:46 +0200
committerStanislaw Halik <sthalik@misaki.pl>2022-10-29 19:49:46 +0200
commit1fba4e6dfc8439bc4f59fa53f880258c8bdc8239 (patch)
tree391c1a2bcb1136afd5439707830762c5737fd08c /editor
parent5ea810bbcd4567b38e3b8478eb5e7e3cab2e4720 (diff)
use constexpr
Diffstat (limited to 'editor')
-rw-r--r--editor/draw.cpp4
-rw-r--r--editor/imgui.cpp4
2 files changed, 4 insertions, 4 deletions
diff --git a/editor/draw.cpp b/editor/draw.cpp
index b2a7b659..b94d8ec2 100644
--- a/editor/draw.cpp
+++ b/editor/draw.cpp
@@ -17,8 +17,8 @@ void app::draw_wireframe_quad(global_coords pos)
const Vector3 center{Vector3i(pt[0], pt[1], 0) * iTILE_SIZE};
shader.set_tint({1, 0, 0, 1});
_wireframe_quad.draw(shader, {center, TILE_SIZE2, LINE_WIDTH});
- //_wireframe_wall_n.draw(shader, {center, {TILE_SIZE[0], TILE_SIZE[1], TILE_SIZE[2]}, LINE_WIDTH});
- //_wireframe_wall_w.draw(shader, {center, {TILE_SIZE[0], TILE_SIZE[1], TILE_SIZE[2]}, LINE_WIDTH});
+ //_wireframe_wall_n.draw(shader, {center, TILE_SIZE, LINE_WIDTH});
+ //_wireframe_wall_w.draw(shader, {center, TILE_SIZE, LINE_WIDTH});
}
}
diff --git a/editor/imgui.cpp b/editor/imgui.cpp
index acb0e3b0..e4c0760e 100644
--- a/editor/imgui.cpp
+++ b/editor/imgui.cpp
@@ -164,8 +164,8 @@ void app::draw_editor_pane(tile_editor& type, float main_menu_height)
snprintf(buf, sizeof(buf), "##item_%zu", i);
const auto uv = v->texcoords_for_id(i);
- ImGui::ImageButton(buf, (void*)&v->texture(),
- { TILE_SIZE[0]*.5f, TILE_SIZE[1]*.5f },
+ constexpr ImVec2 size_2 = { TILE_SIZE[0]*.5f, TILE_SIZE[1]*.5f };
+ ImGui::ImageButton(buf, (void*)&v->texture(), size_2,
{ uv[3][0], uv[3][1] }, { uv[0][0], uv[0][1] });
if (ed)
{