Explorar el Código

testbed: a bunch of components to start with

skypjack hace 10 meses
padre
commit
cb10854bc8

+ 16 - 0
testbed/component/input_listener_component.h

@@ -0,0 +1,16 @@
+#pragma once
+
+namespace testbed {
+
+struct input_listener_component {
+    enum class type {
+        UP,
+        DOWN,
+        LEFT,
+        RIGHT
+    };
+
+    type command;
+};
+
+} // namespace testbed

+ 11 - 0
testbed/component/rect_component.h

@@ -0,0 +1,11 @@
+#pragma once
+
+#include <SDL_rect.h>
+
+namespace testbed {
+
+struct rect_component {
+    SDL_Rect area;
+};
+
+} // namespace testbed

+ 7 - 0
testbed/component/renderable_component.h

@@ -0,0 +1,7 @@
+#pragma once
+
+namespace testbed {
+
+struct renderable_component {};
+
+} // namespace testbed