diff options
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); |
