From 24af775b5041cbed67dfc84f3a0d67850a4b6a1b Mon Sep 17 00:00:00 2001 From: Aldrik Ramaekers Date: Sun, 11 Dec 2022 16:14:54 +0100 Subject: pathfinding --- include/players.h | 25 +++++++++++++++++-------- 1 file changed, 17 insertions(+), 8 deletions(-) (limited to 'include/players.h') 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); -- cgit v1.2.3-70-g09d2