Source:NetHack 1.4f/decl.c

From NetHackWiki
Jump to: navigation, search

Below is the full text to decl.c from the source code of NetHack 1.4f. To link to a particular line, write [[NetHack 1.4f/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.    /*	SCCS Id: @(#)decl.c	1.4	87/08/08
2.    /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
3.    /* Decl.c - version 1.0.3 */
4.    
5.    #include	"hack.h"
6.    char nul[40];			/* contains zeros */
7.    char plname[PL_NSIZ];		/* player name */
8.    
9.    #ifdef GRAPHICS
10.   struct symbols defsyms = {
11.       ' ', '|', '-', '-', '-', '-', '-', '+', '.', '#', '<', '>', '^',
12.   #ifdef FOUNTAINS
13.       '}', '{',
14.   #endif
15.   #ifdef NEWCLASS
16.       '\\',
17.   #endif
18.   #ifdef SPIDERS
19.       '"',
20.   #endif
21.   };
22.   #endif
23.   struct symbols showsyms;	/* will contain the symbols actually used */
24.   
25.   #ifdef DGK
26.   char hackdir[PATHLEN];		/* where rumors, help, record are */
27.   char levels[PATHLEN];		/* where levels are */
28.   char lock[FILENAME];		/* pathname of level files */
29.   char permbones[PATHLEN];	/* where permanent copy of bones go */
30.   int ramdisk = FALSE;		/* whether to copy bones to levels or not */
31.   int saveprompt = TRUE;
32.   char *alllevels = "levels.*";
33.   char *allbones = "bones.*";
34.   char *configfile = "HACK.CNF";	/* read by read_config_file() */
35.   #else
36.   char lock[PL_NSIZ+4] = "1lock";	/* long enough for login name .99 */
37.   #endif
38.   
39.   boolean in_mklev, restoring;
40.   struct rm levl[COLNO][ROWNO]; /* level map */
41.   
42.   #ifndef QUEST
43.   #include "mkroom.h"
44.   struct mkroom rooms[MAXNROFROOMS+1];
45.   coord doors[DOORMAX];
46.   #endif
47.   struct monst *fmon = 0;
48.   struct trap *ftrap = 0;
49.   struct gold *fgold = 0;
50.   struct obj *fobj = 0, *fcobj = 0, *invent = 0, *uwep = 0, *uarm = 0,
51.   	*uarm2 = 0, *uarmh = 0, *uarms = 0, *uarmg = 0, *uright = 0,
52.   	*uleft = 0, *uchain = 0, *uball = 0;
53.   struct flag flags;
54.   struct you u;
55.   #ifdef SPELLS
56.   struct spell spl_book[MAXSPELL + 1];
57.   #endif
58.   struct rm levl[COLNO][ROWNO];	/* level map */
59.   struct monst youmonst;	/* dummy; used as return value for boomhit */
60.   
61.   xchar dlevel = 1;
62.   xchar xupstair, yupstair, xdnstair, ydnstair;
63.   char *save_cm = 0, *killer, *nomovemsg;
64.   
65.   long moves = 1;
66.   long wailmsg = 0;
67.   int multi = 0;
68.   char	*occtxt;
69.   #ifdef DGKMOD
70.   int	occtime;
71.   #endif
72.   #ifdef REDO
73.   int	in_doagain;
74.   #endif
75.   
76.   char *HI, *HE;		/* set up in termcap.c */
77.   
78.   char genocided[60];
79.   char fut_geno[60];
80.   #ifdef KAA
81.   boolean	stoned;				/* done to monsters hit by 'c' */
82.   boolean	unweapon;
83.   #endif
84.    
85.   xchar curx,cury;
86.   xchar seelx, seehx, seely, seehy;	/* corners of lit room */
87.   
88.   coord bhitpos;
89.   
90.   char quitchars[] = " \r\n\033";