1 /* File: z-config.h */
2 
3 /* Purpose: Angband specific configuration stuff */
4 
5 /*
6  * Copyright (c) 1997 Ben Harrison, James E. Wilson, Robert A. Koeneke
7  *
8  * This software may be copied and distributed for educational, research,
9  * and not for profit purposes provided that this copyright and statement
10  * are included in all such copies.  Other copyrights may also apply.
11  */
12 
13 /* Allow debug commands */
14 #define USE_DEBUG
15 
16 /* Allow various special stuff (sound, graphics, etc.) */
17 #define USE_SPECIAL
18 
19 
20 /*
21  * Look through the following lines, and where a comment includes the
22  * tag "OPTION:", examine the associated "#define" statements, and decide
23  * whether you wish to keep, comment, or uncomment them.  You should not
24  * have to modify any lines not indicated by "OPTION".
25  *
26  * Note: Also examine the "system" configuration file "h-config.h".
27  *
28  * And finally, remember that the "Makefile" will specify some rather
29  * important compile time options, like what visual module to use.
30  */
31 
32 
33 /*
34  * OPTION: See the Makefile(s), where several options may be declared.
35  *
36  * Some popular options include "USE_GCU" (allow use with Unix "curses"),
37  * "USE_X11" (allow basic use with Unix X11), "USE_XAW" (allow use with
38  * Unix X11 plus the Athena Widget set), and "USE_CAP" (allow use with
39  * the "termcap" library, or with hard-coded vt100 terminals).
40  *
41  * The old "USE_NCU" option has been replaced with "USE_GCU".
42  *
43  * Several other such options are available for non-unix machines,
44  * such as "MACINTOSH", "WINDOWS", "USE_IBM", "USE_EMX".
45  *
46  * You may also need to specify the "system", using defines such as
47  * "SOLARIS" (for Solaris), etc, see "h-config.h" for more info.
48  */
49 
50 
51 /*
52  * OPTION: Use the POSIX "termios" methods in "main-gcu.c"
53  */
54 /* #define USE_TPOSIX */
55 
56 /*
57  * OPTION: Use the "termio" methods in "main-gcu.c"
58  */
59 /* #define USE_TERMIO */
60 
61 /*
62  * OPTION: Use the icky BSD "tchars" methods in "main-gcu.c"
63  */
64 /* #define USE_TCHARS */
65 
66 
67 /*
68  * OPTION: Use "blocking getch() calls" in "main-gcu.c".
69  * Hack -- Note that this option will NOT work on many BSD machines
70  * Currently used whenever available, if you get a warning about
71  * "nodelay()" undefined, then make sure to undefine this.
72  */
73 #if defined(SYS_V) || defined(AMIGA)
74 # define USE_GETCH
75 #endif
76 
77 
78 /*
79  * OPTION: Use the "curs_set()" call in "main-gcu.c".
80  * Hack -- This option will not work on most BSD machines
81  */
82 #ifdef SYS_V
83 # define USE_CURS_SET
84 #endif
85 
86 
87 /*
88  * OPTION: Include "ncurses.h" instead of "curses.h" in "main-gcu.c"
89  */
90 /* #define USE_NCURSES */
91 
92 
93 /*
94  * OPTION: for multi-user machines running the game setuid to some other
95  * user (like 'games') this SAFE_SETUID option allows the program to drop
96  * its privileges when saving files that allow for user specified pathnames.
97  * This lets the game be installed system wide without major security
98  * concerns.  There should not be any side effects on any machines.
99  *
100  * This will handle "gids" correctly once the permissions are set right.
101  */
102 #define SAFE_SETUID
103 
104 
105 /*
106  * This flag enables the "POSIX" methods for "SAFE_SETUID".
107  */
108 #ifdef _POSIX_SAVED_IDS
109 # define SAFE_SETUID_POSIX
110 #endif
111 
112 
113 /*
114  * Prevent problems on (non-Solaris) Suns using "SAFE_SETUID".
115  * The SAFE_SETUID code is weird, use it at your own risk...
116  */
117 #if defined(SUNOS) && !defined(SOLARIS)
118 # undef SAFE_SETUID_POSIX
119 #endif
120 
121 
122 /* Debug mode options */
123 #ifdef USE_DEBUG
124 
125 /*
126  * OPTION: Hack -- Compile in support for "Wizard Commands"
127  */
128 #define ALLOW_WIZARD
129 
130 /*
131  * OPTION: Hack -- Compile in support for "Spoiler Generation"
132  */
133 #define ALLOW_SPOILERS
134 
135 #endif /* USE_DEBUG */
136 
137 /*
138  * OPTION: Hack -- Compile in support for "Borg mode"
139  */
140 #define ALLOW_BORG
141 
142 /*
143  * OPTION: Allow "do_cmd_colors" at run-time
144  */
145 #define ALLOW_COLORS
146 
147 /*
148  * OPTION: Allow "do_cmd_visuals" at run-time
149  */
150 #define ALLOW_VISUALS
151 
152 /*
153  * OPTION: Allow "do_cmd_macros" at run-time
154  */
155 #define ALLOW_MACROS
156 
157 /*
158  * OPTION: Allow characteres to be "auto-rolled"
159  */
160 #define ALLOW_AUTOROLLER
161 
162 
163 /*
164  * OPTION: Allow parsing of the ascii template files in "init.c".
165  * This must be defined if you do not have valid binary image files.
166  * It should be usually be defined anyway to allow easy "updating".
167  */
168 #define ALLOW_TEMPLATES
169 
170 /*
171  * OPTION: Delay the loading of the "f_text" array until it is actually
172  * needed, saving ~1K, since "feature" descriptions are unused.
173  */
174 #define DELAY_LOAD_F_TEXT
175 
176 /*
177  * OPTION: Delay the loading of the "k_text" array until it is actually
178  * needed, saving ~1K, since "object" descriptions are unused.
179  */
180 #define DELAY_LOAD_K_TEXT
181 
182 /*
183  * OPTION: Delay the loading of the "a_text" array until it is actually
184  * needed, saving ~1K, since "artifact" descriptions are unused.
185  */
186 #define DELAY_LOAD_A_TEXT
187 
188 /*
189  * OPTION: Delay the loading of the "e_text" array until it is actually
190  * needed, saving ~1K, since "ego-item" descriptions are unused.
191  */
192 #define DELAY_LOAD_E_TEXT
193 
194 /*
195  * OPTION: Delay the loading of the "r_text" array until it is actually
196  * needed, saving ~60K, but "simplifying" the "monster" descriptions.
197  */
198 /* #define DELAY_LOAD_R_TEXT */
199 
200 /*
201  * OPTION: Delay the loading of the "v_text" array until it is actually
202  * needed, saving ~1K, but "destroying" the "vault" generation.
203  */
204 /* #define DELAY_LOAD_V_TEXT */
205 
206 
207 /*
208  * OPTION: Handle signals
209  */
210 #define HANDLE_SIGNALS
211 
212 
213 /*
214  * OPTION: Allow "Wizards" to yield "high scores"
215  */
216 /* #define SCORE_WIZARDS */
217 
218 /*
219  * OPTION: Allow "Borgs" to yield "high scores"
220  */
221 /* #define SCORE_BORGS */
222 
223 /*
224  * OPTION: Allow "Cheaters" to yield "high scores"
225  */
226 /* #define SCORE_CHEATERS */
227 
228 
229 /*
230  * OPTION: Gamma correct colours (with X11 / windows)
231  */
232 #define SUPPORT_GAMMA
233 
234 
235 /*
236  * OPTION: Check the modification time of *_info.raw files
237  */
238 #define CHECK_MODIFICATION_TIME
239 
240 
241 #ifdef USE_SPECIAL
242 
243 /*
244  * OPTION: Allow the use of "sound" in various places.
245  */
246 #define USE_SOUND
247 
248 /*
249  * OPTION: Allow the use of "graphics" in various places
250  */
251 #define USE_GRAPHICS
252 
253 /*
254  * OPTION: Allow the use of "music" in various places
255  */
256 /* #define USE_MUSIC */
257 
258 #endif /* USE_SPECIAL */
259 
260 /*
261  * Hack -- Macintosh stuff
262  */
263 #ifdef MACINTOSH
264 
265 /* Do not handle signals */
266 # undef HANDLE_SIGNALS
267 
268 #endif
269 
270 
271 /*
272  * Hack -- Windows stuff
273  */
274 #ifdef WINDOWS
275 
276 /* Do not handle signals */
277 # undef HANDLE_SIGNALS
278 
279 #endif
280 
281 
282 /*
283  * Hack -- EMX stuff
284  */
285 #ifdef USE_EMX
286 
287 /* Do not handle signals */
288 # undef HANDLE_SIGNALS
289 
290 #endif
291 
292 
293 /*
294  * OPTION: Set the "default" path to the angband "lib" directory.
295  *
296  * See "main.c" for usage, and note that this value is only used on
297  * certain machines, primarily Unix machines.
298  *
299  * The configure script overrides this value.  Check the "--prefix=<dir>"
300  * option of the configure script.
301  *
302  * This value will be over-ridden by the "ANGBAND_PATH" environment
303  * variable, if that variable is defined and accessable.  The final
304  * "slash" is required if the value supplied is in fact a directory.
305  *
306  * Using the value "./lib/" below tells Angband that, by default,
307  * the user will run "angband" from the same directory that contains
308  * the "lib" directory.  This is a reasonable (but imperfect) default.
309  *
310  * If at all possible, you should change this value to refer to the
311  * actual location of the "lib" folder, for example, "/tmp/angband/lib/"
312  * or "/usr/games/lib/angband/", or "/pkg/angband/lib".
313  */
314 #ifndef DEFAULT_PATH
315 # define DEFAULT_PATH "./lib/"
316 #endif /* DEFAULT_PATH */
317 
318 
319 
320 /*
321  * OPTION: For some brain-dead computers with no command line interface,
322  * namely Macintosh, there has to be some way of "naming" your savefiles.
323  * The current "Macintosh" hack is to make it so whenever the character
324  * name changes, the savefile is renamed accordingly.  But on normal
325  * machines, once you manage to "load" a savefile, it stays that way.
326  * Macintosh is particularly weird because you can load savefiles that
327  * are not contained in the "lib:save:" folder, and if you change the
328  * player's name, it will then save the savefile elsewhere.
329  */
330 #if defined(MACINTOSH) || defined(WINDOWS) || defined(AMIGA)
331 # define SAVEFILE_MUTABLE
332 #endif
333 
334 
335 /*
336  * OPTION: Prevent usage of the "ANGBAND_PATH" environment variable and
337  * the '-d<what>=<path>' command line option (except for '-du=<path>').
338  *
339  * This prevents cheating in multi-user installs as well as possible
340  * security problems when running setgid.
341  */
342 #ifdef SET_UID
343 #define FIXED_PATHS
344 #endif /* SET_UID */
345 
346 
347 /*
348  * OPTION: Capitalize the "user_name" (for "default" player name)
349  * This option is only relevant on SET_UID machines.
350  */
351 #define CAPITALIZE_USER_NAME
352 
353 /*
354  * OPTION: Person to bother if something goes wrong.
355  */
356 #define MAINTAINER	"sfuerst@zangband.org"
357 
358 
359 /*
360  * OPTION: Default font (when using X11).
361  */
362 #define DEFAULT_X11_FONT		"fixed"
363 
364 /*
365  * OPTION: Default fonts (when using X11)
366  */
367 #define DEFAULT_X11_FONT_0		"10x20"
368 #define DEFAULT_X11_FONT_1		"9x15"
369 #define DEFAULT_X11_FONT_2		"9x15"
370 #define DEFAULT_X11_FONT_3		"5x8"
371 #define DEFAULT_X11_FONT_4		"5x8"
372 #define DEFAULT_X11_FONT_5		"5x8"
373 #define DEFAULT_X11_FONT_6		"5x8"
374 #define DEFAULT_X11_FONT_7		"5x8"
375 
376 /*
377  * OPTION: Attempt to prevent all "cheating"
378  */
379 /* #define VERIFY_HONOR */
380 
381 
382 /* Do we want different characters for different races? */
383 /*
384  * Too slow for general use - note that the 16x16 tiles use a
385  * much faster version.
386  */
387 /* # define VARIABLE_PLAYER_GRAPH */
388 
389 /* For longer martial arts descriptions */
390 # define VERBOSE_MARTIAL_ARTS
391 
392 /* Allow hordes of 'similar' monsters */
393 # define MONSTER_HORDES
394 
395 /* Allow Klackon- and Sprite-Monks to get extra speed
396  *
397  * undefined by default because
398  * Klackons and Sprites are not *supposed* to be
399  * playing monks in the first place
400  */
401 /* #define MONK_HACK */
402 
403 /*
404  * Add pillar tunnels (Annoying)
405  */
406 /* #define PILLAR_TUNNELS */
407 
408 /*
409  * Optional use of 64bit type
410  */
411 /* #define USE_64B */
412 
413 /*
414  * Allow execution of arbitrary lua scripts using
415  * the '@' debug command.  (Insecure)
416  */
417 /* #define DEBUG_SCRIPTS */
418 
419