Source:NetHack 3.0.0/hack.h
Jump to navigation
Jump to search
Below is the full text to hack.h from the source code of NetHack 3.0.0. To link to a particular line, write [[NetHack 3.0.0/hack.h#line123]], for example.
Warning! This is the source code from an old release. For the latest release, see Source code
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. /* SCCS Id: @(#)hack.h 3.0 88/07/19 2. /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ 3. /* NetHack may be freely redistributed. See license for details. */ 4. 5. #ifndef HACK_H 6. #define HACK_H 7. 8. #ifndef CONFIG_H 9. #include "config.h" 10. #endif 11. 12. #define TELL 1 13. #define NOTELL 0 14. #define ON 1 15. #define OFF 0 16. #define BOLT_LIM 8 /* from this distance ranged attacks will be made */ 17. #ifdef HARD 18. #define MAX_CARR_CAP 120 /* so that boulders can be heavier */ 19. #else 20. #define MAX_CARR_CAP 500 21. #endif 22. #define FAR (COLNO+2) /* position outside screen */ 23. #ifdef NULL 24. #undef NULL 25. #endif /* NULL */ 26. #define NULL ((genericptr_t)0) 27. #define DUMMY { 0 } 28. 29. #ifndef DECL_H 30. #include "decl.h" 31. #endif 32. 33. #ifndef MONSYM_H 34. #include "monsym.h" 35. #endif 36. #ifndef MKROOM_H 37. #include "mkroom.h" 38. #endif 39. #ifndef OBJCLASS_H 40. #include "objclass.h" 41. #endif 42. 43. extern coord bhitpos; /* place where thrown weapon falls to the ground */ 44. 45. #ifndef GOLD_H 46. #include "gold.h" 47. #endif 48. #ifndef TRAP_H 49. #include "trap.h" 50. #endif 51. #ifndef FLAG_H 52. #include "flag.h" 53. #endif 54. 55. #ifndef RM_H 56. #include "rm.h" 57. #endif 58. 59. #ifdef STRONGHOLD 60. # define Inhell (dlevel > stronghold_level && dlevel <= MAXLEVEL) 61. #else 62. # define Inhell (dlevel >= HELLLEVEL) 63. #endif 64. 65. #ifdef SPELLS 66. #define NO_SPELL 0 67. #endif 68. 69. /*** some utility macros ***/ 70. # ifndef STUPID_CPP /* otherwise these macros are functions in hack.c */ 71. #define yn() yn_function(ynchars, 'n') 72. #define ynq() yn_function(ynqchars, 'q') 73. #define ynaq() yn_function(ynaqchars, 'y') 74. #define nyaq() yn_function(nyaqchars, 'n') 75. 76. #define max(a, b) ((a) > (b) ? (a) : (b)) 77. #define min(x,y) ((x) < (y) ? (x) : (y)) 78. #define plur(x) (((x) == 1) ? "" : "s") 79. 80. #define makeknown(x) objects[x].oc_name_known = 1 81. # endif /* STUPID_CPP */ 82. 83. #ifdef MSDOS 84. #define getuid() 1 85. #define getlogin() ((char *) NULL) 86. #endif /* MSDOS */ 87. 88. #endif /* HACK_H /**/