summaryrefslogtreecommitdiffhomepage
path: root/loader/impl.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'loader/impl.hpp')
-rw-r--r--loader/impl.hpp42
1 files changed, 31 insertions, 11 deletions
diff --git a/loader/impl.hpp b/loader/impl.hpp
index f5975d0e..525a5ecc 100644
--- a/loader/impl.hpp
+++ b/loader/impl.hpp
@@ -10,22 +10,36 @@
#include <Corrade/PluginManager/PluginManager.h>
#include <Magnum/Trade/AbstractImporter.h>
-namespace floormat { struct anim_def; }
+namespace floormat {
+struct anim_def;
+struct wall_info;
+}
namespace floormat::loader_detail {
struct loader_impl final : loader_
{
+// <-----< resources <-----<
Optional<Utility::Resource> shader_res;
Optional<PluginManager::Manager<Trade::AbstractImporter>> importer_plugins;
Containers::Pointer<Trade::AbstractImporter> image_importer;
Containers::Pointer<Trade::AbstractImporter> tga_importer;
+// >-----> resources >----->
- tsl::robin_map<StringView, std::shared_ptr<struct tile_atlas>> tile_atlas_map;
- tsl::robin_map<StringView, std::shared_ptr<struct anim_atlas>> anim_atlas_map;
- tsl::robin_map<StringView, const struct vobj_info*> vobj_atlas_map;
+// <-----< walls <-----<
+ struct wall_index { uint32_t val = (uint32_t)-1; };
+ tsl::robin_map<StringView, const wall_info*> wall_atlas_map;
+ std::vector<wall_info> wall_atlas_array;
+
+ const wall_info& wall_atlas(StringView name, StringView dir) override;
+ ArrayView<const wall_info> wall_atlas_list() override;
+ void get_wall_atlas_list();
+ std::shared_ptr<class wall_atlas> get_wall_atlas(StringView pathname);
+// >-----> walls >----->
+
+ tsl::robin_map<StringView, std::shared_ptr<class tile_atlas>> tile_atlas_map;
+ tsl::robin_map<StringView, std::shared_ptr<class anim_atlas>> anim_atlas_map;
std::vector<String> anim_atlases;
- std::vector<struct vobj_info> vobjs;
std::vector<serialized_scenery> sceneries_array;
tsl::robin_map<StringView, const serialized_scenery*> sceneries_map;
@@ -34,21 +48,27 @@ struct loader_impl final : loader_
StringView shader(StringView filename) noexcept override;
Trade::ImageData2D texture(StringView prefix, StringView filename) noexcept(false) override;
- std::shared_ptr<struct tile_atlas> tile_atlas(StringView filename, Vector2ub size, Optional<pass_mode> pass) noexcept(false) override;
- std::shared_ptr<struct tile_atlas> tile_atlas(StringView filename) noexcept(false) override;
+ std::shared_ptr<class tile_atlas> tile_atlas(StringView filename, Vector2ub size, Optional<pass_mode> pass) noexcept(false) override;
+ std::shared_ptr<class tile_atlas> tile_atlas(StringView filename) noexcept(false) override;
ArrayView<const String> anim_atlas_list() override;
- std::shared_ptr<struct anim_atlas> anim_atlas(StringView name, StringView dir) noexcept(false) override;
+ std::shared_ptr<class anim_atlas> anim_atlas(StringView name, StringView dir) noexcept(false) override;
const std::vector<serialized_scenery>& 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<struct anim_atlas> make_vobj_anim_atlas(StringView name, StringView image_filename);
+// <-----< vobjs <-----<
+ tsl::robin_map<StringView, const struct vobj_info*> vobj_atlas_map;
+ std::vector<struct vobj_info> vobjs;
+
+ std::shared_ptr<class anim_atlas> make_vobj_anim_atlas(StringView name, StringView image_filename);
const struct vobj_info& vobj(StringView name) override;
ArrayView<const struct vobj_info> vobj_list() override;
+ void get_vobj_list();
+// >-----> vobjs >----->
+
+ static anim_def deserialize_anim(StringView filename);
void set_application_working_directory();
StringView startup_directory() noexcept override;