• R/O
  • HTTP
  • SSH
  • HTTPS

hengband: Commit

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


Commit MetaInfo

Revision9f7a36e8c7f2e0401fafb3850ba9bd8dafedbeda (tree)
Time2019-07-08 23:00:14
Authordeskull <deskull@user...>
Commiterdeskull

Log Message

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

Change Summary

Incremental Difference

--- a/src/player-inventory.c
+++ b/src/player-inventory.c
@@ -79,7 +79,7 @@ static INVENTORY_IDX label_to_inven(int c)
7979 * @param i 部位表現を求めるプレイヤーの所持/装備オブジェクトID
8080 * @return 部位表現の文字列ポインタ
8181 */
82-static concptr mention_use(int i)
82+static concptr mention_use(player_type *creature_ptr, int i)
8383 {
8484 concptr p;
8585
@@ -87,18 +87,18 @@ static concptr mention_use(int i)
8787 switch (i)
8888 {
8989 #ifdef JP
90- case INVEN_RARM: p = p_ptr->heavy_wield[0] ? "運搬中" : ((p_ptr->ryoute && p_ptr->migite) ? " 両手" : (left_hander ? " 左手" : " 右手")); break;
90+ case INVEN_RARM: p = creature_ptr->heavy_wield[0] ? "運搬中" : ((creature_ptr->ryoute && creature_ptr->migite) ? " 両手" : (left_hander ? " 左手" : " 右手")); break;
9191 #else
92- case INVEN_RARM: p = p_ptr->heavy_wield[0] ? "Just lifting" : (p_ptr->migite ? "Wielding" : "On arm"); break;
92+ case INVEN_RARM: p = creature_ptr->heavy_wield[0] ? "Just lifting" : (creature_ptr->migite ? "Wielding" : "On arm"); break;
9393 #endif
9494
9595 #ifdef JP
96- case INVEN_LARM: p = p_ptr->heavy_wield[1] ? "運搬中" : ((p_ptr->ryoute && p_ptr->hidarite) ? " 両手" : (left_hander ? " 右手" : " 左手")); break;
96+ case INVEN_LARM: p = creature_ptr->heavy_wield[1] ? "運搬中" : ((creature_ptr->ryoute && creature_ptr->hidarite) ? " 両手" : (left_hander ? " 右手" : " 左手")); break;
9797 #else
98- case INVEN_LARM: p = p_ptr->heavy_wield[1] ? "Just lifting" : (p_ptr->hidarite ? "Wielding" : "On arm"); break;
98+ case INVEN_LARM: p = creature_ptr->heavy_wield[1] ? "Just lifting" : (creature_ptr->hidarite ? "Wielding" : "On arm"); break;
9999 #endif
100100
101- case INVEN_BOW: p = (adj_str_hold[p_ptr->stat_ind[A_STR]] < p_ptr->inventory_list[i].weight / 10) ? _("運搬中", "Just holding") : _("射撃用", "Shooting"); break;
101+ case INVEN_BOW: p = (adj_str_hold[creature_ptr->stat_ind[A_STR]] < creature_ptr->inventory_list[i].weight / 10) ? _("運搬中", "Just holding") : _("射撃用", "Shooting"); break;
102102 case INVEN_RIGHT: p = (left_hander ? _("左手指", "On left hand") : _("右手指", "On right hand")); break;
103103 case INVEN_LEFT: p = (left_hander ? _("右手指", "On right hand") : _("左手指", "On left hand")); break;
104104 case INVEN_NECK: p = _(" 首", "Around neck"); break;
@@ -177,7 +177,7 @@ void display_equip(OBJECT_TYPE_VALUE tval)
177177 if (show_labels)
178178 {
179179 Term_putstr(wid - 20, i - INVEN_RARM, -1, TERM_WHITE, " <-- ");
180- prt(mention_use(i), i - INVEN_RARM, wid - 15);
180+ prt(mention_use(p_ptr, i), i - INVEN_RARM, wid - 15);
181181 }
182182 }
183183
@@ -3428,7 +3428,7 @@ COMMAND_CODE show_equip(int target_item, BIT_FLAGS mode, OBJECT_TYPE_VALUE tval)
34283428 if (show_labels)
34293429 {
34303430 /* Mention the use */
3431- (void)sprintf(tmp_val, _("%-7s: ", "%-14s: "), mention_use(i));
3431+ (void)sprintf(tmp_val, _("%-7s: ", "%-14s: "), mention_use(p_ptr, i));
34323432
34333433 put_str(tmp_val, j + 1, cur_col);
34343434
Show on old repository browser