From: deskull Date: Wed, 14 Aug 2019 15:10:43 +0000 (+0900) Subject: [Refactor] #38997 do_cmd_inven() に player_type * 引数を追加. X-Git-Url: http://git.osdn.net/view?p=hengband%2Fhengband.git;a=commitdiff_plain;h=3ec2e769ebd036cc213d16777fbafd036b9bd2fc [Refactor] #38997 do_cmd_inven() に player_type * 引数を追加. --- diff --git a/src/cmd-item.c b/src/cmd-item.c index b27de79df..14c770598 100644 --- a/src/cmd-item.c +++ b/src/cmd-item.c @@ -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); diff --git a/src/cmd-item.h b/src/cmd-item.h index 852e09505..5f468ae14 100644 --- a/src/cmd-item.h +++ b/src/cmd-item.h @@ -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); diff --git a/src/core.c b/src/core.c index 9e62d0270..b982ed361 100644 --- a/src/core.c +++ b/src/core.c @@ -3620,7 +3620,7 @@ static void process_command(void) /* Inventory list */ case 'i': { - do_cmd_inven(); + do_cmd_inven(p_ptr); break; } diff --git a/src/store.c b/src/store.c index 416e1d25e..f3b790b33 100644 --- a/src/store.c +++ b/src/store.c @@ -5469,7 +5469,7 @@ static void store_process_command(void) /* Inventory list */ case 'i': { - do_cmd_inven(); + do_cmd_inven(p_ptr); break; }