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.

50 lines
1.3 KiB

  1. #ifndef PLAYER_H
  2. #define PLAYER_H
  3. //----------------------------------------------------------------------------------
  4. // Types and Structures Definition
  5. //----------------------------------------------------------------------------------
  6. typedef enum { NONE, WALK_RIGHT, WALK_LEFT, SCARE_RIGHT, SCARE_LEFT, SEARCH, FIND_KEY } PlayerSequence;
  7. typedef struct Player {
  8. Vector2 position;
  9. Rectangle bounds;
  10. Texture2D texture;
  11. Color color;
  12. // Animation variables
  13. Rectangle frameRec;
  14. int currentFrame;
  15. int currentSeq;
  16. bool key;
  17. int numLifes;
  18. bool dead;
  19. } Player;
  20. //----------------------------------------------------------------------------------
  21. // Global Variables Definition
  22. //----------------------------------------------------------------------------------
  23. Player player;
  24. #ifdef __cplusplus
  25. extern "C" { // Prevents name mangling of functions
  26. #endif
  27. //----------------------------------------------------------------------------------
  28. // Logo Screen Functions Declaration
  29. //----------------------------------------------------------------------------------
  30. void InitPlayer(void);
  31. void UpdatePlayer(void);
  32. void DrawPlayer(void);
  33. void UnloadPlayer(void);
  34. void ResetPlayer(void);
  35. void ScarePlayer(void);
  36. void SearchKeyPlayer(void);
  37. void FindKeyPlayer(void);
  38. #ifdef __cplusplus
  39. }
  40. #endif
  41. #endif // SCREENS_H