1#ifndef PLAYER_H
2#define PLAYER_H
3
4//----------------------------------------------------------------------------------
5// Types and Structures Definition
6//----------------------------------------------------------------------------------
7typedef enum { NONE, WALK_RIGHT, WALK_LEFT, SCARE_RIGHT, SCARE_LEFT, SEARCH, FIND_KEY } PlayerSequence;
8
9typedef 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//----------------------------------------------------------------------------------
28Player player;
29
30#ifdef __cplusplus
31extern "C" { // Prevents name mangling of functions
32#endif
33
34//----------------------------------------------------------------------------------
35// Logo Screen Functions Declaration
36//----------------------------------------------------------------------------------
37void InitPlayer(void);
38void UpdatePlayer(void);
39void DrawPlayer(void);
40void UnloadPlayer(void);
41void ResetPlayer(void);
42
43void ScarePlayer(void);
44void SearchKeyPlayer(void);
45void FindKeyPlayer(void);
46
47#ifdef __cplusplus
48}
49#endif
50
51#endif // SCREENS_H