1 // Emacs style mode select   -*- C++ -*-
2 //-----------------------------------------------------------------------------
3 //
4 // $Id: doomdef.h 1566 2020-12-19 06:22:58Z wesleyjohnson $
5 //
6 // Copyright (C) 1993-1996 by id Software, Inc.
7 // Copyright (C) 1998-2013 by DooM Legacy Team.
8 //
9 // This program is free software; you can redistribute it and/or
10 // modify it under the terms of the GNU General Public License
11 // as published by the Free Software Foundation; either version 2
12 // of the License, or (at your option) any later version.
13 //
14 // This program is distributed in the hope that it will be useful,
15 // but WITHOUT ANY WARRANTY; without even the implied warranty of
16 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
17 // GNU General Public License for more details.
18 //
19 //
20 // DESCRIPTION:
21 //      Defines to control options in the code, tune, and select debugging.
22 //
23 //-----------------------------------------------------------------------------
24 
25 #ifndef DOOMDEF_H
26 #define DOOMDEF_H
27 
28 // =========================================================================
29 // Compile settings, configuration, tuning, and options
30 
31 #ifdef DEBUG_WINDOWED
32 // Uncheck this to compile debugging code
33 #define RANGECHECK
34 #define RANGECHECK_DRAW_LIMITS
35 // Do some extra tests, that never happens but maybe.
36 #define PARANOIA
37 // Write message in log.txt (win32 and Linux only for the moment)
38 #define LOGMESSAGES
39 // Show debug messages.
40 #define DEBUG_MESSAGES_ON
41 #else
42 // Normal compile
43 // Uncheck this to compile debugging code
44 //#define RANGECHECK
45 // Do some extra tests, that never happens but maybe.
46 //#define PARANOIA
47 // write message in log.txt (win32 and Linux only for the moment)
48 //#define LOGMESSAGES
49 // Default to show debug messages.
50 //#define DEBUG_MESSAGES_ON
51 #endif
52 
53 #define LOGLINELEN  80
54 
55 
56 // [WDJ] Machine speed limitations.
57 // Leave undefined for netplay, or make sure all machines have same setting.
58 //#define MACHINE_MHZ  1500
59 
60 // some tests, enable or disable it
61 //#define HORIZONTALDRAW        // abandoned : too slow
62 //#define TILTVIEW              // not finished
63 //#define PERSPCORRECT          // not finished
64 #define SPLITSCREEN
65 //#define CLIENTPREDICTION2     // differant methode
66 #define NEWLIGHT                // compute lighting with bsp (in construction)
67 #define FRAGGLESCRIPT           // SoM: Activate FraggleScript
68 
69 // For Boom demo compatibility, spawns friction thinkers
70 #define FRICTIONTHINKER
71 
72 // [WDJ] Voodoo doll 4/30/2009
73 // A voodoo doll is an accident of having multiple start points for a player.
74 // It has been used in levels as a token to trip linedefs and create
75 // sequenced actions, and thus are required to play some wads, like FreeDoom.
76 // Voodoo doll code is selectable, now a standard feature, 12/15/2015.
77 
78 // [WDJ] Gives a menu item that allows adjusting the time a door waits open.
79 // A few of the timed doors in doom2 are near impossible to get thru in time,
80 // and I have to use cheats to get past that part of the game.
81 // This is for us old people don't have super-twitch fingers anymore, or don't
82 // want to repeat from save game 20 times to get past these bad spots.
83 #define DOORDELAY_CONTROL
84   // See p_fab.c, giving it NETVAR status causes saved games to crash program.
85 
86 // [WDJ] 6/22/2009  Generate gamma table using two settings,
87 // and a selected function.
88 // Gamma funcs are selectable, now a standard feature, 12/15/2015.
89 
90 // [WDJ] 3/25/2010  Savegame slots 0..99
91 #define SAVEGAME99
92 #define SAVEGAMEDIR
93 
94 // [WDJ] 8/26/2011  recover DEH string memory
95 // Otherwise will just abandon replaced DEH/BEX strings.
96 // Enable if you are short on memory, or just like clean execution.
97 // Disable if it gives you trouble.
98 #define DEH_RECOVER_STRINGS
99 
100 #if defined PCDOS && ! defined DEH_RECOVER_STRINGS
101 #define DEH_RECOVER_STRINGS
102 #endif
103 
104 // [WDJ] 9/5/2011
105 // Enable to allow BEX to change SAVEGAMENAME
106 // This is a security risk, trojan wads could use it to corrupt arbitrary files.
107 //#define BEX_SAVEGAMENAME
108 
109 // [WDJ] 9/2/2011  French language controls
110 // Put french strings inline (from d_french.h)
111 // #define FRENCH_INLINE
112 
113 #ifdef FRENCH
114 #define FRENCH_INLINE
115 #endif
116 
117 // [WDJ] 9/2/2011  BEX language controls
118 // Load language BEX file
119 //#define BEX_LANGUAGE
120 // Automatic loading of lang.bex file.
121 //#define BEX_LANG_AUTO_LOAD
122 
123 
124 // [WDJ] 2/6/2012 Drawing enables
125 // To save code size, can turn off some drawing bpp that you cannot use.
126 #define ENABLE_DRAW15
127 #define ENABLE_DRAW16
128 #ifndef SMIF_PC_DOS
129 # define ENABLE_DRAW24
130 # define ENABLE_DRAW32
131 #endif
132 
133 #define ENABLE_DRAW_ALPHA
134 
135 // Used for palette draw fade operations
136 #define ENABLE_DRAW8_USING_12
137 
138 // [WDJ] 6/5/2012 Boom global colormap
139 // Boom global colormap is selectable, now a standard feature, 12/15/2015.
140 
141 
142 // If IPX network code is to be included
143 // This may be overridden for some ports.
144 #undef USE_IPX
145 
146 // Set the initial window size (width).
147 // Expected sizes are 320x200, 640x480, 800x600, 1024x768.
148 #define INITIAL_WINDOW_WIDTH   800
149 #define INITIAL_WINDOW_HEIGHT  600
150 
151 // [WDJ] Built-in Launcher
152 #define LAUNCHER
153 // especially for Window 7,8
154 #if defined( WIN32 ) && !defined( LAUNCHER )
155 #define LAUNCHER
156 #endif
157 
158 // [WDJ] Multiple config file, main and drawmode, with cvar tracking.
159 // This enables editing them in the menus.
160 #define CONFIG_MENU_PAGE
161 
162 // [WDJ] 7/6/2017  MBF DOGS
163 #define DOGS
164 
165 // [WDJ] 8/31/2017  16 rotation sprites option
166 #define ROT16
167 
168 // If surround sound is desired
169 #define SURROUND_SOUND
170 
171 // Coronas in dynlights
172 #define DYLT_CORONAS
173 // Coronas drawn with sprite draw
174 #define SPDR_CORONAS
175 
176 #if ( defined(DYLT_CORONAS) && defined(SPDR_CORONAS) )
177 #define CORONA_CHOICE
178 #endif
179 
180 // XBOX controller
181 #define XBOX_CONTROLLER
182 
183 // Second mouse
184 #define MOUSE2
185 
186 // Allow players to wait for game start.
187 #define WAIT_GAME_START_INTERMISSION
188 
189 #ifdef LINUX
190 // For now Linux only because it requires libzip.
191 #ifdef HAVE_LIBZIP
192 // Read zip wads.
193 // This requires  HAVE_LIBZIP  be set in make_options to get linking.
194 #define ZIPWAD
195 #ifdef HAVE_DLOPEN
196 // Test for optional ziplib.  Requires lib dlopen.
197 // This requires  HAVE_DLOPEN  be set in make_options to get linking.
198 #define ZIPWAD_OPTIONAL
199 #endif
200 #endif
201 #endif
202 
203 // DeePsea tall patches.
204 // Allows patches that exceed 254 height.
205 // Not used by many wads, but not much extra code either.  Relatively safe.
206 #define DEEPSEA_TALL_PATCH
207 
208 
209 // Player morph canceling invisibility and MF_SHADOW, is inconsistent.
210 // The Heretic vanilla behavior cancels SHADOW when turned into a chicken.
211 // #define PLAYER_CHICKEN_KEEPS_SHADOW
212 
213 // Special handling for devparm is somewhat dated.
214 // Most users do not ever use it.
215 // #define DEVPARM_LOADING
216 
217 // File reload at level start when filename starts with "~"
218 // A fragile development hack that has been mostly disabled for years.
219 // ** Broken.
220 // #define WADFILE_RELOAD
221 
222 // Loading disk icon.
223 // Disk accesses are too fast for this to be useful anymore.
224 // ** Broken
225 // #define LOADING_DISK_ICON
226 
227 
228 
229 // =========================================================================
230 
231 // File where all game vars and settings are saved
232 #define CONFIGFILENAME  "config.cfg"
233 #define DRAWMODE_CONFIGFILENAME  "config%s.cfg"
234 
235 // Name of local directory for config files and savegames
236 #ifdef LINUX
237 #define DEFAULTDIR1 ".doomlegacy"
238 #define DEFAULTDIR2 ".legacy"
239 #endif
240 #ifdef __APPLE__
241 #define DEFAULTDIR1 ".doomlegacy"
242 #define DEFAULTDIR2 ".legacy"
243 #endif
244 #ifdef SMIF_PC_DOS
245 #define DEFAULTDIR1 "dmlegacy"
246 #define DEFAULTDIR2 "legacy"
247 #endif
248 #ifndef DEFAULTDIR1
249 #define DEFAULTDIR1 "doomlegacy"
250 #endif
251 #ifndef DEFAULTDIR2
252 #define DEFAULTDIR2 "legacy"
253 #endif
254 
255 #if defined SMIF_PC_DOS || defined WIN32 || defined OS2
256 // HOME is ~
257 // Allowed DEFWADS01..DEFWADS21
258 #if 1
259 #define DEFWADS01  "~\\games\\doom"
260 #define DEFWADS02  "~\\games\\doomwads"
261 #define DEFWADS03  "~\\games\\doomlegacy\\wads"
262 #else
263 #define DEFWADS01  "games\\doom"
264 #define DEFWADS02  "games\\doomwads"
265 #define DEFWADS03  "games\\doomlegacy\\wads"
266 #endif
267 #define DEFWADS04  "\\doomwads"
268 #define DEFWADS05  "\\games\\doomwads"
269 #define DEFWADS06  "\\games\\doom"
270 //#define DEFWADS07  "\\games\\doom"
271 //#define DEFWADS08  "\\games\\doom"
272 #if defined WIN32 || defined OS2
273 #define DEFWADS10  "\\Program Files\\doomlegacy\\wads"
274 #endif
275 
276 // When cannot find user $(HOME), make a home in the executable dir.
277 #ifdef SMIF_PC_DOS
278 #define DEFHOME    "DL_HOME"
279 #else
280 #define DEFHOME    "legacyhome"
281 #endif
282 //#define LEGACYWADDIR  ""
283 
284 #else
285 // Linux, unix, FreeBSD, Mac
286 // HOME is ~
287 // Allowed DEFWADS01..DEFWADS21
288 #define DEFWADS01  "~/games/doomlegacy/wads"
289 #define DEFWADS02  "~/games/doomwads"
290 #define DEFWADS03  "~/games/doom"
291 #define DEFWADS04  "/usr/local/share/doom"
292 #define DEFWADS05  "/usr/local/share/games/doomwads"
293 #define DEFWADS06  "/usr/local/share/games/doom"
294 #define DEFWADS07  "/usr/local/games/doomlegacy/wads"
295 #define DEFWADS08  "/usr/local/games/doomwads"
296 #define DEFWADS09  "/usr/share/games/doom"
297 #define DEFWADS10  "/usr/share/games/doomlegacy/wads"
298 #define DEFWADS11  "/usr/share/games/doomwads"
299 #define DEFWADS12  "/usr/games/doomlegacy/wads"
300 #define DEFWADS13  "/usr/games/doomwads"
301 
302 #define DEFWADS16  "~/games/doomlegacy"
303 #define DEFWADS17  "/usr/local/share/games/doomlegacy"
304 #define DEFWADS18  "/usr/local/games/doomlegacy"
305 #define DEFWADS19  "/usr/share/games/doomlegacy"
306 #define DEFWADS20  "/usr/games/doomlegacy"
307 
308 // Linux, When cannot find user $(HOME), make a home in the executable dir.
309 #define DEFHOME    "legacyhome"
310 
311 #if defined(__APPLE__) && defined(__MACH__)
312 // Use defined Mac resources (app folder)
313 //#define EXT_MAC_DIR_SPEC
314 
315 // Legacy wad for Mac
316 //#define  LEGACYWADDIR  ".app"
317 #define  LEGACYWADDIR  "/usr/local/share/games/doomlegacy"
318 
319 #else
320 // Linux, FreeBSD
321 #define  LEGACYWADDIR  "/usr/local/share/games/doomlegacy"
322 
323 #endif
324 
325 #endif
326 
327 // How many subdirectories deep to search.
328 #define  GAME_SEARCH_DEPTH   4
329 #define  IWAD_SEARCH_DEPTH   5
330 
331 // =========================================================================
332 
333 // The maximum number of players, multiplayer/networking.
334 // NOTE: it needs more than this to increase the number of players...
335 
336 // Limit MAXPLAYERS (and others) to 250.
337 // TODO: ... more!!!
338 #define MAXPLAYERS              32
339 #define MAXSKINS                128
340 #define PLAYERSMASK             (MAXPLAYERS-1)
341 #define MAXPLAYERNAME           21
342 // Limit MAXTEAMS to 250.
343 #define MAXTEAMS		32
344 
345 // Determined by skin color tables
346 #define NUMSKINCOLORS           11
347 
348 #define SAVESTRINGSIZE          24
349 
350 // Used for many file path buffer sizes
351 #ifdef SMIF_PC_DOS
352 #define MAX_WADPATH   128
353 #else
354 // was too short for network systems
355 #define MAX_WADPATH   256
356 #endif
357 
358 // =========================================================================
359 
360 // State updates, number of tics / second.
361 // NOTE: used to setup the timer rate, see I_StartupTimer().
362 #define OLDTICRATE       35
363 // Set 1 for standard, try 4 for 140 fps :)
364 #define NEWTICRATERATIO   1
365 #define TICRATE         (OLDTICRATE*NEWTICRATERATIO)
366 
367 
368 #endif  // DOOMDEF_H
369