Source:NetHack 3.6.0/include/qtext.h

From NetHackWiki
(Redirected from Source:Qtext.h)
Jump to: navigation, search

Below is the full text to qtext.h from the source code of NetHack 3.6.0. To link to a particular line, write [[Source:NetHack 3.6.0/include/qtext.h#line123]], for example.

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