From dbef4b71d13e3120239a2ce332866981b7d0833f Mon Sep 17 00:00:00 2001 From: deskull Date: Tue, 21 May 2019 00:13:27 +0900 Subject: [PATCH] =?utf8?q?[Refactor]=20#37353=E3=80=80TERM=5F*=20=E5=AE=9A?= =?utf8?q?=E7=BE=A9=E3=82=92=20term.h=20=E3=81=B8=E7=A7=BB=E5=8B=95?= =?utf8?q?=EF=BC=8E?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- src/autopick.c | 1 + src/birth.c | 1 + src/cmd-basic.c | 1 + src/cmd-magiceat.c | 1 + src/cmd-smith.c | 1 + src/defines.h | 25 ------------------------- src/grid.c | 1 + src/monster1.c | 1 + src/object2.c | 1 + src/player-effects.c | 1 + src/scores.c | 1 + src/shoot.c | 1 + src/snipe.c | 1 + src/spells3.c | 1 + src/targeting.c | 1 + src/term.h | 23 +++++++++++++++++++++++ src/util.c | 1 + src/wizard1.c | 1 + src/wizard2.c | 1 + src/z-term.c | 1 + 20 files changed, 41 insertions(+), 25 deletions(-) diff --git a/src/autopick.c b/src/autopick.c index 82268b625..348f9d3d0 100644 --- a/src/autopick.c +++ b/src/autopick.c @@ -13,6 +13,7 @@ #include "angband.h" #include "util.h" +#include "term.h" #include "autopick.h" #include "core.h" diff --git a/src/birth.c b/src/birth.c index df52e8d0f..296f64c09 100644 --- a/src/birth.c +++ b/src/birth.c @@ -15,6 +15,7 @@ #include "util.h" #include "bldg.h" #include "core.h" +#include "term.h" #include "artifact.h" #include "avatar.h" diff --git a/src/cmd-basic.c b/src/cmd-basic.c index cf16bd1f5..113dd132c 100644 --- a/src/cmd-basic.c +++ b/src/cmd-basic.c @@ -13,6 +13,7 @@ #include "angband.h" #include "util.h" #include "core.h" +#include "term.h" #include "cmd-dump.h" #include "chest.h" diff --git a/src/cmd-magiceat.c b/src/cmd-magiceat.c index 2840265fe..350bc8efe 100644 --- a/src/cmd-magiceat.c +++ b/src/cmd-magiceat.c @@ -54,6 +54,7 @@ #include "angband.h" #include "util.h" +#include "term.h" #include "cmd-basic.h" #include "cmd-usestaff.h" diff --git a/src/cmd-smith.c b/src/cmd-smith.c index 4d6c532f7..3df5eca4a 100644 --- a/src/cmd-smith.c +++ b/src/cmd-smith.c @@ -1,5 +1,6 @@ #include "angband.h" #include "util.h" +#include "term.h" #include "object-flavor.h" #include "object-hook.h" diff --git a/src/defines.h b/src/defines.h index 78d674a25..38a511c6b 100644 --- a/src/defines.h +++ b/src/defines.h @@ -2416,31 +2416,6 @@ extern int PlayerUID; /*** Color constants ***/ - -/* - * Angband "attributes" (with symbols, and base (R,G,B) codes) - * - * The "(R,G,B)" codes are given in "fourths" of the "maximal" value, - * and should "gamma corrected" on most (non-Macintosh) machines. - */ -#define TERM_DARK 0 /*!< 'd' - 黒 0,0,0 */ -#define TERM_WHITE 1 /*!< 'w' - 白 4,4,4 */ -#define TERM_SLATE 2 /*!< 's' - 灰 2,2,2 */ -#define TERM_ORANGE 3 /*!< 'o' - 橙 4,2,0 */ -#define TERM_RED 4 /*!< 'r' - 赤 3,0,0 */ -#define TERM_GREEN 5 /*!< 'g' - 緑 0,2,1 */ -#define TERM_BLUE 6 /*!< 'b' - 青 0,0,4 */ -#define TERM_UMBER 7 /*!< 'u' - 琥珀 2,1,0 */ -#define TERM_L_DARK 8 /*!< 'D' - 暗い灰 1,1,1 */ -#define TERM_L_WHITE 9 /*!< 'W' - 明るい灰 3,3,3 */ -#define TERM_VIOLET 10 /*!< 'v' - 紫 4,0,4 */ -#define TERM_YELLOW 11 /*!< 'y' - 黄 4,4,0 */ -#define TERM_L_RED 12 /*!< 'R' - 明るい赤 4,0,0 */ -#define TERM_L_GREEN 13 /*!< 'G' - 明るい緑 0,4,0 */ -#define TERM_L_BLUE 14 /*!< 'B' - 明るい青 0,4,4 */ -#define TERM_L_UMBER 15 /*!< 'U' - 明るい琥珀 3,2,1 */ - - /* * Not using graphical tiles for this feature? */ diff --git a/src/grid.c b/src/grid.c index 3274a28e5..068a9d02f 100644 --- a/src/grid.c +++ b/src/grid.c @@ -19,6 +19,7 @@ #include "angband.h" #include "util.h" +#include "term.h" #include "floor.h" #include "world.h" diff --git a/src/monster1.c b/src/monster1.c index 63bf7a3da..9e13238e8 100644 --- a/src/monster1.c +++ b/src/monster1.c @@ -12,6 +12,7 @@ #include "angband.h" #include "util.h" +#include "term.h" #include "cmd-dump.h" #include "bldg.h" diff --git a/src/object2.c b/src/object2.c index 4f3d87bf7..0648a9a0a 100644 --- a/src/object2.c +++ b/src/object2.c @@ -14,6 +14,7 @@ #include "angband.h" #include "util.h" #include "world.h" +#include "term.h" #include "object.h" diff --git a/src/player-effects.c b/src/player-effects.c index 9d9e93622..6798b7cee 100644 --- a/src/player-effects.c +++ b/src/player-effects.c @@ -13,6 +13,7 @@ */ #include "angband.h" +#include "term.h" #include "core.h" #include "util.h" diff --git a/src/scores.c b/src/scores.c index fa9b89024..56ab5505e 100644 --- a/src/scores.c +++ b/src/scores.c @@ -11,6 +11,7 @@ */ #include "angband.h" +#include "term.h" #include "util.h" #include "core.h" diff --git a/src/shoot.c b/src/shoot.c index cf3fd5b69..1c31351d1 100644 --- a/src/shoot.c +++ b/src/shoot.c @@ -1,6 +1,7 @@ #include "angband.h" #include "core.h" #include "util.h" +#include "term.h" #include "monster.h" #include "monster-status.h" diff --git a/src/snipe.c b/src/snipe.c index 643674f72..65153255e 100644 --- a/src/snipe.c +++ b/src/snipe.c @@ -9,6 +9,7 @@ #include "angband.h" #include "core.h" #include "util.h" +#include "term.h" #include "player-status.h" #include "cmd-basic.h" diff --git a/src/spells3.c b/src/spells3.c index 035c3828e..3f8c871c3 100644 --- a/src/spells3.c +++ b/src/spells3.c @@ -14,6 +14,7 @@ #include "angband.h" #include "bldg.h" #include "core.h" +#include "term.h" #include "util.h" #include "creature.h" diff --git a/src/targeting.c b/src/targeting.c index f55cedd33..5964e3235 100644 --- a/src/targeting.c +++ b/src/targeting.c @@ -14,6 +14,7 @@ #include "angband.h" #include "util.h" #include "core.h" +#include "term.h" #include "targeting.h" #include "bldg.h" diff --git a/src/term.h b/src/term.h index 9c2e504cb..730019c82 100644 --- a/src/term.h +++ b/src/term.h @@ -2,6 +2,29 @@ #include "spells.h" +/* + * Angband "attributes" (with symbols, and base (R,G,B) codes) + * + * The "(R,G,B)" codes are given in "fourths" of the "maximal" value, + * and should "gamma corrected" on most (non-Macintosh) machines. + */ +#define TERM_DARK 0 /*!< 'd' - 黒 0,0,0 */ +#define TERM_WHITE 1 /*!< 'w' - 白 4,4,4 */ +#define TERM_SLATE 2 /*!< 's' - 灰 2,2,2 */ +#define TERM_ORANGE 3 /*!< 'o' - 橙 4,2,0 */ +#define TERM_RED 4 /*!< 'r' - 赤 3,0,0 */ +#define TERM_GREEN 5 /*!< 'g' - 緑 0,2,1 */ +#define TERM_BLUE 6 /*!< 'b' - 青 0,0,4 */ +#define TERM_UMBER 7 /*!< 'u' - 琥珀 2,1,0 */ +#define TERM_L_DARK 8 /*!< 'D' - 暗い灰 1,1,1 */ +#define TERM_L_WHITE 9 /*!< 'W' - 明るい灰 3,3,3 */ +#define TERM_VIOLET 10 /*!< 'v' - 紫 4,0,4 */ +#define TERM_YELLOW 11 /*!< 'y' - 黄 4,4,0 */ +#define TERM_L_RED 12 /*!< 'R' - 明るい赤 4,0,0 */ +#define TERM_L_GREEN 13 /*!< 'G' - 明るい緑 0,4,0 */ +#define TERM_L_BLUE 14 /*!< 'B' - 明るい青 0,4,4 */ +#define TERM_L_UMBER 15 /*!< 'U' - 明るい琥珀 3,2,1 */ + extern const concptr color_names[16]; extern const concptr window_flag_desc[32]; extern const concptr ident_info[]; diff --git a/src/util.c b/src/util.c index 26c7944bc..aca90e605 100644 --- a/src/util.c +++ b/src/util.c @@ -12,6 +12,7 @@ #include "angband.h" #include "core.h" +#include "term.h" #include "util.h" #include "files.h" #include "monsterrace-hook.h" diff --git a/src/wizard1.c b/src/wizard1.c index 4d5347aca..47aee6a06 100644 --- a/src/wizard1.c +++ b/src/wizard1.c @@ -12,6 +12,7 @@ #include "angband.h" #include "util.h" +#include "term.h" #include "artifact.h" #include "sort.h" diff --git a/src/wizard2.c b/src/wizard2.c index 59cce03c2..21c8c267b 100644 --- a/src/wizard2.c +++ b/src/wizard2.c @@ -12,6 +12,7 @@ #include "angband.h" #include "core.h" +#include "term.h" #include "dungeon.h" #include "cmd-dump.h" diff --git a/src/z-term.c b/src/z-term.c index 1baf28a73..3222ef192 100644 --- a/src/z-term.c +++ b/src/z-term.c @@ -11,6 +11,7 @@ /* Purpose: a generic, efficient, terminal window package -BEN- */ #include "angband.h" +#include "term.h" #include "z-term.h" #include "z-virt.h" -- 2.11.0