|
@@ -1,3 +1,4 @@
|
|
|
|
|
+#include <SDL3/SDL_rect.h>
|
|
|
#include <component/input_listener_component.h>
|
|
#include <component/input_listener_component.h>
|
|
|
#include <component/position_component.h>
|
|
#include <component/position_component.h>
|
|
|
#include <component/rect_component.h>
|
|
#include <component/rect_component.h>
|
|
@@ -8,6 +9,18 @@
|
|
|
namespace testbed {
|
|
namespace testbed {
|
|
|
|
|
|
|
|
void meta_setup() {
|
|
void meta_setup() {
|
|
|
|
|
+ entt::meta_factory<SDL_FPoint>()
|
|
|
|
|
+ .type("sdl_fpoint")
|
|
|
|
|
+ .data<&SDL_FPoint::x>("x")
|
|
|
|
|
+ .data<&SDL_FPoint::y>("y");
|
|
|
|
|
+
|
|
|
|
|
+ entt::meta_factory<SDL_FRect>()
|
|
|
|
|
+ .type("sdl_frect")
|
|
|
|
|
+ .data<&SDL_FRect::x>("x")
|
|
|
|
|
+ .data<&SDL_FRect::y>("y")
|
|
|
|
|
+ .data<&SDL_FRect::w>("w")
|
|
|
|
|
+ .data<&SDL_FRect::h>("h");
|
|
|
|
|
+
|
|
|
entt::meta_factory<input_listener_component::type>()
|
|
entt::meta_factory<input_listener_component::type>()
|
|
|
.type("command type")
|
|
.type("command type")
|
|
|
.data<input_listener_component::type::UP>("up")
|
|
.data<input_listener_component::type::UP>("up")
|
|
@@ -19,17 +32,16 @@ void meta_setup() {
|
|
|
.type("input listener")
|
|
.type("input listener")
|
|
|
.data<&input_listener_component::command>("command");
|
|
.data<&input_listener_component::command>("command");
|
|
|
|
|
|
|
|
|
|
+ entt::meta_factory<SDL_FPoint>()
|
|
|
|
|
+ .type("point");
|
|
|
|
|
+
|
|
|
entt::meta_factory<position_component>()
|
|
entt::meta_factory<position_component>()
|
|
|
.type("position")
|
|
.type("position")
|
|
|
- .data<&SDL_FPoint::x>("x")
|
|
|
|
|
- .data<&SDL_FPoint::y>("y");
|
|
|
|
|
|
|
+ .base<SDL_FPoint>();
|
|
|
|
|
|
|
|
entt::meta_factory<rect_component>()
|
|
entt::meta_factory<rect_component>()
|
|
|
.type("rect")
|
|
.type("rect")
|
|
|
- .data<&SDL_FRect::x>("x")
|
|
|
|
|
- .data<&SDL_FRect::y>("y")
|
|
|
|
|
- .data<&SDL_FRect::w>("w")
|
|
|
|
|
- .data<&SDL_FRect::h>("h");
|
|
|
|
|
|
|
+ .base<SDL_FRect>();
|
|
|
|
|
|
|
|
entt::meta_factory<renderable_component>()
|
|
entt::meta_factory<renderable_component>()
|
|
|
.type("renderable");
|
|
.type("renderable");
|