#pragma once #include #include #include namespace Magnum { using Vector2ub = Math::Vector2; } namespace floormat { struct serialized_scenery; } namespace floormat { struct tile_atlas; struct anim_atlas; struct scenery_proto; struct loader_ { virtual StringView shader(StringView filename) = 0; virtual std::shared_ptr tile_atlas(StringView filename, Vector2ub size) = 0; virtual ArrayView anim_atlas_list() = 0; virtual std::shared_ptr anim_atlas(StringView name, StringView dir = ANIM_PATH) = 0; static void destroy(); static loader_& default_loader() noexcept; static std::vector> tile_atlases(StringView filename); virtual const std::vector& sceneries() = 0; virtual const scenery_proto& scenery(StringView name) = 0; loader_(const loader_&) = delete; loader_& operator=(const loader_&) = delete; virtual ~loader_(); static const StringView IMAGE_PATH; static const StringView ANIM_PATH; static const StringView SCENERY_PATH; protected: loader_(); }; extern loader_& loader; // NOLINT(cppcoreguidelines-avoid-non-const-global-variables) } // namespace floormat