X-Git-Url: https://harrygodden.com/git/?a=blobdiff_plain;f=network_common.h;h=8840247888524357f76ebf330367b5c3a17b9a03;hb=fbc68c65e01838feb77f47b30994b45fcc39ebaf;hp=404c0007b307735d31a87a883e925f85875d4a07;hpb=825c3bce18272c0f81659e0eac469709d0462836;p=carveJwlIkooP6JGAAIwe30JlM.git diff --git a/network_common.h b/network_common.h index 404c000..8840247 100644 --- a/network_common.h +++ b/network_common.h @@ -5,10 +5,21 @@ #include "vg/vg_platform.h" #define NETWORK_USERNAME_MAX 32 +#define NETWORK_MAX_PLAYERS 20 +#define NETWORK_FRAMERATE 0.1 +#define NETWORK_BUFFERFRAMES 6 +#define NETWORK_MAX_CHAT 128 +#define NETWORK_REGION_MAX 32 +#define NETWORK_SKATERIFT_VERSION 8 +#define NETWORK_REQUEST_MAX 2048 -#define ADDON_DEFINE_ONLY - #include "addon.h" -#undef ADDON_DEFINE_ONLY +#define NETWORK_LEADERBOARD_ALLTIME 0 +#define NETWORK_LEADERBOARD_CURRENT_WEEK 1 +#define NETWORK_LEADERBOARD_ALLTIME_AND_CURRENT_WEEK 2 +#define NETWORK_PORT 27403 +#define NETWORK_PORT_STR(STR, X) STR #X + +#include "addon_types.h" static u32 network_msgstring( const char *src, u32 m_cbSize, u32 base_size, @@ -18,4 +29,14 @@ static u32 network_msgstring( const char *src, return vg_strncpy( src, buf, string_len, k_strncpy_always_add_null ); } +static u32 network_pair_index( u32 _a, u32 _b ){ + const u32 N = NETWORK_MAX_PLAYERS; + assert( (_a != _b) && (_a