diff options
Diffstat (limited to 'HumanPlayer.h')
| -rw-r--r-- | HumanPlayer.h | 32 |
1 files changed, 29 insertions, 3 deletions
diff --git a/HumanPlayer.h b/HumanPlayer.h index 8a6e598..262dde8 100644 --- a/HumanPlayer.h +++ b/HumanPlayer.h @@ -7,6 +7,8 @@ #include "Player.h" #include "Camera.h" +#include "Cursor.h" +#include <string.h> /* ************************************** * Defines * @@ -27,13 +29,37 @@ class HumanPlayer : public Player void handler(void); private: - const Camera& _cam; - void buttonHandler(void); + enum tPlayerState + { + PLAYER_STATE_IDLE, /**< Player has not entered any menu or unit. */ + PLAYER_STATE_UNIT_MENU, /**< Player has opened Unit menu. */ + PLAYER_STATE_UNIT_SELECTED /**< Player has selected one or more units. */ + } _eState; /**< Player action state. */ + void drawHandler(void); - /* Event handlers. */ + /* Button handlers. */ + void buttonHandler(void); + void playerButtonPressedHandler(const size_t szBtn); + void cameraButtonPressedHandler(const size_t szBtn); + void playerButtonReleasedHandler(const size_t szBtn); + + /* Pressed button event handlers. */ void onABtnPressed(void); void onBBtnPressed(void); + + /* Released button event handlers. */ + void onABtnReleased(void); + + /* Unit selection. */ + enum tPlayerState selectUnit(void); + + /* Private objects. */ + const Camera& _cam; + Cursor _cursor; + + /* Private variables. */ + uint8_t _ABtnFrames; }; #endif /* HUMAN_PLAYER_H__ */ |
