OSDN Git Service

[Refactor] #37353 PICT, PICT_A, PICT_C を term.h へ移動.
[hengband/hengband.git] / src / term.h
1 #pragma once
2
3 #include "spells.h"
4
5 /*
6  * Angband "attributes" (with symbols, and base (R,G,B) codes)
7  *
8  * The "(R,G,B)" codes are given in "fourths" of the "maximal" value,
9  * and should "gamma corrected" on most (non-Macintosh) machines.
10  */
11 #define TERM_DARK                0  /*!< 'd' - 黒 0,0,0 */
12 #define TERM_WHITE               1  /*!< 'w' - 白 4,4,4 */
13 #define TERM_SLATE               2  /*!< 's' - 灰 2,2,2 */
14 #define TERM_ORANGE              3  /*!< 'o' - 橙 4,2,0 */
15 #define TERM_RED                 4  /*!< 'r' - 赤 3,0,0 */
16 #define TERM_GREEN               5  /*!< 'g' - 緑 0,2,1 */
17 #define TERM_BLUE                6  /*!< 'b' - 青 0,0,4 */
18 #define TERM_UMBER               7  /*!< 'u' - 琥珀 2,1,0 */
19 #define TERM_L_DARK              8  /*!< 'D' - 暗い灰 1,1,1 */
20 #define TERM_L_WHITE             9  /*!< 'W' - 明るい灰 3,3,3 */
21 #define TERM_VIOLET             10  /*!< 'v' - 紫 4,0,4 */
22 #define TERM_YELLOW             11  /*!< 'y' - 黄 4,4,0 */
23 #define TERM_L_RED              12  /*!< 'R' - 明るい赤 4,0,0 */
24 #define TERM_L_GREEN            13  /*!< 'G' - 明るい緑 0,4,0 */
25 #define TERM_L_BLUE             14  /*!< 'B' - 明るい青 0,4,4 */
26 #define TERM_L_UMBER            15  /*!< 'U' - 明るい琥珀 3,2,1 */
27
28  /*** Macro Definitions ***/
29  /*
30   * Convert an "attr"/"char" pair into a "pict" (P)
31   */
32 #define PICT(A,C) \
33         ((((u16b)(A)) << 8) | ((byte)(C)))
34
35   /*
36    * Convert a "pict" (P) into an "attr" (A)
37    */
38 #define PICT_A(P) \
39         ((byte)((P) >> 8))
40
41    /*
42         * Convert a "pict" (P) into an "char" (C)
43         */
44 #define PICT_C(P) \
45         ((char)((byte)(P)))
46
47 extern const concptr color_names[16];
48 extern const concptr window_flag_desc[32];
49 extern const concptr ident_info[];
50 extern const concptr color_char;
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);