diff --git a/include/app/elements.h b/include/app/elements.h index 9188c2a..ad1f37f 100644 --- a/include/app/elements.h +++ b/include/app/elements.h @@ -2,6 +2,7 @@ #define ELEMENTS_H #include "bindings/ruby.h" +#include "ecs/ecs.h" #include "localization/localization.h" #include "utils.h" #include "window/window.h" @@ -84,14 +85,23 @@ struct ERect : Element { }; struct EWorld : Element { -#warning need to implement ecs system first before implementing this - uint64_t world_id = UINT64_MAX; - - EWorld(uint64_t world_id) : Element(Type::WORLD), world_id(world_id) {} + EWorld() : Element(Type::WORLD) {} Vec2 size() override; void render(uint64_t) override; + + Vec2 cam_pos; + float cam_rotation = 0; + Vec2 cam_scale = {1, 1}; + + using V = std::variant; + + void add_component( + std::string_view name, + std::unordered_map fields, + std::unordered_map globals + ); }; inline Pool element_pool; diff --git a/src/bindings/element_world.cc b/src/bindings/element_world.cc new file mode 100644 index 0000000..e69de29