• R/O
  • HTTP
  • SSH
  • HTTPS

hengband: Commit

変愚蛮怒のメインリポジトリです


Commit MetaInfo

Revisiond66c187930d19a01c0656093dee52a2fe6200317 (tree)
Time2019-05-12 10:33:56
Authordeskull <deskull@user...>
Commiterdeskull

Log Message

[Refactor] #37353 angband_term_name と angband_color_table を term.c/h へ移動.

Change Summary

Incremental Difference

--- a/src/externs.h
+++ b/src/externs.h
@@ -101,8 +101,7 @@ extern STR_OFFSET quark__num;
101101 extern concptr *quark__str;
102102
103103 extern term *angband_term[8];
104-extern const char angband_term_name[8][16];
105-extern byte angband_color_table[256][4];
104+
106105 extern FLOOR_IDX max_floor_id;
107106 extern u32b saved_floor_file_sign;
108107 extern concptr keymap_act[KEYMAP_MODES][256];
--- a/src/main-win.c
+++ b/src/main-win.c
@@ -112,6 +112,7 @@
112112 #include "files.h"
113113 #include "core.h"
114114 #include "world.h"
115+#include "term.h"
115116
116117 #ifdef WINDOWS
117118 #include <windows.h>
--- a/src/report.c
+++ b/src/report.c
@@ -19,6 +19,7 @@
1919 #include "files.h"
2020 #include "world.h"
2121 #include "realm.h"
22+#include "term.h"
2223
2324 #ifdef WORLD_SCORE
2425
--- a/src/term.c
+++ b/src/term.c
@@ -6,6 +6,44 @@
66 #include "core.h"
77
88
9+/*
10+ * Standard window names
11+ */
12+const char angband_term_name[8][16] =
13+{
14+ "Hengband",
15+ "Term-1",
16+ "Term-2",
17+ "Term-3",
18+ "Term-4",
19+ "Term-5",
20+ "Term-6",
21+ "Term-7"
22+};
23+
24+/*
25+ * Global table of color definitions
26+ */
27+byte angband_color_table[256][4] =
28+{
29+ {0x00, 0x00, 0x00, 0x00}, /* TERM_DARK */
30+ {0x00, 0xFF, 0xFF, 0xFF}, /* TERM_WHITE */
31+ {0x00, 0x80, 0x80, 0x80}, /* TERM_SLATE */
32+ {0x00, 0xFF, 0x80, 0x00}, /* TERM_ORANGE */
33+ {0x00, 0xC0, 0x00, 0x00}, /* TERM_RED */
34+ {0x00, 0x00, 0x80, 0x40}, /* TERM_GREEN */
35+ {0x00, 0x00, 0x00, 0xFF}, /* TERM_BLUE */
36+ {0x00, 0x80, 0x40, 0x00}, /* TERM_UMBER */
37+ {0x00, 0x40, 0x40, 0x40}, /* TERM_L_DARK */
38+ {0x00, 0xC0, 0xC0, 0xC0}, /* TERM_L_WHITE */
39+ {0x00, 0xFF, 0x00, 0xFF}, /* TERM_VIOLET */
40+ {0x00, 0xFF, 0xFF, 0x00}, /* TERM_YELLOW */
41+ {0x00, 0xFF, 0x00, 0x00}, /* TERM_L_RED */
42+ {0x00, 0x00, 0xFF, 0x00}, /* TERM_L_GREEN */
43+ {0x00, 0x00, 0xFF, 0xFF}, /* TERM_L_BLUE */
44+ {0x00, 0xC0, 0x80, 0x40} /* TERM_L_UMBER */
45+};
46+
947 /*!
1048 * @brief 色名称テーブル / Hack -- the "basic" color names (see "TERM_xxx")
1149 */
--- a/src/term.h
+++ b/src/term.h
@@ -12,6 +12,9 @@ extern SYMBOL_CODE misc_to_char[256];
1212 extern TERM_COLOR tval_to_attr[128];
1313 extern SYMBOL_CODE tval_to_char[128];
1414
15+extern const char angband_term_name[8][16];
16+extern byte angband_color_table[256][4];
17+
1518 TERM_COLOR mh_attr(int max);
1619 TERM_COLOR spell_color(EFFECT_ID type);
1720 u16b bolt_pict(POSITION y, POSITION x, POSITION ny, POSITION nx, EFFECT_ID typ);
--- a/src/variable.c
+++ b/src/variable.c
@@ -137,45 +137,6 @@ concptr *quark__str;
137137 term *angband_term[8];
138138
139139 /*
140- * Standard window names
141- */
142-const char angband_term_name[8][16] =
143-{
144- "Hengband",
145- "Term-1",
146- "Term-2",
147- "Term-3",
148- "Term-4",
149- "Term-5",
150- "Term-6",
151- "Term-7"
152-};
153-
154-
155-/*
156- * Global table of color definitions
157- */
158-byte angband_color_table[256][4] =
159-{
160- {0x00, 0x00, 0x00, 0x00}, /* TERM_DARK */
161- {0x00, 0xFF, 0xFF, 0xFF}, /* TERM_WHITE */
162- {0x00, 0x80, 0x80, 0x80}, /* TERM_SLATE */
163- {0x00, 0xFF, 0x80, 0x00}, /* TERM_ORANGE */
164- {0x00, 0xC0, 0x00, 0x00}, /* TERM_RED */
165- {0x00, 0x00, 0x80, 0x40}, /* TERM_GREEN */
166- {0x00, 0x00, 0x00, 0xFF}, /* TERM_BLUE */
167- {0x00, 0x80, 0x40, 0x00}, /* TERM_UMBER */
168- {0x00, 0x40, 0x40, 0x40}, /* TERM_L_DARK */
169- {0x00, 0xC0, 0xC0, 0xC0}, /* TERM_L_WHITE */
170- {0x00, 0xFF, 0x00, 0xFF}, /* TERM_VIOLET */
171- {0x00, 0xFF, 0xFF, 0x00}, /* TERM_YELLOW */
172- {0x00, 0xFF, 0x00, 0x00}, /* TERM_L_RED */
173- {0x00, 0x00, 0xFF, 0x00}, /* TERM_L_GREEN */
174- {0x00, 0x00, 0xFF, 0xFF}, /* TERM_L_BLUE */
175- {0x00, 0xC0, 0x80, 0x40} /* TERM_L_UMBER */
176-};
177-
178-/*
179140 * Number of floor_id used from birth
180141 */
181142 FLOOR_IDX max_floor_id;
Show on old repository browser