OSDN Git Service

[Refactor] enum window_redraw_type の定義を 1U << n 形式に
authoriks <iks3@users.noreply.github.com>
Mon, 8 Mar 2021 10:42:04 +0000 (19:42 +0900)
committeriks <iks3@users.noreply.github.com>
Mon, 8 Mar 2021 10:42:04 +0000 (19:42 +0900)
src/core/window-redrawer.h

index 40495e4..609ac79 100644 (file)
@@ -2,22 +2,27 @@
 
 #include "system/angband.h"
 
+// clang-format off
+/*!
+ * @brief サブウィンドウ描画フラグ
+ */
 enum window_redraw_type {
-    PW_INVEN = 0x00000001L, /*!<サブウィンドウ描画フラグ: 所持品-装備品 / Display inven/equip */
-    PW_EQUIP = 0x00000002L, /*!<サブウィンドウ描画フラグ: 装備品-所持品 / Display equip/inven */
-    PW_SPELL = 0x00000004L, /*!<サブウィンドウ描画フラグ: 魔法一覧 / Display spell list */
-    PW_PLAYER = 0x00000008L, /*!<サブウィンドウ描画フラグ: プレイヤーのステータス / Display character */
-    PW_MONSTER_LIST = 0x00000010L, /*!<サブウィンドウ描画フラグ: 視界内モンスターの一覧 / Display monster list */
-    PW_MESSAGE = 0x00000040L, /*!<サブウィンドウ描画フラグ: メッセージログ / Display messages */
-    PW_OVERHEAD = 0x00000080L, /*!<サブウィンドウ描画フラグ: 周辺の光景 / Display overhead view */
-    PW_MONSTER = 0x00000100L, /*!<サブウィンドウ描画フラグ: モンスターの思い出 / Display monster recall */
-    PW_OBJECT = 0x00000200L, /*!<サブウィンドウ描画フラグ: アイテムの知識 / Display object recall */
-    PW_DUNGEON = 0x00000400L, /*!<サブウィンドウ描画フラグ: ダンジョンの地形 / Display dungeon view */
-    PW_SNAPSHOT = 0x00000800L, /*!<サブウィンドウ描画フラグ: 記念写真 / Display snap-shot */
+    PW_INVEN        = 1U <<  0, /*!<サブウィンドウ描画フラグ: 所持品-装備品 / Display inven/equip */
+    PW_EQUIP        = 1U <<  1, /*!<サブウィンドウ描画フラグ: 装備品-所持品 / Display equip/inven */
+    PW_SPELL        = 1U <<  2, /*!<サブウィンドウ描画フラグ: 魔法一覧 / Display spell list */
+    PW_PLAYER       = 1U <<  3, /*!<サブウィンドウ描画フラグ: プレイヤーのステータス / Display character */
+    PW_MONSTER_LIST = 1U <<  4, /*!<サブウィンドウ描画フラグ: 視界内モンスターの一覧 / Display monster list */
+    PW_MESSAGE      = 1U <<  6, /*!<サブウィンドウ描画フラグ: メッセージログ / Display messages */
+    PW_OVERHEAD     = 1U <<  7, /*!<サブウィンドウ描画フラグ: 周辺の光景 / Display overhead view */
+    PW_MONSTER      = 1U <<  8, /*!<サブウィンドウ描画フラグ: モンスターの思い出 / Display monster recall */
+    PW_OBJECT       = 1U <<  9, /*!<サブウィンドウ描画フラグ: アイテムの知識 / Display object recall */
+    PW_DUNGEON      = 1U << 10, /*!<サブウィンドウ描画フラグ: ダンジョンの地形 / Display dungeon view */
+    PW_SNAPSHOT     = 1U << 11, /*!<サブウィンドウ描画フラグ: 記念写真 / Display snap-shot */
 
     PW_ALL = (PW_INVEN | PW_EQUIP | PW_SPELL | PW_PLAYER | PW_MONSTER_LIST | PW_MESSAGE | PW_OVERHEAD | PW_MONSTER | PW_OBJECT | PW_DUNGEON | PW_SNAPSHOT),
 };
 
+// clang-format on
 void redraw_window(void);
 void window_stuff(player_type *player_ptr);
 void redraw_stuff(player_type *creature_ptr);