diff options
author | Stanislaw Halik <sthalik@misaki.pl> | 2024-01-11 13:54:53 +0100 |
---|---|---|
committer | Stanislaw Halik <sthalik@misaki.pl> | 2024-01-11 14:11:47 +0100 |
commit | 7867213a01fcabb1f05b1836c2ca59dc3bb2132f (patch) | |
tree | 44af754bed0278c8bf3435df6278bd291c3043e5 /loader/atlas.cpp | |
parent | 74cf06b6b217eff32a547cf73f051f27e6b80919 (diff) |
rename tile_atlas -> ground_atlas
Diffstat (limited to 'loader/atlas.cpp')
-rw-r--r-- | loader/atlas.cpp | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/loader/atlas.cpp b/loader/atlas.cpp index e2ecb956..c7bfbdbf 100644 --- a/loader/atlas.cpp +++ b/loader/atlas.cpp @@ -2,7 +2,7 @@ #include "compat/assert.hpp" #include "compat/exception.hpp" #include "src/emplacer.hpp" -#include "src/tile-atlas.hpp" +#include "src/ground-atlas.hpp" #include "src/anim-atlas.hpp" #include <cstdio> #include <algorithm> @@ -45,9 +45,9 @@ bool loader_::check_atlas_name(StringView str) noexcept namespace floormat::loader_detail { -std::shared_ptr<tile_atlas> loader_impl::tile_atlas(StringView name, Vector2ub size, pass_mode pass) noexcept(false) +std::shared_ptr<ground_atlas> loader_impl::ground_atlas(StringView name, Vector2ub size, pass_mode pass) noexcept(false) { - if (auto it = tile_atlas_map.find(name); it != tile_atlas_map.end()) + if (auto it = ground_atlas_map.find(name); it != ground_atlas_map.end()) { fm_assert(it->second->pass_mode() == pass); return it->second; @@ -58,16 +58,16 @@ std::shared_ptr<tile_atlas> loader_impl::tile_atlas(StringView name, Vector2ub s char buf[FILENAME_MAX]; auto path = make_atlas_path(buf, IMAGE_PATH, name); - auto atlas = std::make_shared<class tile_atlas>(path, name, texture(""_s, path), size, pass); - tile_atlas_map[atlas->name()] = atlas; + auto atlas = std::make_shared<class ground_atlas>(path, name, texture(""_s, path), size, pass); + ground_atlas_map[atlas->name()] = atlas; return atlas; } -std::shared_ptr<class tile_atlas> loader_impl::tile_atlas(StringView filename) noexcept(false) +std::shared_ptr<class ground_atlas> loader_impl::ground_atlas(StringView filename) noexcept(false) { - fm_assert(!tile_atlas_map.empty()); - auto it = tile_atlas_map.find(filename); - if (it == tile_atlas_map.end()) + fm_assert(!ground_atlas_map.empty()); + auto it = ground_atlas_map.find(filename); + if (it == ground_atlas_map.end()) fm_throw("no such tile atlas '{}'"_cf, filename); return it->second; } |