summaryrefslogtreecommitdiffhomepage
path: root/loader/ground-traits.cpp
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2024-02-13 07:02:14 +0100
committerStanislaw Halik <sthalik@misaki.pl>2024-02-13 07:02:14 +0100
commit9b70fb78e70a509ba5bfa1c1d0a839eddd0902dc (patch)
tree8b662923591c273e8761787d3e74f3b659606c07 /loader/ground-traits.cpp
parent985ce7d9b033d16f49170af8505af46ddcf29081 (diff)
wip atlas
Diffstat (limited to 'loader/ground-traits.cpp')
-rw-r--r--loader/ground-traits.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/loader/ground-traits.cpp b/loader/ground-traits.cpp
index 4ad1d1c4..869cf214 100644
--- a/loader/ground-traits.cpp
+++ b/loader/ground-traits.cpp
@@ -19,7 +19,6 @@ StringView ground_traits::loader_name() { return "ground_atlas"_s; }
auto ground_traits::atlas_of(const Cell& x) -> const std::shared_ptr<Atlas>& { return x.atlas; }
auto ground_traits::atlas_of(Cell& x) -> std::shared_ptr<Atlas>& { return x.atlas; }
StringView ground_traits::name_of(const Cell& x) { return x.name; }
-StringView ground_traits::name_of(const Atlas& x) { return x.name(); }
String& ground_traits::name_of(Cell& x) { return x.name; }
void ground_traits::atlas_list(Storage& s)
@@ -29,13 +28,13 @@ void ground_traits::atlas_list(Storage& s)
s.name_map[loader.INVALID] = -1uz;
}
-auto ground_traits::make_invalid_atlas(Storage& s) -> Pointer<Cell>
+auto ground_traits::make_invalid_atlas(Storage& s) -> Cell
{
fm_debug_assert(!s.invalid_atlas);
auto atlas = std::make_shared<Atlas>(
ground_def{loader.INVALID, Vector2ub{1,1}, pass_mode::pass},
loader.make_error_texture(Vector2ui(tile_size_xy)));
- return Pointer<ground_cell>{ InPlaceInit, atlas, atlas->name(), atlas->num_tiles2(), atlas->pass_mode() };
+ return ground_cell{ atlas, atlas->name(), atlas->num_tiles2(), atlas->pass_mode() };
}
auto ground_traits::make_atlas(StringView name, const Cell& c) -> std::shared_ptr<Atlas>