• R/O
  • HTTP
  • SSH
  • HTTPS

hengband: Commit

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


Commit MetaInfo

Revision24c45cd85efb34f56c4df1a22b1cac85f12eaf3d (tree)
Time2019-06-07 02:02:13
Authordeskull <deskull@user...>
Commiterdeskull

Log Message

[Refactor] #37353 have_dark_flag() と have_lite_flag() を HAVE_DARK_FLAG() と HAVE_LITE_FLAG() に改名して object.h へ移動.

Change Summary

Incremental Difference

--- a/src/defines.h
+++ b/src/defines.h
@@ -140,11 +140,3 @@
140140 #else
141141 #define _(JAPANESE,ENGLISH) (ENGLISH)
142142 #endif
143-
144-/* Lite flag macro */
145-#define have_lite_flag(ARRAY) \
146- (have_flag(ARRAY, TR_LITE_1) || have_flag(ARRAY, TR_LITE_2) || have_flag(ARRAY, TR_LITE_3))
147-
148-#define have_dark_flag(ARRAY) \
149- (have_flag(ARRAY, TR_LITE_M1) || have_flag(ARRAY, TR_LITE_M2) || have_flag(ARRAY, TR_LITE_M3))
150-
--- a/src/files.c
+++ b/src/files.c
@@ -3094,12 +3094,12 @@ static void display_flag_aux(TERM_LEN row, TERM_LEN col, concptr header,
30943094 }
30953095 else if (flag1 == TR_LITE_1)
30963096 {
3097- if (have_dark_flag(flgs))
3097+ if (HAVE_DARK_FLAG(flgs))
30983098 {
30993099 c_put_str(TERM_L_DARK, "+", row, col);
31003100 header_color = TERM_WHITE;
31013101 }
3102- else if (have_lite_flag(flgs))
3102+ else if (HAVE_LITE_FLAG(flgs))
31033103 {
31043104 c_put_str(TERM_WHITE, "+", row, col);
31053105 header_color = TERM_WHITE;
--- a/src/object-flavor.c
+++ b/src/object-flavor.c
@@ -1089,13 +1089,13 @@ static char *get_ability_abbreviation(char *ptr, object_type *o_ptr, bool kanji,
10891089 }
10901090
10911091 /* Remove lite flags when this is a dark lite object */
1092- if (have_dark_flag(flgs))
1092+ if (HAVE_DARK_FLAG(flgs))
10931093 {
10941094 if (have_flag(flgs, TR_LITE_1)) remove_flag(flgs, TR_LITE_1);
10951095 if (have_flag(flgs, TR_LITE_2)) remove_flag(flgs, TR_LITE_2);
10961096 if (have_flag(flgs, TR_LITE_3)) remove_flag(flgs, TR_LITE_3);
10971097 }
1098- else if (have_lite_flag(flgs))
1098+ else if (HAVE_LITE_FLAG(flgs))
10991099 {
11001100 add_flag(flgs, TR_LITE_1);
11011101 if (have_flag(flgs, TR_LITE_2)) remove_flag(flgs, TR_LITE_2);
--- a/src/object.h
+++ b/src/object.h
@@ -178,6 +178,13 @@
178178 #define OBJ_GOLD_LIST 480 /* First "gold" entry */
179179 #define MAX_GOLD 18 /* Number of "gold" entries */
180180
181+/* Lite flag macro */
182+#define HAVE_LITE_FLAG(ARRAY) \
183+ (have_flag(ARRAY, TR_LITE_1) || have_flag(ARRAY, TR_LITE_2) || have_flag(ARRAY, TR_LITE_3))
184+
185+#define HAVE_DARK_FLAG(ARRAY) \
186+ (have_flag(ARRAY, TR_LITE_M1) || have_flag(ARRAY, TR_LITE_M2) || have_flag(ARRAY, TR_LITE_M3))
187+
181188 typedef struct object_type object_type;
182189
183190 struct object_type
Show on old repository browser