#pragma once #include "components.hpp" #include "dinkyecs.hpp" #include "tser.hpp" #include #include #include namespace save { namespace fs = std::filesystem; struct MapData { std::vector rooms; Matrix input_map; Matrix walls; int limit; DEFINE_SERIALIZABLE(MapData, rooms, input_map, walls); }; struct Facts { components::Player player; DEFINE_SERIALIZABLE(Facts, player); }; struct SaveData { Facts facts; MapData map; std::map position; std::map motion; std::map combat; DEFINE_SERIALIZABLE(SaveData, facts, map, position, motion, combat); }; void to_file(fs::path path, DinkyECS::World &world, Map &map); void from_file(fs::path path, DinkyECS::World &world_out, Map &map); void load_configs(DinkyECS::World &world); }