aboutsummaryrefslogtreecommitdiff
path: root/player.h
blob: 1025eb889eb5b89eeb908a30eb216a9b9c7fa100 (plain) (blame)
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
#ifndef player_h
#define player_h

struct World;

typedef struct {
	int entity;
	int face;
	int ldx, ldy, sdx, sdy;
	int shoot_cooldown;
	int shoot_countdown;
	int hp;
	int invul, invul_counter;
} Player;

void init_player(Player* player, struct World* world);
void update_player(Player* player, struct World* world);
void player_take_damage(
	struct World* world,
	Player* player,
	int dmg
);
void update_camera(Player* player, struct World* world);

#endif