2 * Copyright (C) 2021-2022 Mt.ZERO Software, Harry Godden - All Rights Reserved
3 * All trademarks are property of their respective owners
9 #include "vg/vg_stdint.h"
11 #include "network_msg.h"
12 #include "highscores.h"
14 static int network_scores_updated
= 0;
19 //#define SR_USE_LOCALHOST
21 /* Call it at start; Connects us to the gameserver */
22 static void network_init(void);
24 /* Run this from main loop */
25 static void network_update(void);
27 /* Call it at shutdown */
28 static void network_end(void);
31 * Can buffer up a bunch of these by calling many times, they will be
32 * sent at the next connection
34 static void network_submit_highscore( u32 trackid
, u16 points
, u16 time
);
37 * Game endpoints are provided with the same names to allow running without a
42 u8 app_symmetric_key
[ 1024 ];
44 EServerMode auth_mode
;
46 HSteamNetConnection remote
;
47 ESteamNetworkingConnectionState state
;
49 f64 last_attempt
, last_frame
;
54 static network_client
= {
55 .state
= k_ESteamNetworkingConnectionState_None
,
56 .auth_mode
= eServerModeAuthentication
,
59 static int packet_minsize( SteamNetworkingMessage_t
*msg
, u32 size
);
61 #endif /* NETWORK_H */