diff options
author | Stanislaw Halik <sthalik@misaki.pl> | 2024-02-04 20:37:31 +0100 |
---|---|---|
committer | Stanislaw Halik <sthalik@misaki.pl> | 2024-02-05 14:46:23 +0100 |
commit | e1e8ab80a5ec95f429e5735f6f678eb0447c0421 (patch) | |
tree | e64f0fed16974101876b5581c1aa0066476f4df4 /loader/loader.hpp | |
parent | a07e80366c49d398d7b7ad586297ed4173e1996a (diff) |
loader: add functions for uncached loading
Diffstat (limited to 'loader/loader.hpp')
-rw-r--r-- | loader/loader.hpp | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/loader/loader.hpp b/loader/loader.hpp index 63740aa7..5c72a719 100644 --- a/loader/loader.hpp +++ b/loader/loader.hpp @@ -14,6 +14,7 @@ using ImageData2D = ImageData<2>; namespace floormat { +struct anim_def; class anim_atlas; struct scenery_proto; struct vobj_info; @@ -37,7 +38,6 @@ struct loader_ { virtual StringView shader(StringView filename) noexcept = 0; virtual Trade::ImageData2D texture(StringView prefix, StringView filename) noexcept(false) = 0; - virtual std::shared_ptr<class ground_atlas> get_ground_atlas(StringView name, Vector2ub size, pass_mode pass) noexcept(false) = 0; virtual std::shared_ptr<class ground_atlas> ground_atlas(StringView filename, loader_policy policy = loader_policy::DEFAULT) noexcept(false) = 0; virtual ArrayView<const String> anim_atlas_list() = 0; virtual std::shared_ptr<class anim_atlas> anim_atlas(StringView name, StringView dir = ANIM_PATH) noexcept(false) = 0; @@ -55,6 +55,10 @@ struct loader_ static StringView make_atlas_path(char(&buf)[FILENAME_MAX], StringView dir, StringView name); [[nodiscard]] static bool check_atlas_name(StringView name) noexcept; + /** \deprecated{internal use only}*/ [[nodiscard]] std::shared_ptr<class ground_atlas> get_ground_atlas(StringView name, Vector2ub size, pass_mode pass) noexcept(false); + /** \deprecated{internal use only}*/ [[nodiscard]] std::shared_ptr<class wall_atlas> get_wall_atlas(StringView name) noexcept(false); + /** \deprecated{internal use only}*/ [[nodiscard]] std::shared_ptr<class anim_atlas> get_anim_atlas(StringView path) noexcept(false); + virtual ~loader_() noexcept; fm_DECLARE_DELETED_COPY_ASSIGNMENT(loader_); fm_DECLARE_DELETED_MOVE_ASSIGNMENT(loader_); @@ -69,6 +73,8 @@ struct loader_ static const StringView WALL_TILESET_PATH; protected: + static anim_def deserialize_anim_def(StringView filename) noexcept(false); + loader_(); }; |