OSDN Git Service

[Refactor] #38997 do_cmd_inven() に player_type * 引数を追加.
authordeskull <deskull@users.sourceforge.jp>
Wed, 14 Aug 2019 15:10:43 +0000 (00:10 +0900)
committerdeskull <deskull@users.sourceforge.jp>
Wed, 14 Aug 2019 15:10:43 +0000 (00:10 +0900)
src/cmd-item.c
src/cmd-item.h
src/core.c
src/store.c

index b27de79..14c7705 100644 (file)
@@ -54,7 +54,7 @@
  * @brief 持ち物一覧を表示するコマンドのメインルーチン / Display p_ptr->inventory_list
  * @return なし 
  */
-void do_cmd_inven(void)
+void do_cmd_inven(player_type *creature_ptr)
 {
        char out_val[160];
        command_wrk = FALSE;
@@ -64,12 +64,12 @@ void do_cmd_inven(void)
 
 #ifdef JP
        sprintf(out_val, "持ち物: 合計 %3d.%1d kg (限界の%ld%%) コマンド: ",
-               (int)lbtokg1(p_ptr->total_weight) , (int)lbtokg2(p_ptr->total_weight) ,
-               (long int)((p_ptr->total_weight * 100) / weight_limit(p_ptr)));
+               (int)lbtokg1(creature_ptr->total_weight) , (int)lbtokg2(creature_ptr->total_weight) ,
+               (long int)((creature_ptr->total_weight * 100) / weight_limit(creature_ptr)));
 #else
        sprintf(out_val, "Inventory: carrying %d.%d pounds (%ld%% of capacity). Command: ",
-               (int)(p_ptr->total_weight / 10), (int)(p_ptr->total_weight % 10),
-               (p_ptr->total_weight * 100) / weight_limit(p_ptr));
+               (int)(creature_ptr->total_weight / 10), (int)(creature_ptr->total_weight % 10),
+               (creature_ptr->total_weight * 100) / weight_limit(creature_ptr));
 #endif
 
        prt(out_val, 0, 0);
index 852e095..5f468ae 100644 (file)
@@ -1,6 +1,6 @@
 /* cmd3-item.h */
 
-extern void do_cmd_inven(void);
+extern void do_cmd_inven(player_type *creature_ptr);
 extern void do_cmd_equip(player_type *creature_ptr);
 extern void do_cmd_wield(player_type *creature_ptr);
 extern void do_cmd_takeoff(player_type *creature_ptr);
index 9e62d02..b982ed3 100644 (file)
@@ -3620,7 +3620,7 @@ static void process_command(void)
                /* Inventory list */
                case 'i':
                {
-                       do_cmd_inven();
+                       do_cmd_inven(p_ptr);
                        break;
                }
 
index 416e1d2..f3b790b 100644 (file)
@@ -5469,7 +5469,7 @@ static void store_process_command(void)
                /* Inventory list */
                case 'i':
                {
-                       do_cmd_inven();
+                       do_cmd_inven(p_ptr);
                        break;
                }