Peoplemon  0.1.0
Peoplemon 3 game source documentation
Control.hpp
Go to the documentation of this file.
1 #ifndef CORE_INPUT_CONTROL_HPP
2 #define CORE_INPUT_CONTROL_HPP
3 
4 #include <BLIB/Input.hpp>
5 #include <BLIB/Tilemap/Direction.hpp>
6 
14 namespace core
15 {
17 namespace input
18 {
20 namespace Control
21 {
28 enum EntityControl : unsigned int {
29  MoveUp = 0,
30  MoveRight = 1,
31  MoveDown = 2,
32  MoveLeft = 3,
33  Sprint = 4,
34  Interact = 5,
35  Pause = 6,
36  Back = 7,
38  None = Count
39 };
40 
41 } // namespace Control
42 
44 using EntityControl = std::underlying_type_t<Control::EntityControl>;
45 
51 void configureInputSystem(bl::input::InputSystem& system);
52 
59 EntityControl fromDirection(bl::tmap::Direction direction);
60 
61 } // namespace input
62 } // namespace core
63 
64 #endif
EntityControl
Contains the various inputs a player or AI can use to control the game or an NPC.
Definition: Control.hpp:28
Core classes and functionality for both the editor and game.
void configureInputSystem(bl::input::InputSystem &system)
Configures the input system for the set of peoplemon inputs.
Definition: Control.cpp:7
std::underlying_type_t< Control::EntityControl > EntityControl
Helper typedef to avoid too much casting boilerplate.
Definition: Control.hpp:44
EntityControl fromDirection(bl::tmap::Direction direction)
Helper method to convert a move direction to a control.
Definition: Control.cpp:36