5 #define PLAYER_SYMBOL '@'
7 #define PLAYER_COLOR COLOR_WHITE
11 #define PLAYER_STARTING_ATTACK 5
13 #define PLAYER_STARTING_DEFENSE 2
16 #define PLAYER_VISION 10
18 #define PLAYER_VISION_WIDTH 1
21 #define PLAYER_EARING_RANGE_CLOSE 10
23 #define PLAYER_EARING_RANGE_FAR 40
25 #define PLAYER_EARING_PROB 30
void updatePotionEffects(Player *p)
Updates the potion effects of the player.
Definition: player.c:58
void drawPlayer(Player *p)
Draws the player on the screen.
Definition: player.c:43
void freePlayer(void *p)
frees the player. Sets all fields to 0 and frees the memory.
Definition: player.c:92
struct player Player
Structure of a player.
Player * initPlayer(int x, int y)
Initializes a new player. Allocates memory for a new player and initializes its fields.
Definition: player.c:14
Inventory structure represents the player inventory.
Definition: inventory.h:26
Structure of a player.
Definition: player.h:53
int vision
Definition: player.h:60
unsigned int y
Definition: player.h:55
int earing_range_close
Definition: player.h:62
unsigned int x
Definition: player.h:54
int potion_invincibility_turns
Definition: player.h:66
int sensory_potion_turns
Definition: player.h:65
int health
Definition: player.h:57
int defense
Definition: player.h:58
int max_health
Definition: player.h:67
int direction
Definition: player.h:68
int earing_range_far
Definition: player.h:63
int earing_prob
Definition: player.h:64
int attack
Definition: player.h:59
int vision_width
Definition: player.h:61
char symbol
Definition: player.h:56
int color
Definition: player.h:69
Inventory * inventory
Definition: player.h:70