diff options
Diffstat (limited to 'include')
| -rw-r--r-- | include/asset_defs.h | 2 | ||||
| -rw-r--r-- | include/bullets.h | 2 | ||||
| -rw-r--r-- | include/objects.h | 8 | ||||
| -rw-r--r-- | include/players.h | 6 | ||||
| -rw-r--r-- | include/protocol.h | 3 |
5 files changed, 12 insertions, 9 deletions
diff --git a/include/asset_defs.h b/include/asset_defs.h index 9e50895..ee520ea 100644 --- a/include/asset_defs.h +++ b/include/asset_defs.h @@ -6,6 +6,8 @@ font* fnt_24; font* fnt_20; +image* img_icon_bullets; + void load_assets(); #endif
\ No newline at end of file diff --git a/include/bullets.h b/include/bullets.h index a42e6a4..be3f466 100644 --- a/include/bullets.h +++ b/include/bullets.h @@ -9,7 +9,7 @@ #include "guns.h" typedef struct t_bullet { - int player_id; + u32 player_id; bool active; vec3f position; float endx; diff --git a/include/objects.h b/include/objects.h index 04f434b..46d03ff 100644 --- a/include/objects.h +++ b/include/objects.h @@ -17,10 +17,10 @@ typedef struct t_object { } object; typedef struct t_box { - vec2f tl_b; - vec2f tr_b; - vec2f bl_b; - vec2f br_b; + vec2f tl_d; + vec2f tr_d; + vec2f bl_d; + vec2f br_d; vec2f tl_u; vec2f tr_u; diff --git a/include/players.h b/include/players.h index ab8da4c..ce88688 100644 --- a/include/players.h +++ b/include/players.h @@ -10,7 +10,7 @@ #include "guns.h" typedef struct t_player { - int id; + u32 id; bool active; float sec_since_last_shot; float playerx; @@ -29,7 +29,7 @@ typedef struct t_player { #include "protocol.h" -u32 my_id = -1; +u32 player_id = -1; camera _next_camera_pos; @@ -44,6 +44,6 @@ object check_if_player_collided_with_object(platform_window* window, player p); float get_player_size(platform_window* window); void move_user(platform_window* window, u32 id, protocol_move_type move); void update_players_server(); -void spawn_player(int id, network_client client); +void spawn_player(u32 id, network_client client); #endif
\ No newline at end of file diff --git a/include/protocol.h b/include/protocol.h index aec65b4..f02e873 100644 --- a/include/protocol.h +++ b/include/protocol.h @@ -30,6 +30,7 @@ typedef struct t_protocol_generic_message typedef struct t_protocol_get_id_upstream { network_message_type type; + u32 id; } protocol_get_id_upstream; typedef struct t_protocol_get_id_downstream @@ -91,7 +92,7 @@ typedef struct t_protocol_user_shoot #define MAX_NETWORK_BUFFER_SIZE 50000 u8 network_buffer[50000]; -network_message create_protocol_get_id_up(); +network_message create_protocol_get_id_up(u32 id); network_message create_protocol_get_id_down(u32 id); network_message create_protocol_user_list(); network_message create_protocol_user_moved(protocol_move_type move, u32 id); |
