Source:NetHack 3.4.3/include/qtext.h

From NetHackWiki
Jump to: navigation, search

Below is the full text to include/qtext.h from NetHack 3.4.3. To link to a particular line, write [[qtext.h#line123]], for example.

  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. */

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