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