diff options
author | Stanislaw Halik <sthalik@misaki.pl> | 2024-02-08 21:32:32 +0100 |
---|---|---|
committer | Stanislaw Halik <sthalik@misaki.pl> | 2024-02-08 21:46:23 +0100 |
commit | 24209b545e061caf601fbdd473936ccba2d95ceb (patch) | |
tree | 69c3cf2160fc6cfa61a333e1090d425d925c8b03 /loader/ground-atlas.cpp | |
parent | a6514d1a95d0f84f0935866215463ef6aed23e19 (diff) |
some more work on ground atlases
Diffstat (limited to 'loader/ground-atlas.cpp')
-rw-r--r-- | loader/ground-atlas.cpp | 30 |
1 files changed, 5 insertions, 25 deletions
diff --git a/loader/ground-atlas.cpp b/loader/ground-atlas.cpp index 02186cec..0ea4f768 100644 --- a/loader/ground-atlas.cpp +++ b/loader/ground-atlas.cpp @@ -1,43 +1,23 @@ #include "impl.hpp" -#include "atlas-loader-storage.hpp" #include "atlas-loader.inl" #include "ground-traits.hpp" #include "ground-cell.hpp" -#include "src/tile-constants.hpp" -#include "src/ground-atlas.hpp" -#include "compat/exception.hpp" -#include "serialize/json-helper.hpp" -#include "serialize/ground-atlas.hpp" -#include <Corrade/Containers/ArrayViewStl.h> -#include <Corrade/Utility/Path.h> -#include <Magnum/Trade/ImageData.h> -#include <Magnum/ImageView.h> +#include <Magnum/Math/Vector2.h> namespace floormat::loader_detail { template class atlas_loader<ground_atlas>; -} // namespace floormat::loader_detail - -namespace floormat { - -using loader_detail::atlas_loader_traits; -using ALT = atlas_loader_traits<ground_atlas>; - std::shared_ptr<ground_atlas> -loader_::get_ground_atlas(StringView name, Vector2ub size, pass_mode pass) noexcept(false) +loader_impl::get_ground_atlas(StringView name, Vector2ub size, pass_mode pass) noexcept(false) { fm_assert(name != loader.INVALID); - auto tex = texture(loader.GROUND_TILESET_PATH, name); - auto info = ground_def{name, size, pass}; - auto atlas = std::make_shared<class ground_atlas>(info, tex); + auto atlas = _ground_loader->make_atlas(name, { + .atlas = {}, .name = name, .size = size, .pass = pass, + }); return atlas; } -} // namespace floormat - -namespace floormat::loader_detail { - atlas_loader<class ground_atlas>* loader_impl::make_ground_atlas_loader() { return new atlas_loader<class ground_atlas>; |