summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--editor/wall-editor.cpp3
-rw-r--r--loader/atlas.cpp2
-rw-r--r--loader/wall-atlas.cpp2
3 files changed, 4 insertions, 3 deletions
diff --git a/editor/wall-editor.cpp b/editor/wall-editor.cpp
index b2dce5fe..2341f929 100644
--- a/editor/wall-editor.cpp
+++ b/editor/wall-editor.cpp
@@ -58,7 +58,7 @@ void wall_editor::load_atlases()
wall_editor::wall_editor()
{
load_atlases();
- _selected_atlas = _atlases.begin()->second.atlas; // todo
+ _selected_atlas = loader.wall_atlas("concrete1"_s, false); // todo
}
StringView wall_editor::name() const { return "wall"_s; }
@@ -85,6 +85,7 @@ void wall_editor::place_tile(world& w, global_coords coords, const std::shared_p
editor_snap_mode wall_editor::check_snap(int mods) const
{
+ (void)mods;
if (!is_anything_selected())
return editor_snap_mode::none;
if (_r == rotation::N)
diff --git a/loader/atlas.cpp b/loader/atlas.cpp
index 94f02e3c..68a94f0b 100644
--- a/loader/atlas.cpp
+++ b/loader/atlas.cpp
@@ -34,7 +34,7 @@ bool loader_::check_atlas_name(StringView str) noexcept
return true;
if (!str || !first_char.find(str[0]))
return false;
- if (str.findAny("\\\"'\n\r\t\a\033\0|$!%{}^*?<>&;:^"_s) || str.find("/."_s))
+ if (str.findAny("\\\"'\n\r\t\a\033\0|$!%{}^*?<>&;:^"_s) || str.find("/."_s) || str.find("//"_s))
return false;
return true;
diff --git a/loader/wall-atlas.cpp b/loader/wall-atlas.cpp
index c28f71a1..1e63a6c9 100644
--- a/loader/wall-atlas.cpp
+++ b/loader/wall-atlas.cpp
@@ -142,7 +142,7 @@ void loader_impl::get_wall_atlas_list()
ArrayView<const wall_info> loader_impl::wall_atlas_list()
{
- if (wall_atlas_map.empty())
+ if (wall_atlas_map.empty()) [[unlikely]]
get_wall_atlas_list();
fm_assert(!wall_atlas_map.empty());
return wall_atlas_array;