OSDN Git Service

[Refactor] #39962 コメント調整 / Adjusted comments
[hengband/hengband.git] / src / term.h
1 #pragma once
2
3 /*
4  * Angband "attributes" (with symbols, and base (R,G,B) codes)
5  *
6  * The "(R,G,B)" codes are given in "fourths" of the "maximal" value,
7  * and should "gamma corrected" on most (non-Macintosh) machines.
8  */
9 #define TERM_DARK                0  /*!< 'd' - 黒 0,0,0 */
10 #define TERM_WHITE               1  /*!< 'w' - 白 4,4,4 */
11 #define TERM_SLATE               2  /*!< 's' - 灰 2,2,2 */
12 #define TERM_ORANGE              3  /*!< 'o' - 橙 4,2,0 */
13 #define TERM_RED                 4  /*!< 'r' - 赤 3,0,0 */
14 #define TERM_GREEN               5  /*!< 'g' - 緑 0,2,1 */
15 #define TERM_BLUE                6  /*!< 'b' - 青 0,0,4 */
16 #define TERM_UMBER               7  /*!< 'u' - 琥珀 2,1,0 */
17 #define TERM_L_DARK              8  /*!< 'D' - 暗い灰 1,1,1 */
18 #define TERM_L_WHITE             9  /*!< 'W' - 明るい灰 3,3,3 */
19 #define TERM_VIOLET             10  /*!< 'v' - 紫 4,0,4 */
20 #define TERM_YELLOW             11  /*!< 'y' - 黄 4,4,0 */
21 #define TERM_L_RED              12  /*!< 'R' - 明るい赤 4,0,0 */
22 #define TERM_L_GREEN            13  /*!< 'G' - 明るい緑 0,4,0 */
23 #define TERM_L_BLUE             14  /*!< 'B' - 明るい青 0,4,4 */
24 #define TERM_L_UMBER            15  /*!< 'U' - 明るい琥珀 3,2,1 */
25
26  /*** Macro Definitions ***/
27  /*
28   * Convert an "attr"/"char" pair into a "pict" (P)
29   */
30 #define PICT(A,C) \
31         ((((u16b)(A)) << 8) | ((byte)(C)))
32
33   /*
34    * Convert a "pict" (P) into an "attr" (A)
35    */
36 #define PICT_A(P) \
37         ((byte)((P) >> 8))
38
39    /*
40         * Convert a "pict" (P) into an "char" (C)
41         */
42 #define PICT_C(P) \
43         ((char)((byte)(P)))
44
45 extern const concptr color_names[16];
46 extern const concptr window_flag_desc[32];
47 extern const concptr ident_info[];
48 extern const concptr color_char;
49
50 extern term *angband_term[8];
51
52 extern TERM_COLOR misc_to_attr[256];
53 extern SYMBOL_CODE misc_to_char[256];
54 extern TERM_COLOR tval_to_attr[128];
55 extern SYMBOL_CODE tval_to_char[128];
56
57 extern const char angband_term_name[8][16];
58 extern byte angband_color_table[256][4];
59
60 TERM_COLOR mh_attr(int max);
61 TERM_COLOR spell_color(EFFECT_ID type);
62 u16b bolt_pict(POSITION y, POSITION x, POSITION ny, POSITION nx, EFFECT_ID typ);
63
64 extern TERM_COLOR gf_color[MAX_GF];
65 extern TERM_COLOR color_char_to_attr(SYMBOL_CODE c);