Difference between revisions of "Source:NetHack 1.3d/hack.h"
Jump to navigation
Jump to search
m (Automated source code upload) |
Kernigh bot (talk | contribs) m (NetHack 1.3d/hack.h moved to Source:NetHack 1.3d/hack.h: Robot: moved page) |
(No difference)
|
Latest revision as of 23:55, 3 March 2008
Below is the full text to hack.h from the source code of NetHack 1.3d. To link to a particular line, write [[NetHack 1.3d/hack.h#line123]], for example.
Warning! This is the source code from an old release. For the latest release, see Source code
Screenshots and source code from Hack are used under the CWI license.
1. /* SCCS Id: @(#)hack.h 1.3 87/07/14 2. /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ 3. /* hack.h - version 1.0.3 */ 4. 5. #include "config.h" 6. 7. #define Null(type) ((struct type *) 0) 8. 9. #include "objclass.h" 10. 11. typedef struct { 12. xchar x,y; 13. } coord; 14. 15. extern coord bhitpos; /* place where thrown weapon falls to the ground */ 16. 17. #include "monst.h" /* uses coord */ 18. #include "gold.h" 19. #include "trap.h" 20. #include "obj.h" 21. #include "flag.h" 22. 23. #define plur(x) (((x) == 1) ? "" : "s") 24. #define min(x,y) ((x) < (y) ? (x) : (y)) 25. 26. #define BUFSZ 256 /* for getlin buffers */ 27. #define PL_NSIZ 32 /* name of player, ghost, shopkeeper */ 28. 29. #include "rm.h" 30. 31. #define Inhell (dlevel >= 30) 32. #define newstring(x) (char *) alloc((unsigned)(x)) 33. 34. #ifdef SPELLS 35. #include "spell.h" 36. #define NO_SPELL 0 37. #endif 38. 39. #define TELL 1 40. #define NOTELL 0 41. 42. #define ON 1 43. #define OFF 0 44. 45. #include "extern.h" 46. 47. #define DIST(x1,y1,x2,y2) (((x1)-(x2))*((x1)-(x2)) + ((y1)-(y2))*((y1)-(y2))) 48. 49. #define PL_CSIZ 20 /* sizeof pl_character */ 50. #define MAX_CARR_CAP 120 /* so that boulders can be heavier */ 51. #define MAXLEVEL 40 52. #define FAR (COLNO+2) /* position outside screen */