Source:SLASH'EM 0.0.7E7F2/qtext.h

From NetHackWiki
Revision as of 18:17, 7 March 2008 by Kernigh bot (talk | contribs) (SLASH'EM 0.0.7E7F2/qtext.h moved to Source:SLASH'EM 0.0.7E7F2/qtext.h: Robot: moved page)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Below is the full text to qtext.h from the source code of SLASH'EM 0.0.7E7F2. To link to a particular line, write [[SLASH'EM 0.0.7E7F2/qtext.h#line123]], for example.

The latest source code for vanilla NetHack is at 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: @(#)qtext.h	3.4	1997/02/02	*/
2.    /* Copyright (c) Mike Stephenson 1991.				  */
3.    /* NetHack may be freely redistributed.  See license for details. */
4.    
5.    #ifndef QTEXT_H
6.    #define QTEXT_H
7.    
8.    #define N_HDR	32		/* Maximum number of categories */
9.    				/* (i.e., num roles + 1) */
10.   #define LEN_HDR 3		/* Maximum length of a category name */
11.   
12.   struct qtmsg {
13.   	int	msgnum;
14.   	char	delivery;
15.   	long	offset, size;
16.   };
17.   
18.   
19.   #ifdef MAKEDEFS_C	/***** MAKEDEFS *****/
20.   
21.   #define N_MSG	100		/* arbitrary */
22.   
23.   struct msghdr {
24.   	int	n_msg;
25.   	struct	qtmsg	qt_msg[N_MSG];
26.   };
27.   
28.   struct	qthdr {
29.   	int	n_hdr;
30.   	char	id[N_HDR][LEN_HDR];
31.   	long	offset[N_HDR];
32.   };
33.   
34.   /* Error message macros */
35.   #define CREC_IN_MSG	"Control record encountered during message - line %d\n"
36.   #define DUP_MSG		"Duplicate message number at line %d\n"
37.   #define END_NOT_IN_MSG	"End record encountered before message - line %d\n"
38.   #define TEXT_NOT_IN_MSG	"Text encountered outside message - line %d\n"
39.   #define UNREC_CREC	"Unrecognized Control record at line %d\n"
40.   #define OUT_OF_HEADERS	"Too many message types (line %d)\nAdjust N_HDR in qtext.h and recompile.\n"
41.   #define OUT_OF_MESSAGES "Too many messages in class (line %d)\nAdjust N_MSG in qtext.h and recompile.\n"
42.   
43.   
44.   #else	/***** !MAKEDEFS *****/
45.   
46.   struct	qtlists {
47.   	struct qtmsg
48.   		*common,
49.   #if 0	/* UNUSED but available */
50.   			*chrace,
51.   #endif
52.   			*chrole;
53.   };
54.   
55.   
56.   /*
57.    *	Quest message defines.	Used in quest.c to trigger off "realistic"
58.    *	dialogue to the player.
59.    */
60.   #define QT_FIRSTTIME	 1
61.   #define QT_NEXTTIME	 2
62.   #define QT_OTHERTIME	 3
63.   
64.   #define QT_GUARDTALK	 5	/* 5 random things guards say before quest */
65.   #define QT_GUARDTALK2	10	/* 5 random things guards say after quest */
66.   
67.   #define QT_FIRSTLEADER	15
68.   #define QT_NEXTLEADER	16
69.   #define QT_OTHERLEADER	17
70.   #define QT_LASTLEADER	18
71.   #define QT_BADLEVEL	19
72.   #define QT_BADALIGN	20
73.   #define QT_ASSIGNQUEST	21
74.   
75.   #define QT_ENCOURAGE	25	/* 1-10 random encouragement messages */
76.   
77.   #define QT_FIRSTLOCATE	35
78.   #define QT_NEXTLOCATE	36
79.   
80.   #define QT_FIRSTGOAL	40
81.   #define QT_NEXTGOAL	41
82.   
83.   #define QT_FIRSTNEMESIS 50
84.   #define QT_NEXTNEMESIS	51
85.   #define QT_OTHERNEMESIS 52
86.   #define QT_NEMWANTSIT	53	/* you somehow got the artifact */
87.   
88.   #define QT_DISCOURAGE	60	/* 1-10 random maledictive messages */
89.   
90.   #define QT_GOTIT	70
91.   
92.   #define QT_KILLEDNEM	80
93.   #define QT_OFFEREDIT	81
94.   #define QT_OFFEREDIT2	82
95.   
96.   #define QT_POSTHANKS	90
97.   #define QT_HASAMULET	91
98.   
99.   /*
100.   *	Message defines for common text used in maledictions.
101.   */
102.  #define COMMON_ID	"-"	/* common message id value */
103.  
104.  #define QT_ANGELIC	10
105.  #define QTN_ANGELIC	10
106.  
107.  #define QT_DEMONIC	30
108.  #define QTN_DEMONIC	20
109.  
110.  #define QT_BANISHED	60
111.  
112.  #define QT_GYPSY	100	/* KMH -- Gypsy fortunes */
113.  
114.  #endif	/* MAKEDEFS_C */
115.  
116.  #endif /* QTEXT_H */