Difference between revisions of "Source:NetHack 3.6.0/include/botl.h"

From NetHackWiki
Jump to navigation Jump to search
(Created page with "__MIXEDSYNTAXHIGHLIGHT__ Below is the full text to '''botl.h''' from the source code of NetHack 3.6.0. To link to a particular line, write ...")
 
 
Line 3: Line 3:
  
 
{{NGPL}}
 
{{NGPL}}
  <span id="line1">1.   /* NetHack 3.6  botl.h  $NHDT-Date: 1433105378 2015/05/31 20:49:38 $  $NHDT-Branch: status_hilite $:$NHDT-Revision: 1.14 $ */</span>
+
  <span id="line1">1. /* NetHack 3.6  botl.h  $NHDT-Date: 1433105378 2015/05/31 20:49:38 $  $NHDT-Branch: status_hilite $:$NHDT-Revision: 1.14 $ */</span>
  <span id="line2">2.   /* Copyright (c) Michael Allison, 2003                            */</span>
+
  <span id="line2">2. /* Copyright (c) Michael Allison, 2003                            */</span>
  <span id="line3">3.   /* NetHack may be freely redistributed.  See license for details. */</span>
+
  <span id="line3">3. /* NetHack may be freely redistributed.  See license for details. */</span>
  <span id="line4">4.   </span>
+
  <span id="line4">4. </span>
  <span id="line5">5.   #ifndef BOTL_H</span>
+
  <span id="line5">5. #ifndef BOTL_H</span>
  <span id="line6">6.   #define BOTL_H</span>
+
  <span id="line6">6. #define BOTL_H</span>
  <span id="line7">7.   </span>
+
  <span id="line7">7. </span>
  <span id="line8">8.   /* MAXCO must hold longest uncompressed status line, and must be larger</span>
+
  <span id="line8">8. /* MAXCO must hold longest uncompressed status line, and must be larger</span>
  <span id="line9">9.     * than COLNO</span>
+
  <span id="line9">9.  * than COLNO</span>
  <span id="line10">10.   *</span>
+
  <span id="line10">10.  *</span>
  <span id="line11">11.   * longest practical second status line at the moment is</span>
+
  <span id="line11">11.  * longest practical second status line at the moment is</span>
  <span id="line12">12.   * Astral Plane $:12345 HP:700(700) Pw:111(111) AC:-127 Xp:30/123456789</span>
+
  <span id="line12">12.  * Astral Plane $:12345 HP:700(700) Pw:111(111) AC:-127 Xp:30/123456789</span>
  <span id="line13">13.   * T:123456 Satiated Conf FoodPois Ill Blind Stun Hallu Overloaded</span>
+
  <span id="line13">13.  * T:123456 Satiated Conf FoodPois Ill Blind Stun Hallu Overloaded</span>
  <span id="line14">14.   * -- or somewhat over 130 characters</span>
+
  <span id="line14">14.  * -- or somewhat over 130 characters</span>
  <span id="line15">15.   */</span>
+
  <span id="line15">15.  */</span>
  <span id="line16">16.   #if COLNO <= 140</span>
+
  <span id="line16">16. #if COLNO <= 140</span>
  <span id="line17">17.   #define MAXCO 160</span>
+
  <span id="line17">17. #define MAXCO 160</span>
  <span id="line18">18.   #else</span>
+
  <span id="line18">18. #else</span>
  <span id="line19">19.   #define MAXCO (COLNO + 20)</span>
+
  <span id="line19">19. #define MAXCO (COLNO + 20)</span>
  <span id="line20">20.   #endif</span>
+
  <span id="line20">20. #endif</span>
  <span id="line21">21.   </span>
+
  <span id="line21">21. </span>
  <span id="line22">22.   #ifdef STATUS_VIA_WINDOWPORT</span>
+
  <span id="line22">22. #ifdef STATUS_VIA_WINDOWPORT</span>
  <span id="line23">23.   #if 0</span>
+
  <span id="line23">23. #if 0</span>
  <span id="line24">24.   /* clang-format off */</span>
+
  <span id="line24">24. /* clang-format off */</span>
  <span id="line25">25.   #define BL_FLUSH        -1</span>
+
  <span id="line25">25. #define BL_FLUSH        -1</span>
  <span id="line26">26.   #define BL_TITLE        0</span>
+
  <span id="line26">26. #define BL_TITLE        0</span>
  <span id="line27">27.   #define BL_STR          1</span>
+
  <span id="line27">27. #define BL_STR          1</span>
  <span id="line28">28.   #define BL_DX          2</span>
+
  <span id="line28">28. #define BL_DX          2</span>
  <span id="line29">29.   #define BL_CO          3</span>
+
  <span id="line29">29. #define BL_CO          3</span>
  <span id="line30">30.   #define BL_IN          4</span>
+
  <span id="line30">30. #define BL_IN          4</span>
  <span id="line31">31.   #define BL_WI          5</span>
+
  <span id="line31">31. #define BL_WI          5</span>
  <span id="line32">32.   #define BL_CH          6</span>
+
  <span id="line32">32. #define BL_CH          6</span>
  <span id="line33">33.   #define BL_ALIGN        7</span>
+
  <span id="line33">33. #define BL_ALIGN        7</span>
  <span id="line34">34.   #define BL_SCORE        8</span>
+
  <span id="line34">34. #define BL_SCORE        8</span>
  <span id="line35">35.   #define BL_CAP          9</span>
+
  <span id="line35">35. #define BL_CAP          9</span>
  <span id="line36">36.   #define BL_GOLD        10</span>
+
  <span id="line36">36. #define BL_GOLD        10</span>
  <span id="line37">37.   #define BL_ENE          11</span>
+
  <span id="line37">37. #define BL_ENE          11</span>
  <span id="line38">38.   #define BL_ENEMAX      12</span>
+
  <span id="line38">38. #define BL_ENEMAX      12</span>
  <span id="line39">39.   #define BL_XP          13</span>
+
  <span id="line39">39. #define BL_XP          13</span>
  <span id="line40">40.   #define BL_AC          14</span>
+
  <span id="line40">40. #define BL_AC          14</span>
  <span id="line41">41.   #define BL_HD          15</span>
+
  <span id="line41">41. #define BL_HD          15</span>
  <span id="line42">42.   #define BL_TIME        16</span>
+
  <span id="line42">42. #define BL_TIME        16</span>
  <span id="line43">43.   #define BL_HUNGER      17</span>
+
  <span id="line43">43. #define BL_HUNGER      17</span>
  <span id="line44">44.   #define BL_HP          18</span>
+
  <span id="line44">44. #define BL_HP          18</span>
  <span id="line45">45.   #define BL_HPMAX        19</span>
+
  <span id="line45">45. #define BL_HPMAX        19</span>
  <span id="line46">46.   #define BL_LEVELDESC    20</span>
+
  <span id="line46">46. #define BL_LEVELDESC    20</span>
  <span id="line47">47.   #define BL_EXP          21</span>
+
  <span id="line47">47. #define BL_EXP          21</span>
  <span id="line48">48.   #define BL_CONDITION    22</span>
+
  <span id="line48">48. #define BL_CONDITION    22</span>
  <span id="line49">49.   /* clang-format on */</span>
+
  <span id="line49">49. /* clang-format on */</span>
  <span id="line50">50.   </span>
+
  <span id="line50">50. </span>
  <span id="line51">51.   #else</span>
+
  <span id="line51">51. #else</span>
  <span id="line52">52.   enum statusfields { BL_FLUSH = -1, BL_TITLE = 0, BL_STR, BL_DX, BL_CO, BL_IN,</span>
+
  <span id="line52">52. enum statusfields { BL_FLUSH = -1, BL_TITLE = 0, BL_STR, BL_DX, BL_CO, BL_IN,</span>
  <span id="line53">53.   BL_WI, BL_CH, BL_ALIGN, BL_SCORE, BL_CAP, BL_GOLD, BL_ENE, BL_ENEMAX,</span>
+
  <span id="line53">53. BL_WI, BL_CH, BL_ALIGN, BL_SCORE, BL_CAP, BL_GOLD, BL_ENE, BL_ENEMAX,</span>
  <span id="line54">54.   BL_XP, BL_AC, BL_HD, BL_TIME, BL_HUNGER, BL_HP, BL_HPMAX, BL_LEVELDESC,</span>
+
  <span id="line54">54. BL_XP, BL_AC, BL_HD, BL_TIME, BL_HUNGER, BL_HP, BL_HPMAX, BL_LEVELDESC,</span>
  <span id="line55">55.   BL_EXP, BL_CONDITION };</span>
+
  <span id="line55">55. BL_EXP, BL_CONDITION };</span>
  <span id="line56">56.   #define MAXBLSTATS      BL_CONDITION+1</span>
+
  <span id="line56">56. #define MAXBLSTATS      BL_CONDITION+1</span>
  <span id="line57">57.   </span>
+
  <span id="line57">57. </span>
  <span id="line58">58.   #define BEFORE  0</span>
+
  <span id="line58">58. #define BEFORE  0</span>
  <span id="line59">59.   #define NOW    1</span>
+
  <span id="line59">59. #define NOW    1</span>
  <span id="line60">60.   #endif</span>
+
  <span id="line60">60. #endif</span>
  <span id="line61">61.   </span>
+
  <span id="line61">61. </span>
  <span id="line62">62.   /* Boolean condition bits for the condition mask */</span>
+
  <span id="line62">62. /* Boolean condition bits for the condition mask */</span>
  <span id="line63">63.   </span>
+
  <span id="line63">63. </span>
  <span id="line64">64.   /* clang-format off */</span>
+
  <span id="line64">64. /* clang-format off */</span>
  <span id="line65">65.   #define BL_MASK_BLIND          0x00000001L</span>
+
  <span id="line65">65. #define BL_MASK_BLIND          0x00000001L</span>
  <span id="line66">66.   #define BL_MASK_CONF            0x00000002L</span>
+
  <span id="line66">66. #define BL_MASK_CONF            0x00000002L</span>
  <span id="line67">67.   #define BL_MASK_FOODPOIS        0x00000004L</span>
+
  <span id="line67">67. #define BL_MASK_FOODPOIS        0x00000004L</span>
  <span id="line68">68.   #define BL_MASK_ILL            0x00000008L</span>
+
  <span id="line68">68. #define BL_MASK_ILL            0x00000008L</span>
  <span id="line69">69.   #define BL_MASK_HALLU          0x00000010L</span>
+
  <span id="line69">69. #define BL_MASK_HALLU          0x00000010L</span>
  <span id="line70">70.   #define BL_MASK_STUNNED        0x00000020L</span>
+
  <span id="line70">70. #define BL_MASK_STUNNED        0x00000020L</span>
  <span id="line71">71.   #define BL_MASK_SLIMED          0x00000040L</span>
+
  <span id="line71">71. #define BL_MASK_SLIMED          0x00000040L</span>
  <span id="line72">72.   /* clang-format on */</span>
+
  <span id="line72">72. /* clang-format on */</span>
  <span id="line73">73.   </span>
+
  <span id="line73">73. </span>
  <span id="line74">74.   #define REASSESS_ONLY TRUE</span>
+
  <span id="line74">74. #define REASSESS_ONLY TRUE</span>
  <span id="line75">75.   </span>
+
  <span id="line75">75. </span>
  <span id="line76">76.   #ifdef STATUS_HILITES</span>
+
  <span id="line76">76. #ifdef STATUS_HILITES</span>
  <span id="line77">77.   /* hilite status field behavior - coloridx values */</span>
+
  <span id="line77">77. /* hilite status field behavior - coloridx values */</span>
  <span id="line78">78.   #define BL_HILITE_NONE -1    /* no hilite of this field */</span>
+
  <span id="line78">78. #define BL_HILITE_NONE -1    /* no hilite of this field */</span>
  <span id="line79">79.   #define BL_HILITE_INVERSE -2 /* inverse hilite */</span>
+
  <span id="line79">79. #define BL_HILITE_INVERSE -2 /* inverse hilite */</span>
  <span id="line80">80.   #define BL_HILITE_BOLD -3    /* bold hilite */</span>
+
  <span id="line80">80. #define BL_HILITE_BOLD -3    /* bold hilite */</span>
  <span id="line81">81.                               /* or any CLR_ index (0 - 15) */</span>
+
  <span id="line81">81.                             /* or any CLR_ index (0 - 15) */</span>
  <span id="line82">82.   #define BL_TH_NONE 0</span>
+
  <span id="line82">82. #define BL_TH_NONE 0</span>
  <span id="line83">83.   #define BL_TH_VAL_PERCENTAGE 100 /* threshold is percentage */</span>
+
  <span id="line83">83. #define BL_TH_VAL_PERCENTAGE 100 /* threshold is percentage */</span>
  <span id="line84">84.   #define BL_TH_VAL_ABSOLUTE 101  /* threshold is particular value */</span>
+
  <span id="line84">84. #define BL_TH_VAL_ABSOLUTE 101  /* threshold is particular value */</span>
  <span id="line85">85.   #define BL_TH_UPDOWN 102        /* threshold is up or down change */</span>
+
  <span id="line85">85. #define BL_TH_UPDOWN 102        /* threshold is up or down change */</span>
  <span id="line86">86.   #define BL_TH_CONDITION 103      /* threshold is bitmask of conditions */</span>
+
  <span id="line86">86. #define BL_TH_CONDITION 103      /* threshold is bitmask of conditions */</span>
  <span id="line87">87.   #endif</span>
+
  <span id="line87">87. #endif</span>
  <span id="line88">88.   </span>
+
  <span id="line88">88. </span>
  <span id="line89">89.   extern const char *status_fieldnames[]; /* in botl.c */</span>
+
  <span id="line89">89. extern const char *status_fieldnames[]; /* in botl.c */</span>
  <span id="line90">90.   #endif</span>
+
  <span id="line90">90. #endif</span>
  <span id="line91">91.   </span>
+
  <span id="line91">91. </span>
  <span id="line92">92.   #endif /* BOTL_H */</span>
+
  <span id="line92">92. #endif /* BOTL_H */</span>
 
[[Category:NetHack 3.6.0 source code|include/botl.h]]
 
[[Category:NetHack 3.6.0 source code|include/botl.h]]

Latest revision as of 13:13, 15 December 2015

Below is the full text to botl.h from the source code of NetHack 3.6.0. To link to a particular line, write [[Source:NetHack 3.6.0/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.

 /* NetHack 3.6  botl.h  $NHDT-Date: 1433105378 2015/05/31 20:49:38 $  $NHDT-Branch: status_hilite $:$NHDT-Revision: 1.14 $ */
 /* Copyright (c) Michael Allison, 2003                            */
 /* NetHack may be freely redistributed.  See license for details. */
 
 #ifndef BOTL_H
 #define BOTL_H
 
 /* MAXCO must hold longest uncompressed status line, and must be larger
  * than COLNO
  *
  * longest practical second status line at the moment is
  *	Astral Plane $:12345 HP:700(700) Pw:111(111) AC:-127 Xp:30/123456789
  *	T:123456 Satiated Conf FoodPois Ill Blind Stun Hallu Overloaded
  * -- or somewhat over 130 characters
  */
 #if COLNO <= 140
 #define MAXCO 160
 #else
 #define MAXCO (COLNO + 20)
 #endif
 
 #ifdef STATUS_VIA_WINDOWPORT
 #if 0
 /* clang-format off */
 #define BL_FLUSH        -1
 #define BL_TITLE        0
 #define BL_STR          1
 #define BL_DX           2
 #define BL_CO           3
 #define BL_IN           4
 #define BL_WI           5
 #define BL_CH           6
 #define BL_ALIGN        7
 #define BL_SCORE        8
 #define BL_CAP          9
 #define BL_GOLD         10
 #define BL_ENE          11
 #define BL_ENEMAX       12
 #define BL_XP           13
 #define BL_AC           14
 #define BL_HD           15
 #define BL_TIME         16
 #define BL_HUNGER       17
 #define BL_HP           18
 #define BL_HPMAX        19
 #define BL_LEVELDESC    20
 #define BL_EXP          21
 #define BL_CONDITION    22
 /* clang-format on */
 
 #else
 enum statusfields { BL_FLUSH = -1, BL_TITLE = 0, BL_STR, BL_DX, BL_CO, BL_IN,
 BL_WI, BL_CH, BL_ALIGN, BL_SCORE, BL_CAP, BL_GOLD, BL_ENE, BL_ENEMAX,
 BL_XP, BL_AC, BL_HD, BL_TIME, BL_HUNGER, BL_HP, BL_HPMAX, BL_LEVELDESC,
 BL_EXP, BL_CONDITION };
 #define MAXBLSTATS      BL_CONDITION+1
 
 #define BEFORE  0
 #define NOW     1
 #endif
 
 /* Boolean condition bits for the condition mask */
 
 /* clang-format off */
 #define BL_MASK_BLIND           0x00000001L
 #define BL_MASK_CONF            0x00000002L
 #define BL_MASK_FOODPOIS        0x00000004L
 #define BL_MASK_ILL             0x00000008L
 #define BL_MASK_HALLU           0x00000010L
 #define BL_MASK_STUNNED         0x00000020L
 #define BL_MASK_SLIMED          0x00000040L
 /* clang-format on */
 
 #define REASSESS_ONLY TRUE
 
 #ifdef STATUS_HILITES
 /* hilite status field behavior - coloridx values */
 #define BL_HILITE_NONE -1    /* no hilite of this field */
 #define BL_HILITE_INVERSE -2 /* inverse hilite */
 #define BL_HILITE_BOLD -3    /* bold hilite */
                              /* or any CLR_ index (0 - 15) */
 #define BL_TH_NONE 0
 #define BL_TH_VAL_PERCENTAGE 100 /* threshold is percentage */
 #define BL_TH_VAL_ABSOLUTE 101   /* threshold is particular value */
 #define BL_TH_UPDOWN 102         /* threshold is up or down change */
 #define BL_TH_CONDITION 103      /* threshold is bitmask of conditions */
 #endif
 
 extern const char *status_fieldnames[]; /* in botl.c */
 #endif
 
 #endif /* BOTL_H */