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

From NetHackWiki
Jump to navigation Jump to search
(Created page with "__MIXEDSYNTAXHIGHLIGHT__ Below is the full text to '''color.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 color.h $NHDT-Date: 1432512776 2015/05/25 00:12:56 $  $NHDT-Branch: master $:$NHDT-Revision: 1.13 $ */</span>
+
  <span id="line1">1. /* NetHack 3.6 color.h $NHDT-Date: 1432512776 2015/05/25 00:12:56 $  $NHDT-Branch: master $:$NHDT-Revision: 1.13 $ */</span>
  <span id="line2">2.   /* Copyright (c) Steve Linhart, Eric Raymond, 1989. */</span>
+
  <span id="line2">2. /* Copyright (c) Steve Linhart, Eric Raymond, 1989. */</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 COLOR_H</span>
+
  <span id="line5">5. #ifndef COLOR_H</span>
  <span id="line6">6.   #define COLOR_H</span>
+
  <span id="line6">6. #define COLOR_H</span>
  <span id="line7">7.   </span>
+
  <span id="line7">7. </span>
  <span id="line8">8.   /*</span>
+
  <span id="line8">8. /*</span>
  <span id="line9">9.     * The color scheme used is tailored for an IBM PC.  It consists of the</span>
+
  <span id="line9">9.  * The color scheme used is tailored for an IBM PC.  It consists of the</span>
  <span id="line10">10.   * standard 8 colors, followed by their bright counterparts.  There are</span>
+
  <span id="line10">10.  * standard 8 colors, followed by their bright counterparts.  There are</span>
  <span id="line11">11.   * exceptions, these are listed below. Bright black doesn't mean very</span>
+
  <span id="line11">11.  * exceptions, these are listed below. Bright black doesn't mean very</span>
  <span id="line12">12.   * much, so it is used as the "default" foreground color of the screen.</span>
+
  <span id="line12">12.  * much, so it is used as the "default" foreground color of the screen.</span>
  <span id="line13">13.   */</span>
+
  <span id="line13">13.  */</span>
  <span id="line14">14.   #define CLR_BLACK 0</span>
+
  <span id="line14">14. #define CLR_BLACK 0</span>
  <span id="line15">15.   #define CLR_RED 1</span>
+
  <span id="line15">15. #define CLR_RED 1</span>
  <span id="line16">16.   #define CLR_GREEN 2</span>
+
  <span id="line16">16. #define CLR_GREEN 2</span>
  <span id="line17">17.   #define CLR_BROWN 3 /* on IBM, low-intensity yellow is brown */</span>
+
  <span id="line17">17. #define CLR_BROWN 3 /* on IBM, low-intensity yellow is brown */</span>
  <span id="line18">18.   #define CLR_BLUE 4</span>
+
  <span id="line18">18. #define CLR_BLUE 4</span>
  <span id="line19">19.   #define CLR_MAGENTA 5</span>
+
  <span id="line19">19. #define CLR_MAGENTA 5</span>
  <span id="line20">20.   #define CLR_CYAN 6</span>
+
  <span id="line20">20. #define CLR_CYAN 6</span>
  <span id="line21">21.   #define CLR_GRAY 7 /* low-intensity white */</span>
+
  <span id="line21">21. #define CLR_GRAY 7 /* low-intensity white */</span>
  <span id="line22">22.   #define NO_COLOR 8</span>
+
  <span id="line22">22. #define NO_COLOR 8</span>
  <span id="line23">23.   #define CLR_ORANGE 9</span>
+
  <span id="line23">23. #define CLR_ORANGE 9</span>
  <span id="line24">24.   #define CLR_BRIGHT_GREEN 10</span>
+
  <span id="line24">24. #define CLR_BRIGHT_GREEN 10</span>
  <span id="line25">25.   #define CLR_YELLOW 11</span>
+
  <span id="line25">25. #define CLR_YELLOW 11</span>
  <span id="line26">26.   #define CLR_BRIGHT_BLUE 12</span>
+
  <span id="line26">26. #define CLR_BRIGHT_BLUE 12</span>
  <span id="line27">27.   #define CLR_BRIGHT_MAGENTA 13</span>
+
  <span id="line27">27. #define CLR_BRIGHT_MAGENTA 13</span>
  <span id="line28">28.   #define CLR_BRIGHT_CYAN 14</span>
+
  <span id="line28">28. #define CLR_BRIGHT_CYAN 14</span>
  <span id="line29">29.   #define CLR_WHITE 15</span>
+
  <span id="line29">29. #define CLR_WHITE 15</span>
  <span id="line30">30.   #define CLR_MAX 16</span>
+
  <span id="line30">30. #define CLR_MAX 16</span>
  <span id="line31">31.   </span>
+
  <span id="line31">31. </span>
  <span id="line32">32.   /* The "half-way" point for tty based color systems.  This is used in */</span>
+
  <span id="line32">32. /* The "half-way" point for tty based color systems.  This is used in */</span>
  <span id="line33">33.   /* the tty color setup code.  (IMHO, it should be removed - dean).    */</span>
+
  <span id="line33">33. /* the tty color setup code.  (IMHO, it should be removed - dean).    */</span>
  <span id="line34">34.   #define BRIGHT 8</span>
+
  <span id="line34">34. #define BRIGHT 8</span>
  <span id="line35">35.   </span>
+
  <span id="line35">35. </span>
  <span id="line36">36.   /* these can be configured */</span>
+
  <span id="line36">36. /* these can be configured */</span>
  <span id="line37">37.   #define HI_OBJ CLR_MAGENTA</span>
+
  <span id="line37">37. #define HI_OBJ CLR_MAGENTA</span>
  <span id="line38">38.   #define HI_METAL CLR_CYAN</span>
+
  <span id="line38">38. #define HI_METAL CLR_CYAN</span>
  <span id="line39">39.   #define HI_COPPER CLR_YELLOW</span>
+
  <span id="line39">39. #define HI_COPPER CLR_YELLOW</span>
  <span id="line40">40.   #define HI_SILVER CLR_GRAY</span>
+
  <span id="line40">40. #define HI_SILVER CLR_GRAY</span>
  <span id="line41">41.   #define HI_GOLD CLR_YELLOW</span>
+
  <span id="line41">41. #define HI_GOLD CLR_YELLOW</span>
  <span id="line42">42.   #define HI_LEATHER CLR_BROWN</span>
+
  <span id="line42">42. #define HI_LEATHER CLR_BROWN</span>
  <span id="line43">43.   #define HI_CLOTH CLR_BROWN</span>
+
  <span id="line43">43. #define HI_CLOTH CLR_BROWN</span>
  <span id="line44">44.   #define HI_ORGANIC CLR_BROWN</span>
+
  <span id="line44">44. #define HI_ORGANIC CLR_BROWN</span>
  <span id="line45">45.   #define HI_WOOD CLR_BROWN</span>
+
  <span id="line45">45. #define HI_WOOD CLR_BROWN</span>
  <span id="line46">46.   #define HI_PAPER CLR_WHITE</span>
+
  <span id="line46">46. #define HI_PAPER CLR_WHITE</span>
  <span id="line47">47.   #define HI_GLASS CLR_BRIGHT_CYAN</span>
+
  <span id="line47">47. #define HI_GLASS CLR_BRIGHT_CYAN</span>
  <span id="line48">48.   #define HI_MINERAL CLR_GRAY</span>
+
  <span id="line48">48. #define HI_MINERAL CLR_GRAY</span>
  <span id="line49">49.   #define DRAGON_SILVER CLR_BRIGHT_CYAN</span>
+
  <span id="line49">49. #define DRAGON_SILVER CLR_BRIGHT_CYAN</span>
  <span id="line50">50.   #define HI_ZAP CLR_BRIGHT_BLUE</span>
+
  <span id="line50">50. #define HI_ZAP CLR_BRIGHT_BLUE</span>
  <span id="line51">51.   </span>
+
  <span id="line51">51. </span>
  <span id="line52">52.   struct menucoloring {</span>
+
  <span id="line52">52. struct menucoloring {</span>
  <span id="line53">53.       struct nhregex *match;</span>
+
  <span id="line53">53.     struct nhregex *match;</span>
  <span id="line54">54.       char *origstr;</span>
+
  <span id="line54">54.     char *origstr;</span>
  <span id="line55">55.       int color, attr;</span>
+
  <span id="line55">55.     int color, attr;</span>
  <span id="line56">56.       struct menucoloring *next;</span>
+
  <span id="line56">56.     struct menucoloring *next;</span>
  <span id="line57">57.   };</span>
+
  <span id="line57">57. };</span>
  <span id="line58">58.   </span>
+
  <span id="line58">58. </span>
  <span id="line59">59.   #endif /* COLOR_H */</span>
+
  <span id="line59">59. #endif /* COLOR_H */</span>
 
[[Category:NetHack 3.6.0 source code|include/color.h]]
 
[[Category:NetHack 3.6.0 source code|include/color.h]]

Latest revision as of 13:14, 15 December 2015

Below is the full text to color.h from the source code of NetHack 3.6.0. To link to a particular line, write [[Source:NetHack 3.6.0/include/color.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	color.h	$NHDT-Date: 1432512776 2015/05/25 00:12:56 $  $NHDT-Branch: master $:$NHDT-Revision: 1.13 $ */
 /* Copyright (c) Steve Linhart, Eric Raymond, 1989. */
 /* NetHack may be freely redistributed.  See license for details. */
 
 #ifndef COLOR_H
 #define COLOR_H
 
 /*
  * The color scheme used is tailored for an IBM PC.  It consists of the
  * standard 8 colors, followed by their bright counterparts.  There are
  * exceptions, these are listed below.	Bright black doesn't mean very
  * much, so it is used as the "default" foreground color of the screen.
  */
 #define CLR_BLACK 0
 #define CLR_RED 1
 #define CLR_GREEN 2
 #define CLR_BROWN 3 /* on IBM, low-intensity yellow is brown */
 #define CLR_BLUE 4
 #define CLR_MAGENTA 5
 #define CLR_CYAN 6
 #define CLR_GRAY 7 /* low-intensity white */
 #define NO_COLOR 8
 #define CLR_ORANGE 9
 #define CLR_BRIGHT_GREEN 10
 #define CLR_YELLOW 11
 #define CLR_BRIGHT_BLUE 12
 #define CLR_BRIGHT_MAGENTA 13
 #define CLR_BRIGHT_CYAN 14
 #define CLR_WHITE 15
 #define CLR_MAX 16
 
 /* The "half-way" point for tty based color systems.  This is used in */
 /* the tty color setup code.  (IMHO, it should be removed - dean).    */
 #define BRIGHT 8
 
 /* these can be configured */
 #define HI_OBJ CLR_MAGENTA
 #define HI_METAL CLR_CYAN
 #define HI_COPPER CLR_YELLOW
 #define HI_SILVER CLR_GRAY
 #define HI_GOLD CLR_YELLOW
 #define HI_LEATHER CLR_BROWN
 #define HI_CLOTH CLR_BROWN
 #define HI_ORGANIC CLR_BROWN
 #define HI_WOOD CLR_BROWN
 #define HI_PAPER CLR_WHITE
 #define HI_GLASS CLR_BRIGHT_CYAN
 #define HI_MINERAL CLR_GRAY
 #define DRAGON_SILVER CLR_BRIGHT_CYAN
 #define HI_ZAP CLR_BRIGHT_BLUE
 
 struct menucoloring {
     struct nhregex *match;
     char *origstr;
     int color, attr;
     struct menucoloring *next;
 };
 
 #endif /* COLOR_H */