testbed: a bunch of components to start with
This commit is contained in:
16
testbed/component/input_listener_component.h
Normal file
16
testbed/component/input_listener_component.h
Normal file
@@ -0,0 +1,16 @@
|
||||
#pragma once
|
||||
|
||||
namespace testbed {
|
||||
|
||||
struct input_listener_component {
|
||||
enum class type {
|
||||
UP,
|
||||
DOWN,
|
||||
LEFT,
|
||||
RIGHT
|
||||
};
|
||||
|
||||
type command;
|
||||
};
|
||||
|
||||
} // namespace testbed
|
||||
11
testbed/component/rect_component.h
Normal file
11
testbed/component/rect_component.h
Normal file
@@ -0,0 +1,11 @@
|
||||
#pragma once
|
||||
|
||||
#include <SDL_rect.h>
|
||||
|
||||
namespace testbed {
|
||||
|
||||
struct rect_component {
|
||||
SDL_Rect area;
|
||||
};
|
||||
|
||||
} // namespace testbed
|
||||
7
testbed/component/renderable_component.h
Normal file
7
testbed/component/renderable_component.h
Normal file
@@ -0,0 +1,7 @@
|
||||
#pragma once
|
||||
|
||||
namespace testbed {
|
||||
|
||||
struct renderable_component {};
|
||||
|
||||
} // namespace testbed
|
||||
Reference in New Issue
Block a user