#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; std::unordered_map> tile_atlas_map; std::unordered_map> anim_atlas_map; std::vector anim_atlases; std::vector sceneries_array; std::unordered_map sceneries_map; StringView shader(StringView filename) override; Trade::ImageData2D texture(StringView prefix, StringView filename); std::shared_ptr tile_atlas(StringView filename, Vector2ub size) override; ArrayView anim_atlas_list() override; std::shared_ptr anim_atlas(StringView name, StringView dir) override; const std::vector& sceneries() override; const scenery_proto& scenery(StringView name) override; void get_anim_atlas_list(); void get_scenery_list(); static void set_application_working_directory(); static anim_def deserialize_anim(StringView filename); 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