From cfbed87fa88856a50ff6afd3d53f7dd60036d049 Mon Sep 17 00:00:00 2001 From: dhewg Date: Sun, 18 Dec 2011 18:41:01 +0100 Subject: [PATCH] Move constants from AsyncNetwork.h Make those defines in BuildDefines.h instead to reduce header dependencies. --- neo/framework/BuildDefines.h | 32 ++++++++++++++++++++++++++++++ neo/framework/async/AsyncNetwork.h | 32 ------------------------------ 2 files changed, 32 insertions(+), 32 deletions(-) diff --git a/neo/framework/BuildDefines.h b/neo/framework/BuildDefines.h index b0f92241..72d7cf26 100644 --- a/neo/framework/BuildDefines.h +++ b/neo/framework/BuildDefines.h @@ -115,3 +115,35 @@ If you have questions concerning this license or the applicable additional terms #ifndef ID_OPENAL_EAX # define ID_OPENAL_EAX 0 #endif + +// async network + +/* +DOOM III gold: 33 +1.1 beta patch: 34 +1.1 patch: 35 +1.2 XP: 36-39 +1.3 patch: 40 +1.3.1: 41 +*/ +#define ASYNC_PROTOCOL_MINOR (41) +#define ASYNC_PROTOCOL_VERSION (( ASYNC_PROTOCOL_MAJOR << 16 ) + ASYNC_PROTOCOL_MINOR) + +#define MAX_ASYNC_CLIENTS (32) + +#define MAX_USERCMD_BACKUP (256) +#define MAX_USERCMD_DUPLICATION (25) +#define MAX_USERCMD_RELAY (10) + +// index 0 is hardcoded to be the idnet master +// which leaves 4 to user customization +#define MAX_MASTER_SERVERS (5) + +#define MAX_NICKLEN (32) + +// max number of servers that will be scanned for at a single IP address +#define MAX_SERVER_PORTS (8) + +// special game init ids +#define GAME_INIT_ID_INVALID (-1) +#define GAME_INIT_ID_MAP_LOAD (-2) diff --git a/neo/framework/async/AsyncNetwork.h b/neo/framework/async/AsyncNetwork.h index 7d25c742..c98ca8d4 100644 --- a/neo/framework/async/AsyncNetwork.h +++ b/neo/framework/async/AsyncNetwork.h @@ -29,38 +29,6 @@ If you have questions concerning this license or the applicable additional terms #ifndef __ASYNCNETWORK_H__ #define __ASYNCNETWORK_H__ -/* -DOOM III gold: 33 -1.1 beta patch: 34 -1.1 patch: 35 -1.2 XP: 36-39 -1.3 patch: 40 -1.3.1: 41 -*/ -const int ASYNC_PROTOCOL_MINOR = 41; -const int ASYNC_PROTOCOL_VERSION = ( ASYNC_PROTOCOL_MAJOR << 16 ) + ASYNC_PROTOCOL_MINOR; -#define MAJOR_VERSION(v) ( v >> 16 ) - -const int MAX_ASYNC_CLIENTS = 32; - -const int MAX_USERCMD_BACKUP = 256; -const int MAX_USERCMD_DUPLICATION = 25; -const int MAX_USERCMD_RELAY = 10; - -// index 0 is hardcoded to be the idnet master -// which leaves 4 to user customization -const int MAX_MASTER_SERVERS = 5; - -const int MAX_NICKLEN = 32; - -// max number of servers that will be scanned for at a single IP address -const int MAX_SERVER_PORTS = 8; - -// special game init ids -const int GAME_INIT_ID_INVALID = -1; -const int GAME_INIT_ID_MAP_LOAD = -2; - - #include "MsgChannel.h" #include "AsyncServer.h" #include "ServerScan.h"