blob: c3685c65c65e373ca61d78fe1403d784da3bdae9 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
|
/*
* PARSEC HEADER: config.h
*/
#ifndef _CONFIG_H_
#define _CONFIG_H_
//-----------------------------------------------------------------------------
// PROJECT GLOBAL FLAGS FOR CONDITIONAL COMPILATION -
//-----------------------------------------------------------------------------
#include "platform.h"
// determine if fractional depth buffer values should be used (depth_t) -------
//
#define FRACTIONAL_DEPTH_VALUES
// determine if screen space coordinates should be subpixel accurate ----------
//
#define SCREENVERTEX_SUBPIXEL_ACCURACY
// determine whether the refframe frequency can be changed from the console ---
//
#define VARIABLE_REFFRAME_FREQUENCY
// determine whether cheats are allowed ---------------------------------------
//
#define ENABLE_CHEAT_COMMANDS
// determine whether to enable the LOGOUT command -----------------------------
//
//#define ENABLE_LOGOUT_COMMAND
// determine whether to build the self running demo ---------------------------
//
//#define CLIENT_BUILD_SELF_RUNNING_DEMO
// determine whether to build the lan-only version ----------------------------
//
//#define CLIENT_BUILD_LAN_ONLY_VERSION
// define these at the project level for the corresponding builds -------------
//
//#define PARSEC_CLIENT // client build
//#define PARSEC_SERVER // gameserver build
//#define PARSEC_MASTER // masterserver build
// define current build number ------------------------------------------------
//
#define CLIENT_BUILD_NUMBER "0200 (ver. 0.2)"
#define SERVER_BUILD_NUMBER "0200"
#define MASTER_BUILD_NUMBER "0200"
// determine that this is an internal only ( testing ) version ----------------
//
#define INTERNAL_VERSION
// enable/disable dynamic function binding ------------------------------------
//
//#define NO_DBIND
#if !defined( NO_DBIND ) && !defined( PARSEC_SERVER )
#define DBIND_PROTOCOL
#endif // NO_DBIND
// define this to use the CURSES library for the server -----------------------
//
#define USE_CURSES
// miscellaneous conditions ---------------------------------------------------
//
//#define SHOW_COMPILER // used only in this file
// automatic host cpu selection if not already set ----------------------------
// TODO: fixme?
//
#if !( defined( SYSTEM_CPU_INTEL ) || defined( SYSTEM_CPU_POWERPC ) )
#define SYSTEM_CPU_INTEL
#endif
// define endianness constants according to host cpu --------------------------
//
#if defined( SYSTEM_CPU_INTEL )
#define SYSTEM_LITTLE_ENDIAN
#elif defined( SYSTEM_CPU_POWERPC )
#define SYSTEM_BIG_ENDIAN
#else
#error "endianness not defined!"
#endif
// legacy defines -------------------------------------------------------------
//
#ifdef SERVER_GAMESERVER
#error "replace SERVER_GAMESERVER with PARSEC_SERVER"
#endif // SERVER_GAMESERVER
#ifdef SERVER_MASTERSERVER
#error "replace SERVER_MASTERSERVER with PARSEC_MASTER"
#endif // SERVER_MASTERSERVER
// check for correct project level defines ------------------------------------
//
#if !( defined( PARSEC_CLIENT ) || defined( PARSEC_SERVER ) || defined( PARSEC_MASTER ) )
#error "missing project level define PARSEC_CLIENT, PARSEC_SERVER or PARSEC_MASTER"
#endif
// conditional code generation macros
//
#if defined ( PARSEC_CLIENT )
#define CLIENT_ONLY( x ) { x }
#define SERVER_ONLY( x ) { }
#define MASTER_ONLY( x ) { }
#elif defined ( PARSEC_SERVER )
#define CLIENT_ONLY( x ) { }
#define SERVER_ONLY( x ) { x }
#define MASTER_ONLY( x ) { }
#elif defined ( PARSEC_MASTER )
#define CLIENT_ONLY( x ) { }
#define SERVER_ONLY( x ) { }
#define MASTER_ONLY( x ) { x }
#endif
// compiler-specific definitions ----------------------------------------------
//
#ifdef SHOW_COMPILER
#if defined( SYSTEM_COMPILER_MSVC )
#pragma message( "Compiling with Visual C++" )
#elif defined( SYSTEM_COMPILER_CLANG )
#pragma message( "Compiling with Clang" )
#elif defined( SYSTEM_COMPILER_LLVM_GCC )
#pragma message( "Compiling with LLVM-GCC" )
#elif defined( SYSTEM_COMPILER_GCC )
#pragma message( "Compiling with GCC" )
#endif
#endif // SHOW_COMPILER
#ifdef SYSTEM_COMPILER_MSVC
#pragma warning ( disable : 4305 )
#define PATH_MAX _MAX_PATH
// #define vsnprintf _vsnprintf
#define snprintf _snprintf
#endif // SYSTEM_COMPILER_MSVC
#if defined(SYSTEM_COMPILER_GCC) || defined(SYSTEM_COMPILER_CLANG) || defined(SYSTEM_COMPILER_LLVM_GCC)
#ifndef PATH_MAX
#define PATH_MAX 255 // not always defined
#endif
#endif //defined(SYSTEM_COMPILER_GCC) || defined(SYSTEM_COMPILER_CLANG) || defined(SYSTEM_COMPILER_LLVM_GCC)
#endif // _CONFIG_H_
|