summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorAldrik Ramaekers <aldrikboy@gmail.com>2024-05-15 10:23:02 +0200
committerAldrik Ramaekers <aldrikboy@gmail.com>2024-05-15 10:23:02 +0200
commitc6763223b8b0c3f78edb6ac759c14f08375b438f (patch)
treed6f2619346fb33b72c8e09078664465ecf1c3720 /include
parent8cc0540b60f6af4cad99060e8cb0b5920b96e52b (diff)
join game menu
Diffstat (limited to 'include')
-rw-r--r--include/game.h2
-rw-r--r--include/menu.h2
-rw-r--r--include/protocol.h9
3 files changed, 12 insertions, 1 deletions
diff --git a/include/game.h b/include/game.h
index df9a686..88fd0e1 100644
--- a/include/game.h
+++ b/include/game.h
@@ -39,6 +39,6 @@ game global_state = {GAMESTATE_IDLE,DISCONNECTED,0,0};
void init_game();
void start_solo_game();
-void connect_to_game(char* ip, char* port);
+bool connect_to_game(char* ip, char* port);
#endif \ No newline at end of file
diff --git a/include/menu.h b/include/menu.h
index f2ccb76..fd74425 100644
--- a/include/menu.h
+++ b/include/menu.h
@@ -3,6 +3,8 @@
#include <projectbase/project_base.h>
+#define PROGRAM_VERSION "0.1.0 | "__DATE__
+
extern int current_res_index;
extern bool is_fullscreen;
vec2 available_resolutions[] = {
diff --git a/include/protocol.h b/include/protocol.h
index 9ca7226..d89952c 100644
--- a/include/protocol.h
+++ b/include/protocol.h
@@ -8,6 +8,8 @@
typedef enum t_network_message_type
{
+ MESSAGE_PING_UPSTREAM,
+ MESSAGE_PING_DOWNSTREAM,
MESSAGE_GET_ID_UPSTREAM,
MESSAGE_GET_ID_DOWNSTREAM,
MESSAGE_USER_LIST,
@@ -48,6 +50,12 @@ typedef struct t_protocol_get_id_downstream
u32 id;
} protocol_get_id_downstream;
+typedef struct t_protocol_ping_downstream
+{
+ network_message_type type;
+ char program_version[30];
+} protocol_ping_downstream;
+
typedef struct t_protocol_user_list
{
network_message_type type;
@@ -166,6 +174,7 @@ allocator server_incomming_allocator;
allocator client_incomming_allocator;
allocator outgoing_allocator;
+network_message create_protocol_ping_downstream();
network_message create_protocol_get_id_up(u32 id);
network_message create_protocol_get_id_down(u32 id);
network_message create_protocol_sound_list();