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