Source:NetHack 3.6.1/include/botl.h

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

Below is the full text to botl.h from the source code of NetHack 3.6.1. To link to a particular line, write [[Source:NetHack 3.6.1/include/botl.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  botl.h  $NHDT-Date: 1452660165 2016/01/13 04:42:45 $  $NHDT-Branch: NetHack-3.6.0 $:$NHDT-Revision: 1.15 $ */
  2.  /* Copyright (c) Michael Allison, 2003                            */
  3.  /* NetHack may be freely redistributed.  See license for details. */
  4.  
  5.  #ifndef BOTL_H
  6.  #define BOTL_H
  7.  
  8.  /* MAXCO must hold longest uncompressed status line, and must be larger
  9.   * than COLNO
  10.   *
  11.   * longest practical second status line at the moment is
  12.  Astral Plane \GXXXXNNNN:123456 HP:1234(1234) Pw:1234(1234) AC:-127
  13.   Xp:30/123456789 T:123456  Stone Slime Strngl FoodPois TermIll
  14.   Satiated Overloaded Blind Deaf Stun Conf Hallu Lev Ride
  15.   * -- or about 185 characters.  '$' gets encoded even when it
  16.   * could be used as-is.  The first five status conditions are fatal
  17.   * so it's rare to have more than one at a time.
  18.   *
  19.   * When the full line is wider than the map, the basic status line
  20.   * formatting will move less important fields to the end, so if/when
  21.   * truncation is necessary, it will chop off the least significant
  22.   * information.
  23.   */
  24.  #if COLNO <= 160
  25.  #define MAXCO 200
  26.  #else
  27.  #define MAXCO (COLNO + 40)
  28.  #endif
  29.  
  30.  enum statusfields {
  31.      BL_CHARACTERISTICS = -2, /* alias for BL_STR..BL_CH */
  32.      BL_FLUSH = -1, BL_TITLE = 0,
  33.      BL_STR, BL_DX, BL_CO, BL_IN, BL_WI, BL_CH,  /* 1..6 */
  34.      BL_ALIGN, BL_SCORE, BL_CAP, BL_GOLD, BL_ENE, BL_ENEMAX, /* 7..12 */
  35.      BL_XP, BL_AC, BL_HD, BL_TIME, BL_HUNGER, BL_HP, BL_HPMAX, BL_LEVELDESC, /* 13..20 */
  36.      BL_EXP, BL_CONDITION
  37.  };
  38.  
  39.  enum relationships { LT_VALUE = -1, EQ_VALUE, GT_VALUE, TXT_VALUE };
  40.  
  41.  #define MAXBLSTATS      (BL_CONDITION + 1)
  42.  
  43.  #define BEFORE  0
  44.  #define NOW     1
  45.  
  46.  /* Boolean condition bits for the condition mask */
  47.  
  48.  /* clang-format off */
  49.  #define BL_MASK_STONE           0x00000001L
  50.  #define BL_MASK_SLIME           0x00000002L
  51.  #define BL_MASK_STRNGL          0x00000004L
  52.  #define BL_MASK_FOODPOIS        0x00000008L
  53.  #define BL_MASK_TERMILL         0x00000010L
  54.  #define BL_MASK_BLIND           0x00000020L
  55.  #define BL_MASK_DEAF            0x00000040L
  56.  #define BL_MASK_STUN            0x00000080L
  57.  #define BL_MASK_CONF            0x00000100L
  58.  #define BL_MASK_HALLU           0x00000200L
  59.  #define BL_MASK_LEV             0x00000400L
  60.  #define BL_MASK_FLY             0x00000800L
  61.  #define BL_MASK_RIDE            0x00001000L
  62.  /* clang-format on */
  63.  
  64.  #define REASSESS_ONLY TRUE
  65.  
  66.  /* #ifdef STATUS_HILITES */
  67.  /* hilite status field behavior - coloridx values */
  68.  #define BL_HILITE_NONE -1    /* no hilite of this field */
  69.  #define BL_HILITE_INVERSE -2 /* inverse hilite */
  70.  #define BL_HILITE_BOLD -3    /* bold hilite */
  71.                               /* or any CLR_ index (0 - 15) */
  72.  #define BL_TH_NONE 0
  73.  #define BL_TH_VAL_PERCENTAGE 100 /* threshold is percentage */
  74.  #define BL_TH_VAL_ABSOLUTE 101   /* threshold is particular value */
  75.  #define BL_TH_UPDOWN 102         /* threshold is up or down change */
  76.  #define BL_TH_CONDITION 103      /* threshold is bitmask of conditions */
  77.  #define BL_TH_TEXTMATCH 104      /* threshold text value to match against */
  78.  #define BL_TH_ALWAYS_HILITE 105  /* highlight regardless of value */
  79.  
  80.  
  81.  #define HL_ATTCLR_DIM     CLR_MAX + 0
  82.  #define HL_ATTCLR_BLINK   CLR_MAX + 1
  83.  #define HL_ATTCLR_ULINE   CLR_MAX + 2
  84.  #define HL_ATTCLR_INVERSE CLR_MAX + 3
  85.  #define HL_ATTCLR_BOLD    CLR_MAX + 4
  86.  #define BL_ATTCLR_MAX     CLR_MAX + 5
  87.  
  88.  enum hlattribs { HL_UNDEF   = 0x00,
  89.                   HL_NONE    = 0x01,
  90.                   HL_BOLD    = 0x02,
  91.                   HL_INVERSE = 0x04,
  92.                   HL_ULINE   = 0x08,
  93.                   HL_BLINK   = 0x10,
  94.                   HL_DIM     = 0x20 };
  95.  /* #endif STATUS_HILITES */
  96.  
  97.  extern const char *status_fieldnames[]; /* in botl.c */
  98.  
  99.  #endif /* BOTL_H */