File: qtext.h

package info (click to toggle)
gnomehack 1.0.5-1.1
  • links: PTS
  • area: main
  • in suites: potato
  • size: 10,256 kB
  • ctags: 12,966
  • sloc: ansic: 119,783; yacc: 2,002; sh: 610; lex: 417; makefile: 397
file content (101 lines) | stat: -rw-r--r-- 2,239 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
/*	SCCS Id: @(#)qtext.h	3.2	92/01/22	*/
/* Copyright (c) Mike Stephenson 1991.				  */
/* NetHack may be freely redistributed.  See license for details. */

#ifndef QTEXT_H
#define QTEXT_H

#define N_HDR	13		/* number of classes + 1 */
#define COMMON_ID	'-'	/* common message id value */

struct qtmsg {
	int	msgnum;
	char	delivery;
	long	offset,
		size;
};

#ifdef MAKEDEFS_C

#define N_MSG	100		/* arbitrary */

struct msghdr {
	int	n_msg;
	struct	qtmsg	qt_msg[N_MSG];
};

struct	qthdr {
	int	n_hdr;
	char	id[N_HDR];
	long	offset[N_HDR];
};

/* Error message macros */
#define CREC_IN_MSG	"Control record encountered during message - line %d\n"
#define DUP_MSG		"Duplicate message number at line %d\n"
#define END_NOT_IN_MSG	"End record encountered before message - line %d\n"
#define UNREC_CREC	"Unrecognized Control record at line %d\n"
#define OUT_OF_HEADERS	"Too many message types (line %d)\nAdjust N_HDR in qtext.h and recompile.\n"
#define OUT_OF_MESSAGES	"Too many messages in class (line %d)\nAdjust N_MSG in qtext.h and recompile.\n"

#else	/* !MAKEDEFS_C */

struct	qtlists {
	struct	qtmsg	*common,
			*chclass;
};


/*
 *	Quest message defines.  Used in quest.c to trigger off "realistic"
 *	dialogue to the player.
 */
#define QT_FIRSTTIME	 1
#define QT_NEXTTIME	 2
#define QT_OTHERTIME	 3

#define QT_GUARDTALK	 5	/* 5 random things for guards to say */

#define QT_FIRSTLEADER	10
#define QT_NEXTLEADER	11
#define QT_OTHERLEADER	12
#define QT_LASTLEADER	13
#define QT_BADLEVEL	14
#define QT_BADALIGN	15
#define QT_ASSIGNQUEST	16

#define QT_ENCOURAGE	20	/* 1-10 random encouragement messages */

#define QT_FIRSTLOCATE	30
#define QT_NEXTLOCATE	31

#define QT_FIRSTGOAL	40
#define QT_NEXTGOAL	41

#define QT_FIRSTNEMESIS	50
#define QT_NEXTNEMESIS	51
#define QT_OTHERNEMESIS	52
#define QT_NEMWANTSIT	53	/* you somehow got the artifact */

#define QT_DISCOURAGE	60	/* 1-10 random maledictive messages */

#define QT_GOTIT	70

#define QT_KILLEDNEM	80
#define QT_OFFEREDIT	81

#define QT_POSTHANKS	90
#define QT_HASAMULET	91

/*
 *	Message defines for common text used in maledictions.
 */
#define QT_ANGELIC	10
#define QTN_ANGELIC	10

#define QT_DEMONIC	30
#define QTN_DEMONIC	20

#endif	/* MAKEDEFS_C */

#endif /* QTEXT_H */