• R/O
  • HTTP
  • SSH
  • HTTPS

hengband: Commit

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


Commit MetaInfo

Revision3ec2e769ebd036cc213d16777fbafd036b9bd2fc (tree)
Time2019-08-15 00:10:43
Authordeskull <deskull@user...>
Commiterdeskull

Log Message

[Refactor] #38997 do_cmd_inven() に player_type * 引数を追加.

Change Summary

Incremental Difference

--- a/src/cmd-item.c
+++ b/src/cmd-item.c
@@ -54,7 +54,7 @@
5454 * @brief 持ち物一覧を表示するコマンドのメインルーチン / Display p_ptr->inventory_list
5555 * @return なし
5656 */
57-void do_cmd_inven(void)
57+void do_cmd_inven(player_type *creature_ptr)
5858 {
5959 char out_val[160];
6060 command_wrk = FALSE;
@@ -64,12 +64,12 @@ void do_cmd_inven(void)
6464
6565 #ifdef JP
6666 sprintf(out_val, "持ち物: 合計 %3d.%1d kg (限界の%ld%%) コマンド: ",
67- (int)lbtokg1(p_ptr->total_weight) , (int)lbtokg2(p_ptr->total_weight) ,
68- (long int)((p_ptr->total_weight * 100) / weight_limit(p_ptr)));
67+ (int)lbtokg1(creature_ptr->total_weight) , (int)lbtokg2(creature_ptr->total_weight) ,
68+ (long int)((creature_ptr->total_weight * 100) / weight_limit(creature_ptr)));
6969 #else
7070 sprintf(out_val, "Inventory: carrying %d.%d pounds (%ld%% of capacity). Command: ",
71- (int)(p_ptr->total_weight / 10), (int)(p_ptr->total_weight % 10),
72- (p_ptr->total_weight * 100) / weight_limit(p_ptr));
71+ (int)(creature_ptr->total_weight / 10), (int)(creature_ptr->total_weight % 10),
72+ (creature_ptr->total_weight * 100) / weight_limit(creature_ptr));
7373 #endif
7474
7575 prt(out_val, 0, 0);
--- a/src/cmd-item.h
+++ b/src/cmd-item.h
@@ -1,6 +1,6 @@
11 /* cmd3-item.h */
22
3-extern void do_cmd_inven(void);
3+extern void do_cmd_inven(player_type *creature_ptr);
44 extern void do_cmd_equip(player_type *creature_ptr);
55 extern void do_cmd_wield(player_type *creature_ptr);
66 extern void do_cmd_takeoff(player_type *creature_ptr);
--- a/src/core.c
+++ b/src/core.c
@@ -3620,7 +3620,7 @@ static void process_command(void)
36203620 /* Inventory list */
36213621 case 'i':
36223622 {
3623- do_cmd_inven();
3623+ do_cmd_inven(p_ptr);
36243624 break;
36253625 }
36263626
--- a/src/store.c
+++ b/src/store.c
@@ -5469,7 +5469,7 @@ static void store_process_command(void)
54695469 /* Inventory list */
54705470 case 'i':
54715471 {
5472- do_cmd_inven();
5472+ do_cmd_inven(p_ptr);
54735473 break;
54745474 }
54755475
Show on old repository browser