Source:Hack 1.0/hack.Decl.c

From NetHackWiki
Jump to: navigation, search

Below is the full text to hack.Decl.c from the source code of Hack 1.0. To link to a particular line, write [[Hack 1.0/hack.Decl.c#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.    /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1984. */
2.    
3.    #include	"hack.h"
4.    char nul[40];			/* contains zeros */
5.    char plname[PL_NSIZ] = "player";/* player name */
6.    char lock[32] = "1lock";	/* long enough for login name */
7.    
8.    #ifdef WIZARD
9.    boolean wizard;			/* TRUE when called as  hack -w */
10.   #endif WIZARD
11.   
12.   struct rm levl[COLNO][ROWNO];	/* level map */
13.   #ifndef QUEST
14.   struct mkroom rooms[MAXNROFROOMS+1];
15.   coord doors[DOORMAX];
16.   #endif QUEST
17.   struct monst *fmon = 0;
18.   struct gen *fgold = 0, *ftrap = 0;
19.   struct obj *fobj = 0, *fcobj = 0, *invent = 0, *uwep = 0, *uarm = 0,
20.   	*uarm2 = 0, *uarmh = 0, *uarms = 0, *uarmg = 0, *uright = 0,
21.   	*uleft = 0, *uchain = 0, *uball = 0;
22.   struct flag flags;
23.   struct you u;
24.   
25.   xchar dlevel = 1;
26.   xchar xupstair, yupstair, xdnstair, ydnstair;
27.   char *save_cm = 0, *killer, *nomovemsg;
28.   
29.   long moves = 1;
30.   long wailmsg = 0;
31.   
32.   int multi = 0;
33.   char genocided[60];
34.   char fut_geno[60];
35.   
36.   xchar curx,cury;
37.   xchar seelx, seehx, seely, seehy;	/* corners of lit room */
38.   
39.   coord bhitpos;