• R/O
  • HTTP
  • SSH
  • HTTPS

hengband: Commit

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


Commit MetaInfo

Revisionb6157fbf414410aace89ac60117ac9e522ae49e8 (tree)
Time2019-08-15 00:08:14
Authordeskull <deskull@user...>
Commiterdeskull

Log Message

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

Change Summary

Incremental Difference

--- a/src/cmd-item.c
+++ b/src/cmd-item.c
@@ -94,7 +94,7 @@ void do_cmd_inven(void)
9494 * @brief 装備一覧を表示するコマンドのメインルーチン / Display equipment
9595 * @return なし
9696 */
97-void do_cmd_equip(void)
97+void do_cmd_equip(player_type *creature_ptr)
9898 {
9999 char out_val[160];
100100 command_wrk = TRUE;
@@ -105,12 +105,12 @@ void do_cmd_equip(void)
105105
106106 #ifdef JP
107107 sprintf(out_val, "装備: 合計 %3d.%1d kg (限界の%ld%%) コマンド: ",
108- (int)lbtokg1(p_ptr->total_weight) , (int)lbtokg2(p_ptr->total_weight) ,
109- (long int)((p_ptr->total_weight * 100) / weight_limit(p_ptr)));
108+ (int)lbtokg1(creature_ptr->total_weight) , (int)lbtokg2(creature_ptr->total_weight) ,
109+ (long int)((creature_ptr->total_weight * 100) / weight_limit(creature_ptr)));
110110 #else
111111 sprintf(out_val, "Equipment: carrying %d.%d pounds (%ld%% of capacity). Command: ",
112- (int)(p_ptr->total_weight / 10), (int)(p_ptr->total_weight % 10),
113- (long int)((p_ptr->total_weight * 100) / weight_limit(p_ptr)));
112+ (int)(creature_ptr->total_weight / 10), (int)(creature_ptr->total_weight % 10),
113+ (long int)((creature_ptr->total_weight * 100) / weight_limit(creature_ptr)));
114114 #endif
115115
116116 prt(out_val, 0, 0);
--- a/src/cmd-item.h
+++ b/src/cmd-item.h
@@ -1,7 +1,7 @@
11 /* cmd3-item.h */
22
33 extern void do_cmd_inven(void);
4-extern void do_cmd_equip(void);
4+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);
77 extern void do_cmd_drop(void);
--- a/src/core.c
+++ b/src/core.c
@@ -3613,7 +3613,7 @@ static void process_command(void)
36133613 /* Equipment list */
36143614 case 'e':
36153615 {
3616- do_cmd_equip();
3616+ do_cmd_equip(p_ptr);
36173617 break;
36183618 }
36193619
--- a/src/store.c
+++ b/src/store.c
@@ -5462,7 +5462,7 @@ static void store_process_command(void)
54625462 /* Equipment list */
54635463 case 'e':
54645464 {
5465- do_cmd_equip();
5465+ do_cmd_equip(p_ptr);
54665466 break;
54675467 }
54685468
Show on old repository browser