OSDN Git Service

[Refactor] #39962 files.c/h から display-player.c/h にdisplay_player_equippy() を移動 ...
authorHourier <hourier@users.sourceforge.jp>
Tue, 25 Feb 2020 12:50:30 +0000 (21:50 +0900)
committerHourier <hourier@users.sourceforge.jp>
Tue, 25 Feb 2020 12:50:30 +0000 (21:50 +0900)
src/Makefile.am
src/files.c
src/files.h
src/view/display-player.c
src/view/display-player.h

index aaba22f..048bc6a 100644 (file)
@@ -13,6 +13,7 @@ hengband_SOURCES = \
        \
        bldg.c bldg.h chest.c chest.h chuukei.c chuukei.h \
        \
+       view/display-player.c view/display-player.h \
        view/process-death.c view/process-death.h \
        view/status-first-page.c view/status-first-page.h \
        player/permanent-resistance.c player/permanent-resistance.h \
index c714923..2837475 100644 (file)
@@ -989,40 +989,6 @@ errr process_pref_file(player_type *creature_ptr, concptr name)
 
 
 /*!
- * @brief プレイヤーの装備一覧をシンボルで並べる
- * Equippy chars
- * @param creature_ptr プレーヤーへの参照ポインタ
- * @param y 表示するコンソールの行
- * @param x 表示するコンソールの列
- * @param mode オプション
- * @return なし
- */
-void display_player_equippy(player_type *creature_ptr, TERM_LEN y, TERM_LEN x, BIT_FLAGS16 mode)
-{
-       /* Weapon flags need only two column */
-       int max_i = (mode & DP_WP) ? INVEN_LARM + 1 : INVEN_TOTAL;
-
-       /* Dump equippy chars */
-       for (int i = INVEN_RARM; i < max_i; i++)
-       {
-               object_type *o_ptr;
-               o_ptr = &creature_ptr->inventory_list[i];
-
-               TERM_COLOR a = object_attr(o_ptr);
-               char c = object_char(o_ptr);
-
-               if (!equippy_chars || !o_ptr->k_idx)
-               {
-                       c = ' ';
-                       a = TERM_DARK;
-               }
-
-               Term_putch(x + i - INVEN_RARM, y, a, c);
-       }
-}
-
-
-/*!
  * @brief プレイヤーステータスをファイルダンプ出力する
  * Hack -- Dump a character description file
  * @param creature_ptr プレーヤーへの参照ポインタ
index e6d08f7..923583f 100644 (file)
@@ -43,7 +43,6 @@ extern concptr process_pref_file_expr(player_type *creature_ptr, char **sp, char
 extern errr process_pref_file(player_type *creature_ptr, concptr name);
 extern errr process_autopick_file(player_type *creature_ptr, concptr name);
 extern errr process_histpref_file(player_type *creature_ptr, concptr name);
-extern void display_player_equippy(player_type *player_ptr, TERM_LEN y, TERM_LEN x, BIT_FLAGS16 mode);
 extern bool show_file(player_type *player_ptr, bool show_version, concptr name, concptr what, int line, BIT_FLAGS mode);
 extern void do_cmd_help(player_type *creature_ptr);
 extern void process_player_name(player_type *creature_ptr, bool sf);
index e03bad8..7402972 100644 (file)
@@ -1264,3 +1264,37 @@ void display_player(player_type *creature_ptr, int mode)
                t += strlen(t) + 1;
        }
 }
+
+
+/*!
+ * @brief プレイヤーの装備一覧をシンボルで並べる
+ * Equippy chars
+ * @param creature_ptr プレーヤーへの参照ポインタ
+ * @param y 表示するコンソールの行
+ * @param x 表示するコンソールの列
+ * @param mode オプション
+ * @return なし
+ */
+void display_player_equippy(player_type *creature_ptr, TERM_LEN y, TERM_LEN x, BIT_FLAGS16 mode)
+{
+       /* Weapon flags need only two column */
+       int max_i = (mode & DP_WP) ? INVEN_LARM + 1 : INVEN_TOTAL;
+
+       /* Dump equippy chars */
+       for (int i = INVEN_RARM; i < max_i; i++)
+       {
+               object_type *o_ptr;
+               o_ptr = &creature_ptr->inventory_list[i];
+
+               TERM_COLOR a = object_attr(o_ptr);
+               char c = object_char(o_ptr);
+
+               if (!equippy_chars || !o_ptr->k_idx)
+               {
+                       c = ' ';
+                       a = TERM_DARK;
+               }
+
+               Term_putch(x + i - INVEN_RARM, y, a, c);
+       }
+}
index 585433f..1b81806 100644 (file)
@@ -3,3 +3,4 @@
 #include "angband.h"
 
 void display_player(player_type *creature_ptr, int mode);
+void display_player_equippy(player_type *player_ptr, TERM_LEN y, TERM_LEN x, BIT_FLAGS16 mode);