#include "components.hpp" #include "point.hpp" #include "easings.hpp" namespace components { void configure_entity(const ComponentMap& component_map, DinkyECS::World& world, DinkyECS::Entity ent, json& data) { for (auto &i : data) { dbc::check(i.contains("_type") && i["_type"].is_string(), fmt::format("component has no _type: {}", data.dump())); dbc::check(component_map.contains(i["_type"]), fmt::format("component_map doesn't have type {}", std::string(i["_type"]))); component_map.at(i["_type"])(world, ent, i); } } void configure(ComponentMap& component_map) { components::enroll(component_map); components::enroll(component_map); components::enroll(component_map); components::enroll(component_map); components::enroll(component_map); components::enroll(component_map); components::enroll(component_map); components::enroll(component_map); components::enroll(component_map); components::enroll(component_map); components::enroll(component_map); components::enroll(component_map); components::enroll(component_map); components::enroll(component_map); components::enroll(component_map); } }