fix remote players ghosting
[carveJwlIkooP6JGAAIwe30JlM.git] / network_common.h
1 #ifndef NETWORK_COMMON_H
2 #define NETWORK_COMMON_H
3
4 #include "vg/vg_stdint.h"
5 #include "vg/vg_platform.h"
6
7 #define NETWORK_USERNAME_MAX 32
8 #define NETWORK_MAX_PLAYERS 20
9 #define NETWORK_FRAMERATE 0.1
10 #define NETWORK_BUFFERFRAMES 6
11 #define NETWORK_LEADERBOARD_MAX_SIZE 1024
12
13 #define NETWORK_LEADERBOARD_ALLTIME 0
14 #define NETWORK_LEADERBOARD_CURRENT_WEEK 1
15 #define NETWORK_LEADERBOARD_ALLTIME_AND_CURRENT_WEEK 2
16 #define NETWORK_PORT 27403
17 #define NETWORK_PORT_STR(STR, X) STR #X
18
19 #include "addon_types.h"
20
21 static u32 network_msgstring( const char *src,
22 u32 m_cbSize, u32 base_size,
23 char *buf, u32 buf_size ){
24
25 u32 string_len = VG_MIN( m_cbSize - base_size, buf_size );
26 return vg_strncpy( src, buf, string_len, k_strncpy_always_add_null );
27 }
28
29 #endif /* NETWORK_COMMON_H */