#pragma once #include "loader/loader.hpp" #include #include #include #include #include #include #include #include #include namespace floormat { struct anim_def; } namespace floormat::loader_detail { struct loader_impl final : loader_ { Optional shader_res; Optional> importer_plugins; Containers::Pointer image_importer; Containers::Pointer tga_importer; tsl::robin_map> tile_atlas_map; tsl::robin_map> anim_atlas_map; tsl::robin_map vobj_atlas_map; std::vector anim_atlases; std::vector vobjs; std::vector sceneries_array; tsl::robin_map sceneries_map; String original_working_directory; StringView shader(StringView filename) noexcept override; Trade::ImageData2D texture(StringView prefix, StringView filename) noexcept(false) override; std::shared_ptr tile_atlas(StringView filename, Vector2ub size, Optional pass) noexcept(false) override; std::shared_ptr tile_atlas(StringView filename) noexcept(false) override; ArrayView anim_atlas_list() override; std::shared_ptr anim_atlas(StringView name, StringView dir) noexcept(false) override; const std::vector& sceneries() override; const scenery_proto& scenery(StringView name) noexcept(false) override; void get_anim_atlas_list(); void get_scenery_list(); static anim_def deserialize_anim(StringView filename); void get_vobj_list(); std::shared_ptr make_vobj_anim_atlas(StringView name, StringView image_filename); const struct vobj_info& vobj(StringView name) override; ArrayView vobj_list() override; void set_application_working_directory(); StringView startup_directory() noexcept override; static void system_init(); static bool chdir(StringView pathname); [[nodiscard]] static bool check_atlas_name(StringView name); void ensure_plugins(); explicit loader_impl(); ~loader_impl() override; }; } // namespace floormat::loader_detail