lol its in c
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

31 lines
495 B

2 years ago
  1. #ifndef IS_PLAYER_H_
  2. #define IS_PLAYER_H_
  3. #include <stdint.h>
  4. #define PLAYER_INV_SIZE 32
  5. typedef enum {
  6. PLAYER_STATE_STAND,
  7. PLAYER_STATE_WALK,
  8. PLAYER_STATE_JUMP,
  9. } player_state_t;
  10. typedef struct {
  11. uint8_t x;
  12. uint8_t y_lo;
  13. uint8_t y_hi;
  14. uint16_t vy;
  15. uint8_t dir;
  16. uint8_t state;
  17. // TODO: Define inventory if there's time
  18. } player_t;
  19. extern player_t PLAYER;
  20. extern const uint8_t player_map[];
  21. void player_init(void);
  22. void player_update(void);
  23. #endif