설명 없음

gba_keys.h 598B

12345678910111213141516171819202122232425262728
  1. //
  2. // Test input from buttons
  3. //
  4. #ifndef GBA_KEYS_H
  5. #define GBA_KEYS_H
  6. #include "gba_types.h"
  7. #define KEY_A 0x01
  8. #define KEY_B 0x02
  9. #define KEY_SELECT 0x04
  10. #define KEY_START 0x08
  11. #define KEY_RIGHT 0x10
  12. #define KEY_LEFT 0x20
  13. #define KEY_UP 0x40
  14. #define KEY_DOWN 0x80
  15. #define KEY_R 0x01
  16. #define KEY_L 0x02
  17. #define keyPressed(k) (KEYS & k)
  18. #define keyHeldDown(k) (KEYSHOLD & k)
  19. #define keyScrolling(k) (KEYSSCROLL & k)
  20. #define keyPressedLR(k) (KEYSLR & k)
  21. #define keyHeldDownLR(k) (KEYSHOLDLR & k)
  22. #define keyScrollingLR(k) (KEYSSCROLLLR & k)
  23. #endif