Input.h 713 B

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. #ifndef INCLUDE_INPUT_H
  2. #define INCLUDE_INPUT_H
  3. namespace WalrusRPG
  4. {
  5. namespace Input
  6. {
  7. enum Key
  8. {
  9. K_A,
  10. K_B,
  11. K_L,
  12. K_R,
  13. K_UP,
  14. K_DOWN,
  15. K_LEFT,
  16. K_RIGHT,
  17. K_START,
  18. K_SELECT,
  19. K_SIZE
  20. };
  21. enum KeyState
  22. {
  23. KS_RELEASED,
  24. KS_JUST_RELEASED,
  25. KS_JUST_PRESSED,
  26. KS_PRESSED
  27. };
  28. void key_poll();
  29. KeyState key_get_state(Key key);
  30. bool key_pressed(Key key);
  31. bool key_released(Key key);
  32. bool key_down(Key key);
  33. bool key_up(Key key);
  34. }
  35. }
  36. #endif