Source:NetHack 5.0.0/include/config.h
Jump to navigation
Jump to search
Below is the full text to config.h from the source code of NetHack 5.0.0. To link to a particular line, write [[Source:NetHack 5.0.0/include/config.h#line12]], for example.
The NetHack General Public License applies to screenshots, source code and other content from NetHack.
This content was modified from the original NetHack source code distribution (by splitting up NetHack content between wiki pages, and possibly further editing). See the page history for a list of who changed it, and on what dates.
1. /* NetHack 5.0 config.h $NHDT-Date: 1710344316 2024/03/13 15:38:36 $ $NHDT-Branch: keni-staticfn $:$NHDT-Revision: 1.188 $ */ 2. /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ 3. /*-Copyright (c) Robert Patrick Rankin, 2016. */ 4. /* NetHack may be freely redistributed. See license for details. */ 5. 6. #ifndef CONFIG_H /* make sure the compiler does not see the typedefs twice */ 7. #define CONFIG_H 8. 9. /* 10. * Section 1: Operating and window systems selection. 11. * Select the version of the OS you are using. 12. * For "UNIX" select BSD, ULTRIX, SYSV, or HPUX in unixconf.h. 13. * A "VMS" option is not needed since the VMS C-compilers 14. * provide it (no need to change sec#1, vmsconf.h handles it). 15. * MacOSX uses the UNIX configuration, not the old MAC one. 16. */ 17. 18. #define UNIX /* delete if no fork(), exec() available */ 19. 20. /* #define MSDOS */ /* in case it's not auto-detected */ 21. 22. /* #define OS2 */ /* define for OS/2 */ 23. 24. /* #define TOS */ /* define for Atari ST/TT */ 25. 26. /* #define STUPID */ /* avoid some complicated expressions if 27. * your C compiler chokes on them */ 28. /* #define MINIMAL_TERM */ 29. /* if a terminal handles highlighting or tabs poorly, 30. try this define, used in pager.c and termcap.c */ 31. /* #define ULTRIX_CC20 */ 32. /* define only if using cc v2.0 on a DECstation */ 33. /* #define ULTRIX_PROTO */ 34. /* define for Ultrix 4.0 (or higher) on a DECstation; 35. * if you get compiler errors, don't define this. */ 36. /* Hint: if you're not developing code, don't define 37. ULTRIX_PROTO. */ 38. 39. #include "config1.h" /* should auto-detect MSDOS, MACOS9, AMIGA, and WIN32 */ 40. 41. /* 42. * Consolidated version, patchlevel, development status. 43. */ 44. #ifdef SHORT_FILENAMES 45. #include "patchlev.h" 46. #else 47. #include "patchlevel.h" 48. #endif 49. 50. 51. /* Windowing systems... 52. * Define all of those you want supported in your binary. 53. * Some combinations make no sense. See the installation document. 54. */ 55. #if !defined(NOTTYGRAPHICS) 56. #define TTY_GRAPHICS /* good old tty-based graphics */ 57. #endif 58. /* #define CURSES_GRAPHICS *//* Curses interface - Karl Garrison*/ 59. /* #define X11_GRAPHICS */ /* X11 interface */ 60. /* #define QT_GRAPHICS */ /* Qt interface */ 61. /* #define MSWIN_GRAPHICS */ /* Windows NT, CE, Graphics */ 62. 63. /* 64. * Define the default window system. This should be one that is compiled 65. * into your system (see defines above). Known window systems are: 66. * 67. * tty, X11, mac, amii, BeOS, Qt, Gem, Gnome, shim 68. */ 69. 70. /* MACOS9 also means MAC windows */ 71. #ifdef MACOS9 72. #ifndef AUX 73. #define DEFAULT_WINDOW_SYS "mac" 74. #endif 75. #endif 76. 77. /* Amiga supports AMII_GRAPHICS and/or TTY_GRAPHICS */ 78. #ifdef AMIGA 79. #define AMII_GRAPHICS /* (optional) */ 80. #define DEFAULT_WINDOW_SYS "amii" /* "amii", "amitile" or "tty" */ 81. #endif 82. 83. /* Atari supports GEM_GRAPHICS and/or TTY_GRAPHICS */ 84. #ifdef TOS 85. #define GEM_GRAPHICS /* Atari GEM interface (optional) */ 86. #define DEFAULT_WINDOW_SYS "Gem" /* "Gem" or "tty" */ 87. #endif 88. 89. #ifdef __BEOS__ 90. #define BEOS_GRAPHICS /* (optional) */ 91. #define DEFAULT_WINDOW_SYS "BeOS" /* "tty" */ 92. #ifndef HACKDIR /* override the default hackdir below */ 93. #define HACKDIR "/boot/apps/NetHack" 94. #endif 95. #endif 96. 97. #ifdef QT_GRAPHICS 98. #ifndef DEFAULT_WC_TILED_MAP 99. #define DEFAULT_WC_TILED_MAP /* Default to tiles if users doesn't request 100. * wc_ascii_map */ 101. #endif 102. #ifndef USE_XPM 103. #define USE_XPM /* Use XPM format for images (required) */ 104. #endif 105. #ifndef GRAPHIC_TOMBSTONE 106. #define GRAPHIC_TOMBSTONE /* Use graphical tombstone (rip.ppm) */ 107. #endif 108. #ifndef DEFAULT_WINDOW_SYS 109. #define DEFAULT_WINDOW_SYS "Qt" 110. #endif 111. #endif 112. 113. #ifdef GNOME_GRAPHICS 114. #ifndef USE_XPM 115. #define USE_XPM /* Use XPM format for images (required) */ 116. #endif 117. #ifndef GRAPHIC_TOMBSTONE 118. #define GRAPHIC_TOMBSTONE /* Use graphical tombstone (rip.ppm) */ 119. #endif 120. #ifndef DEFAULT_WINDOW_SYS 121. #define DEFAULT_WINDOW_SYS "Gnome" 122. #endif 123. #endif 124. 125. #ifdef MSWIN_GRAPHICS 126. #ifndef DEFAULT_WINDOW_SYS 127. #define DEFAULT_WINDOW_SYS "mswin" 128. #endif 129. #define HACKDIR "\\nethack" 130. #endif 131. 132. #ifdef TTY_GRAPHICS 133. #ifndef DEFAULT_WINDOW_SYS 134. #define DEFAULT_WINDOW_SYS "tty" 135. #endif 136. #endif 137. 138. #ifdef CURSES_GRAPHICS 139. #ifndef DEFAULT_WINDOW_SYS 140. #define DEFAULT_WINDOW_SYS "curses" 141. #endif 142. #endif 143. 144. #ifdef SHIM_GRAPHICS 145. #ifndef DEFAULT_WINDOW_SYS 146. #define DEFAULT_WINDOW_SYS "shim" 147. #endif 148. #endif 149. 150. #ifdef X11_GRAPHICS 151. /* 152. * There are two ways that X11 tiles may be defined: 153. * (1) using a custom format loaded by NetHack code. 154. * (2) using the XPM format loaded by the free XPM library. 155. * The second option allows you to then use other programs to 156. * generate tiles files. For example, the PBMPlus tools 157. * would allow: 158. * xpmtoppm <x11tiles.xpm | pnmscale 1.25 | ppmquant 90 | \ 159. * ppmtoxpm >x11tiles_big.xpm 160. */ 161. /* # define USE_XPM */ /* Disable if you do not have the XPM library */ 162. #ifdef USE_XPM 163. #ifndef GRAPHIC_TOMBSTONE 164. #define GRAPHIC_TOMBSTONE /* Use graphical tombstone (rip.xpm) */ 165. #endif 166. #endif 167. #ifndef DEFAULT_WC_TILED_MAP 168. #define DEFAULT_WC_TILED_MAP /* Default to tiles */ 169. #endif 170. #endif 171. 172. /* 173. * Section 2: Some global parameters and filenames. 174. * 175. * LOGFILE, XLOGFILE, LIVELOGFILE, NEWS and PANICLOG refer to 176. * files in the playground directory. Commenting out LOGFILE, 177. * XLOGFILE, NEWS or PANICLOG removes that feature from the game. 178. * 179. * Building with debugging features enabled is now unconditional; 180. * the old WIZARD setting for that has been eliminated. 181. * If SYSCF is enabled, WIZARD_NAME will be overridden at 182. * runtime by the SYSCF WIZARDS value. 183. * 184. * SYSCF: (not supported by all ports) 185. * If SYSCF is defined, the following configuration info is 186. * available in a global config space, with the compiled-in 187. * entries as defaults: 188. * WIZARDS (a space-separated list of usernames of users who 189. * can run the game in debug mode, aka wizard mode; 190. * a value of * allows anyone to debug; 191. * this does NOT default to compiled-in value) 192. * EXPLORERS (who can use explore mode, aka discover mode) 193. * SHELLERS (who can use ! to execute a shell subprocess) 194. * MAXPLAYERS (see MAX_NR_OF_PLAYERS below and nethack.sh) 195. * SUPPORT (how to get local support) [no default] 196. * RECOVER (how to recover a game at your site) [no default] 197. * For the record file (see topten.c): 198. * PERSMAX (max entries for one person) 199. * ENTRYMAX (max entries in the record file) 200. * POINTSMIN (min points to get an entry) 201. * PERS_IS_UID (0 or 1 - person is name or (numeric) userid) 202. * Can force incubi/succubi behavior to be toned down to nymph-like: 203. * SEDUCE (0 or 1 - runtime disable/enable SEDUCE option) 204. * Can hide the entry for displaying command line usage from 205. * the help menu if players don't have access to command lines: 206. * HIDEUSAGE (0 or 1 - runtime show/hide command line usage) 207. * The following options pertain to crash reporting: 208. * GREPPATH (the path to the system grep(1) utility) 209. * GDBPATH (the path to the system gdb(1) program) 210. * CRASHREPORT (use CRASHREPORTURL if defined in syscf; this 211. * define specifies the name of the helper program 212. * used to launch the browser and enables the 213. * feature)) 214. * Regular nethack options can also be specified in order to 215. * provide system-wide default values local to your system: 216. * OPTIONS (same as in users' .nethackrc or defaults.nh) 217. * 218. * In the future there may be other ways to supply SYSCF 219. * information (Windows registry, Apple resource forks, etc) 220. * but at present the only supported method is via a text file. 221. * If the program is built with SYSCF enabled, the file *must* 222. * exist and be readable, otherwise the game will complain and 223. * refuse to start. 224. * SYSCF_FILE: file containing the SYSCF options shown above; 225. * default is 'sysconf' in nethack's playground. 226. */ 227. 228. #ifndef WIZARD_NAME /* allow for compile-time or Makefile changes */ 229. #define WIZARD_NAME "wizard" /* value is ignored if SYSCF is enabled */ 230. #endif 231. 232. #ifndef SYSCF 233. #define SYSCF /* use a global configuration */ 234. #define SYSCF_FILE "sysconf" /* global configuration is in a file */ 235. #endif 236. 237. #ifndef GDBPATH 238. #define GDBPATH "/usr/bin/gdb" 239. #endif 240. #ifndef GREPPATH 241. #define GREPPATH "/bin/grep" 242. #endif 243. 244. #ifndef NOCRASHREPORT 245. # ifndef CRASHREPORT 246. # ifdef MACOS 247. # define CRASHREPORT "/usr/bin/open" 248. # endif 249. # ifdef __linux__ 250. # define CRASHREPORT "/usr/bin/xdg-open" 251. /* Define this if the terminal is filled with useless error messages 252. * when the browser launches. */ 253. # define CRASHREPORT_EXEC_NOSTDERR 254. # endif 255. # ifdef WIN32 256. # define CRASHREPORT /* builtin helper */ 257. # endif 258. # endif 259. #else 260. # ifdef CRASHREPORT 261. # undef CRASHREPORT 262. # endif 263. # if defined(MSDOS) || defined(NOPANICTRACE) 264. # undef PANICTRACE 265. # endif 266. #endif 267. 268. #ifdef CRASHREPORT 269. # ifndef DUMPLOG_CORE 270. # define DUMPLOG_CORE // required to get ^P info 271. # endif 272. # ifdef MACOS 273. # define PANICTRACE 274. # endif 275. # ifdef __linux__ 276. # define PANICTRACE 277. # ifndef NOSTATICFN // may be defined on command line 278. # define NOSTATICFN 279. # endif 280. # endif 281. // This test isn't quite right: CNG is only available from Windows 2000 on. 282. // But we'll check that at runtime. 283. # ifdef WIN32 284. # define PANICTRACE 285. # define NOSTATICFN 286. # endif 287. #endif 288. 289. #ifdef NONOSTATICFN 290. # define staticfn static 291. #else 292. # ifdef NOSTATICFN 293. # define staticfn 294. # else 295. # define staticfn static 296. # endif 297. #endif 298. 299. /* note: "larger" is in comparison with 'record', the high-scores file 300. (whose name can be overridden via #define in global.h if desired) */ 301. #define LOGFILE "logfile" /* larger file for debugging purposes */ 302. #define XLOGFILE "xlogfile" /* even larger logfile */ 303. #define NEWS "news" /* the file containing the latest hack news */ 304. #define PANICLOG "paniclog" /* log of panic and impossible events */ 305. 306. /* alternative paniclog format, better suited for public servers with 307. many players, as it saves the player name and the game start time */ 308. /* #define PANICLOG_FMT2 */ 309. 310. /* 311. * When building the program, whether the 'makedefs' utility 312. * checks for non-ASCII or non-printable (control) characters 313. * in various data files (data.base, rumors.tru, rumors.fal, 314. * {oracles,epitaphs,engravings,bogusmons}.txt and warns about them. 315. * They also get changed to '#' instead of possibly remaining 316. * unprintable. 317. * 318. * If you modify the data files to intentionally add accented 319. * letters or something comparable, comment this out. (Such things 320. * won't necessarily work as intended within nethack but at least 321. * makedefs wouldn't reject them.) 322. */ 323. #define MAKEDEFS_FILTER_NONASCII 324. 325. /* 326. * PERSMAX, POINTSMIN, ENTRYMAX, PERS_IS_UID: 327. * These control the contents of 'record', the high-scores file. 328. * They used to be located in topten.c rather than config.h, and 329. * their values can be overridden at runtime (to increase ENTRYMAX, the 330. * maximum number of scores to keep, for example) if SYSCF is enabled. 331. */ 332. #ifndef PERSMAX 333. #define PERSMAX 3 /* entries per name/uid per char. allowed */ 334. #endif 335. #ifndef POINTSMIN 336. #define POINTSMIN 1 /* must be > 0 */ 337. #endif 338. #ifndef ENTRYMAX 339. #define ENTRYMAX 100 /* must be >= 10 */ 340. #endif 341. #ifndef PERS_IS_UID 342. #if !defined(MICRO) && !defined(MACOS9) && !defined(WIN32) 343. #define PERS_IS_UID 1 /* delete for PERSMAX per name; now per uid */ 344. #else 345. #define PERS_IS_UID 0 346. #endif 347. #endif 348. 349. /* 350. * NODUMPENUMS 351. * If there are memory constraints and you don't want to store information 352. * about the internal enum values for monsters and objects, this can be 353. * uncommented to define NODUMPENUMS. Doing so will disable the 354. * nethack --dumpenums 355. * command line option. 356. * Note: the extra memory is also used when ENHANCED_SYMBOLS is 357. * defined, so defining both ENHANCED_SYMBOLS and NODUMPENUMS will limit 358. * the amount of memory and code reduction offered by the latter. 359. */ 360. /* #define NODUMPENUMS */ 361. 362. /* 363. * ENHANCED_SYMBOLS 364. * Support the enhanced display of symbols by utilizing utf8. 365. * Enabled by default, but it can be disabled by commenting it out. 366. */ 367. 368. #define ENHANCED_SYMBOLS 369. 370. /* 371. * If COMPRESS is defined, it should contain the full path name of your 372. * 'compress' program. 373. * 374. * If you define COMPRESS, you must also define COMPRESS_EXTENSION 375. * as the extension your compressor appends to filenames after 376. * compression. Currently, only UNIX fully implements 377. * COMPRESS; other ports should be able to uncompress save files a 378. * la unixmain.c if so inclined. 379. * 380. * Defining ZLIB_COMP builds in support for zlib compression. If you 381. * define ZLIB_COMP, you must link with a zlib library. Not all ports 382. * support ZLIB_COMP. 383. * 384. * COMPRESS and ZLIB_COMP are mutually exclusive. 385. * 386. */ 387. 388. #if defined(UNIX) && !defined(ZLIB_COMP) && !defined(COMPRESS) 389. /* path and file name extension for compression program */ 390. #define COMPRESS "/usr/bin/compress" /* Lempel-Ziv compression */ 391. #define COMPRESS_EXTENSION ".Z" /* compress's extension */ 392. /* An example of one alternative you might want to use: */ 393. /* #define COMPRESS "/usr/local/bin/gzip" */ /* FSF gzip compression */ 394. /* #define COMPRESS_EXTENSION ".gz" */ /* normal gzip extension */ 395. #endif 396. 397. #ifndef COMPRESS 398. /* # define ZLIB_COMP */ /* ZLIB for compression */ 399. #endif 400. 401. /* 402. * Data librarian. Defining DLB places most of the support files into 403. * a tar-like file, thus making a neater installation. See *conf.h 404. * for detailed configuration. 405. */ 406. /* #define DLB */ /* not supported on all platforms */ 407. 408. /* 409. * Defining REPRODUCIBLE_BUILD causes 'util/makedefs -v' to construct 410. * date+time in include/date.h (to be shown by nethack's 'v' command) 411. * from SOURCE_DATE_EPOCH in the build environment rather than use 412. * current date+time when makedefs is run. 413. * 414. * [The version string will show "last revision <date> 415. * of "last build <date> 416. * which seems valid at the time date.h is generated. The person 417. * building the program is responsible for setting it correctly, 418. * and the value should be in UTC rather than local time. NetHack 419. * normally uses local time and doesn't display timezone so toggling 420. * REPRODUCIBLE_BUILD on or off might yield a date+time that appears 421. * to be incorrect relative to what the other setting produced.] 422. * 423. * Intent is to be able to rebuild the program with the same value 424. * and obtain an identical copy as was produced by a previous build. 425. * Not necessary for normal game play.... 426. */ 427. /* #define REPRODUCIBLE_BUILD */ /* use getenv("SOURCE_DATE_EPOCH") instead 428. of current time when creating date.h */ 429. 430. /* 431. * Defining INSURANCE slows down level changes, but allows games that 432. * died due to program or system crashes to be resumed from the point 433. * of the last level change, after running a utility program. 434. */ 435. #define INSURANCE /* allow crashed game recovery */ 436. 437. #if !defined(MACOS9) && !defined(SHIM_GRAPHICS) 438. #define CHDIR /* delete if no chdir() available */ 439. #endif 440. 441. #ifdef CHDIR 442. /* 443. * If you define HACKDIR, then this will be the default playground; 444. * otherwise it will be the current directory. 445. */ 446. #ifndef HACKDIR 447. #define HACKDIR "/usr/games/lib/nethackdir" 448. #endif 449. 450. /* 451. * Some system administrators are stupid enough to make Hack suid root 452. * or suid daemon, where daemon has other powers besides that of reading or 453. * writing Hack files. In such cases one should be careful with chdir's 454. * since the user might create files in a directory of his choice. 455. * Of course SECURE is meaningful only if HACKDIR is defined. 456. */ 457. /* #define SECURE */ /* do setuid(getuid()) after chdir() */ 458. 459. /* 460. * If it is desirable to limit the number of people that can play Hack 461. * simultaneously, define HACKDIR, SECURE and MAX_NR_OF_PLAYERS (or use 462. * MAXPLAYERS under SYSCF). 463. * #define MAX_NR_OF_PLAYERS 6 464. */ 465. #endif /* CHDIR */ 466. 467. 468. /* 469. * Section 3: Definitions that may vary with system type. 470. * For example, both schar and uchar should be short ints on 471. * the AT&T 3B2/3B5/etc. family. 472. */ 473. 474. /* 475. * Uncomment the following line if your compiler doesn't understand the 476. * 'void' type (and thus would give all sorts of compile errors without 477. * this definition). 478. */ 479. /* #define NOVOID */ /* define if no "void" data type. */ 480. 481. /* 482. * Uncomment the following line if your compiler falsely claims to be 483. * a standard C compiler (i.e., defines __STDC__ without cause). 484. * Examples are Apollo's cc (in some versions) and possibly SCO UNIX's rcc. 485. */ 486. /* #define NOTSTDC */ /* define for lying compilers */ 487. 488. #include "tradstdc.h" 489. 490. /* 491. * type schar: 492. * small signed integers (8 bits suffice) (eg. TOS) 493. * typedef char schar; 494. * will do when you have signed characters; otherwise use 495. * typedef short int schar; 496. */ 497. #ifdef AZTEC 498. #define schar char 499. #else 500. typedef signed char schar; 501. #endif 502. 503. /* 504. * type uchar: 505. * small unsigned integers (8 bits suffice - but 7 bits do not) 506. * typedef unsigned char uchar; 507. * will be satisfactory if you have an "unsigned char" type; otherwise use 508. * typedef unsigned short int uchar; 509. */ 510. #ifndef _AIX32 /* identical typedef in system file causes trouble */ 511. typedef unsigned char uchar; 512. #endif 513. 514. /* 515. * Various structures have the option of using bitfields to save space. 516. * If your C compiler handles bitfields well (e.g., it can initialize structs 517. * containing bitfields), you can define BITFIELDS. Otherwise, the game will 518. * allocate a separate character for each bitfield. (The bitfields used never 519. * have more than 7 bits, and most are only 1 bit.) 520. */ 521. #define BITFIELDS /* Good bitfield handling */ 522. 523. /* #define STRNCMPI */ /* compiler/library has the strncmpi function */ 524. 525. /* 526. * Vision choices. 527. * 528. * Things will be faster if you can use MACRO_CPATH. Some cpps, however, 529. * cannot deal with the size of the functions that have been macroized. 530. */ 531. 532. #ifndef NO_MACRO_CPATH 533. #define MACRO_CPATH /* use clear_path macros instead of functions */ 534. #endif 535. 536. #if !defined(MACOS9) 537. #if !defined(NOCLIPPING) 538. #define CLIPPING /* allow smaller screens -- ERS */ 539. #endif 540. #endif 541. 542. /* CONFIG_ERROR_SECURE: If user makes NETHACKOPTIONS point to a file ... 543. * TRUE: Show the first error, nothing else. 544. * FALSE: Show all errors as normal, with line numbers and context. 545. */ 546. #ifndef CONFIG_ERROR_SECURE 547. # define CONFIG_ERROR_SECURE TRUE 548. #endif 549. 550. /* 551. * Section 4: EXPERIMENTAL STUFF 552. * 553. * Conditional compilation of new or experimental options are controlled here. 554. * Enable any of these at your own risk -- there are almost certainly 555. * bugs left here. 556. */ 557. 558. /* SELECTSAVED: Enable the 'selectsaved' run-time option, allowing it 559. * to be set in user's config file or NETHACKOPTIONS. When set, if 560. * player is about to be given the "who are you?" prompt, check for 561. * save files and if any are found, put up a menu of them for choosing 562. * one to restore (plus extra menu entries "new game" and "quit"). 563. * 564. * Not useful if players are forced to use a specific character name 565. * such as their user name. However in some cases, players can set 566. * their character name to one which is classified as generic in the 567. * sysconf file (such as "player" or "games") 568. * nethack -u player 569. * to force the "who are you?" prompt in which case 'selectsaved' will 570. * be honored. 571. * 572. * Comment out if the wildcard file name lookup in files.c doesn't 573. * compile or doesn't work as intended. 574. */ 575. #define SELECTSAVED /* support for restoring via menu */ 576. 577. /* TTY_TILES_ESCCODES: Enable output of special console escape codes 578. * which act as hints for external programs such as EbonHack or hterm. 579. * 580. * TTY_SOUND_ESCCODES: Enable output of special console escape codes 581. * which act as hints for theoretical external programs to play sound effect. 582. * 583. * Only for TTY_GRAPHICS. 584. * 585. * All of the escape codes are in the format ESC [ N z, where N can be 586. * one or more positive integer values, separated by semicolons. 587. * For example ESC [ 1 ; 0 ; 120 z 588. * 589. * Possible TTY_TILES_ESCCODES codes are: 590. * ESC [ 1 ; 0 ; n ; m z Start a glyph (aka a tile) number n, with flags m 591. * ESC [ 1 ; 1 z End a glyph. 592. * ESC [ 1 ; 2 ; n z Select a window n to output to. 593. * ESC [ 1 ; 3 z End of data. NetHack has finished sending data, 594. * and is waiting for input. 595. * Possible TTY_SOUND_ESCCODES codes are: 596. * ESC [ 1 ; 4 ; n ; m z Play specified sound n, volume m 597. * 598. * Whenever NetHack outputs anything, it will first output the "select window" 599. * code. Whenever NetHack outputs a tile, it will first output the "start 600. * glyph" code, then the escape codes for color and the glyph character 601. * itself, and then the "end glyph" code. 602. * 603. * To compile NetHack with this, add tile.c to WINSRC and tile.o to WINOBJ in 604. * the hints file or Makefile. Set boolean option vt_tiledata and/or 605. * vt_sounddata in your config file to turn either of these on. Note that some 606. * terminals (e.g. old versions of gnome-terminal) don't work with this. */ 607. /* #define TTY_TILES_ESCCODES */ 608. /* #define TTY_SOUND_ESCCODES */ 609. 610. /* An experimental minimalist inventory list capability under tty if you have 611. * at least 28 additional rows beneath the status window on your terminal */ 612. /* #define TTY_PERM_INVENT */ 613. 614. /* enable status highlighting via STATUS_HILITE directives in run-time 615. config file and the 'statushilites' option */ 616. #define STATUS_HILITES /* support hilites of status fields */ 617. 618. /* #define WINCHAIN */ /* stacked window systems */ 619. 620. #if defined(DEBUG) && !defined(DEBUG_MIGRATING_MONS) 621. #define DEBUG_MIGRATING_MONS /* add a wizard-mode command to help debug 622. * migrating monsters */ 623. #endif 624. 625. /* SCORE_ON_BOTL is neither experimental nor inadequately tested, 626. but doesn't seem to fit in any other section... */ 627. /* #define SCORE_ON_BOTL */ /* enable the 'showscore' option to 628. * show estimated score on status line */ 629. 630. /* FREE_ALL_MEMORY is neither experimental nor inadequately tested, 631. but it isn't necessary for successful operation of the program */ 632. #define FREE_ALL_MEMORY /* free all memory at exit */ 633. 634. /* EXTRA_SANITY_CHECKS adds extra impossible calls, 635. * probably not useful for normal play */ 636. #if (NH_DEVEL_STATUS != NH_STATUS_RELEASED) 637. #define EXTRA_SANITY_CHECKS 638. #endif 639. 640. /* BREADCRUMBS employs the use of predefined compiler macros 641. * __FUNCTION__ and __LINE__ to store some caller breadcrumbs 642. * for use during heavy debugging sessions. Only define if your 643. * compiler supports those predefined macros and you are debugging */ 644. /* #define BREADCRUMBS */ 645. 646. /* EDIT_GETLIN makes the string input in TTY, curses, Qt4, and X11 647. for some prompts be pre-loaded with previously input text (from 648. a previous instance of the same prompt) as the default response. 649. In some cases, the previous instance can only be within the same 650. session; in others, such as #annotate, the previous input can be 651. from any session because the response is saved and restored with 652. the map. The 'edit' capability is just <delete> or <backspace> 653. to strip off characters at the end, or <escape> to discard the 654. whole thing, then type a new end for the text. */ 655. /* #define EDIT_GETLIN */ 656. 657. #ifndef NO_CHRONICLE 658. /* CHRONICLE - enable #chronicle command, a log of major game events. 659. The logged messages will also appear in DUMPLOG. */ 660. #define CHRONICLE 661. #ifdef CHRONICLE 662. /* LIVELOG - log CHRONICLE events into LIVELOGFILE as they happen. */ 663. /* #define LIVELOG */ 664. #endif /* CHRONICLE */ 665. #else 666. #undef LIVELOG 667. #endif /* NO_CHRONICLE */ 668. 669. /* #define DUMPLOG */ /* End-of-game dump logs */ 670. 671. #define USE_ISAAC64 /* Use cross-platform, bundled RNG */ 672. 673. /* TEMPORARY - MAKE UNCONDITIONAL BEFORE RELEASE */ 674. /* undef this to check if sandbox breaks something */ 675. #define NHL_SANDBOX 676. 677. #ifdef NHL_SANDBOX 678. #ifdef CHRONICLE 679. /* LIVELOG (and therefore CHRONICLE) is needed for --loglua */ 680. #define LIVELOG 681. #endif 682. #endif 683. 684. /* experimential; if the platform/window-port supports it; when the game has 685. * started to wait for player input, and the wait lasts longer than 686. * IDLECHECKPOINT_WAIT_TIME seconds (defined in hack.h or *conf.h), the game 687. * will perform an update to the checkpoint file. 688. * Currently has support in: 689. * WIN32CON 690. * Qt 691. */ 692. 693. /* #define IDLECHECKPOINT */ 694. 695. /* End of Section 4 */ 696. 697. #ifdef TTY_TILES_ESCCODES 698. # ifndef TILES_IN_GLYPHMAP 699. # define TILES_IN_GLYPHMAP 700. # endif 701. #endif 702. 703. #include "cstd.h" 704. #include "integer.h" 705. #include "global.h" /* Define everything else according to choices above */ 706. 707. /* Place the following after #include [platform]conf.h in global.h so that 708. overrides are possible in there, for things like unix-specific file 709. paths. */ 710. 711. #ifdef LIVELOG 712. #ifndef LIVELOGFILE 713. #define LIVELOGFILE "livelog" /* in-game events recorded, live */ 714. #endif /* LIVELOGFILE */ 715. #endif /* LIVELOG */ 716. 717. #ifdef DUMPLOG 718. #define DUMPLOG_CORE 719. #ifndef DUMPLOG_FILE 720. #define DUMPLOG_FILE "/tmp/nethack.%n.%d.log" 721. /* DUMPLOG_FILE allows following placeholders: 722. %% literal '%' 723. %v version (eg. "3.6.3-0") 724. %u game UID 725. %t game start time, UNIX timestamp format 726. %T current time, UNIX timestamp format 727. %d game start time, YYYYMMDDhhmmss format 728. %D current time, YYYYMMDDhhmmss format 729. %n player name 730. %N first character of player name 731. DUMPLOG_FILE is not used if SYSCF is defined 732. */ 733. #endif /* DUMPLOG_FILE */ 734. #endif /* DUMPLOG */ 735. #ifdef DUMPLOG_CORE 736. #ifndef DUMPLOG_MSG_COUNT 737. #define DUMPLOG_MSG_COUNT 50 738. #endif /* DUMPLOG_MSG_COUNT */ 739. #endif 740. 741. #endif /* CONFIG_H */