diff options
| author | Aldrik Ramaekers <aldrik@amftech.nl> | 2022-12-11 16:14:54 +0100 |
|---|---|---|
| committer | Aldrik Ramaekers <aldrik@amftech.nl> | 2022-12-11 16:14:54 +0100 |
| commit | 24af775b5041cbed67dfc84f3a0d67850a4b6a1b (patch) | |
| tree | 8858ba5158aa7a4b78e12ecbd17b509afda3f9d7 /include/players.h | |
| parent | 4933a7c038087ae465e588fafb392a57d7f92b87 (diff) | |
pathfinding
Diffstat (limited to 'include/players.h')
| -rw-r--r-- | include/players.h | 25 |
1 files changed, 17 insertions, 8 deletions
diff --git a/include/players.h b/include/players.h index 7107797..cd7560f 100644 --- a/include/players.h +++ b/include/players.h @@ -8,15 +8,24 @@ #include "zombies.h" #include "math_helper.h" -float sec_since_last_shot = 10.0f; -float playerx = 3; -float playery = 3; -float gunx = 0.0f; -float guny = 0.0f; -float gun_height = 0.0f; +typedef struct t_player { + int id; + bool active; + float sec_since_last_shot; + float playerx; + float playery; + float gunx; + float guny; + float gun_height; +} player; -void shoot(platform_window* window); -void draw_player(platform_window* window); +int my_id = 1; + +int max_players = 10; +player players[10] = {0}; + +player get_player_by_id(int id); +void draw_players_at_tile(platform_window* window, int x, int y); void draw_bullets(platform_window* window); float get_player_size(platform_window* window); |
