Преглед на файлове

testbed: a bunch of components to start with

skypjack преди 10 месеца
родител
ревизия
cb10854bc8
променени са 3 файла, в които са добавени 34 реда и са изтрити 0 реда
  1. 16 0
      testbed/component/input_listener_component.h
  2. 11 0
      testbed/component/rect_component.h
  3. 7 0
      testbed/component/renderable_component.h

+ 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