Wikia

Wikihack

Source:NetHack 2.2a/hack.h

2,032pages on
this wiki
Talk0

Below is the full text to hack.h from the source code of NetHack 2.2a. To link to a particular line, write [[NetHack 2.2a/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	2.1	87/10/18
2.    /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
3.    
4.    #ifndef HACK_H
5.    #define HACK_H
6.    
7.    #include "extern.h"
8.    
9.    #ifdef __TURBOC__
10.   /* work around the case-insensitivity of the DOS linker */
11.   #define Amonnam Amonnam_
12.   #define Xmonnam Xmonnam_
13.   #define Monnam Monnam_
14.   #define POISONOUS POISONOUS_
15.   #define Doname Doname_
16.   #define Tmp_at Tmp_at_
17.   /* rename the next two functions because they clash with the Turbo C library */
18.   #define getdate getdate_
19.   #define itoa itoa_
20.   #endif
21.   
22.   
23.   #define	Null(type)	((struct type *) 0)
24.   
25.   #include	"objclass.h"
26.   
27.   typedef struct {
28.   	xchar x,y;
29.   } coord;
30.   
31.   extern coord bhitpos;	/* place where thrown weapon falls to the ground */
32.   
33.   #include	"monst.h"	/* uses coord */
34.   #include	"gold.h"
35.   #include	"trap.h"
36.   #include	"flag.h"
37.   
38.   #define	plur(x)	(((x) == 1) ? "" : "s")
39.   #define min(x,y) ((x) < (y) ? (x) : (y))
40.   
41.   #define	BUFSZ	256	/* for getlin buffers */
42.   #define	PL_NSIZ	32	/* name of player, ghost, shopkeeper */
43.   
44.   #include	"rm.h"
45.   
46.   #define Inhell		(dlevel >= 30)
47.   #define	newstring(x)	(char *) alloc((unsigned)(x))
48.   
49.   #ifdef SPELLS
50.   #define	NO_SPELL	0
51.   #endif
52.   
53.   #define	TELL	1
54.   #define NOTELL	0
55.   
56.   #define ON 1
57.   #define OFF 0
58.   
59.   #ifdef GENIX
60.   #define DIST	jhndist
61.   /*	genix compiler chokes on DIST macro below - jhn*/
62.   #else
63.   #define DIST(x1,y1,x2,y2)       (((x1)-(x2))*((x1)-(x2)) + ((y1)-(y2))*((y1)-(y2)))
64.   #endif
65.   
66.   #define	PL_CSIZ		20	/* sizeof pl_character */
67.   #ifdef HARD
68.   #define	MAX_CARR_CAP	120	/* so that boulders can be heavier */
69.   #else
70.   #define	MAX_CARR_CAP	500
71.   #endif
72.   #ifdef RPH
73.   #define	MAXLEVEL	60
74.   #else
75.   #define	MAXLEVEL	40
76.   #endif
77.   #define	FAR	(COLNO+2)	/* position outside screen */
78.   
79.   #endif /* HACK_H /**/

Around Wikia's network

Random Wiki