• R/O
  • HTTP
  • SSH
  • HTTPS

Commit

Tags
Keine Tags

Frequently used words (click to add to your profile)

javac++androidlinuxc#windowsobjective-ccocoa誰得qtpythonphprubygameguibathyscaphec計画中(planning stage)翻訳omegatframeworktwitterdomtestvb.netdirectxゲームエンジンbtronarduinopreviewer

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


Commit MetaInfo

Revisionef6cf1c11631aba2f3d153fd44ca66eb36ee497f (tree)
Zeit2020-02-28 23:30:24
AutorHourier <hourier@user...>
CommiterHourier

Log Message

[Refactor] #39962 display_player() からdisplay_phisique() を分離 / Separated display_phisique() from display_player()

Ändern Zusammenfassung

Diff

--- a/src/view/display-player.c
+++ b/src/view/display-player.c
@@ -96,6 +96,30 @@ static void display_magic_realms(player_type *creature_ptr)
9696
9797
9898 /*!
99+ * @ brief 年齢、身長、体重、社会的地位を表示する
100+ * @param creature_ptr プレーヤーへの参照ポインタ
101+ * @return なし
102+ * @details
103+ * 日本語版では、身長はcmに、体重はkgに変更してある
104+ */
105+static void display_phisique(player_type *creature_ptr)
106+{
107+#ifdef JP
108+ display_player_one_line(ENTRY_AGE, format("%d才", (int)creature_ptr->age), TERM_L_BLUE);
109+ display_player_one_line(ENTRY_HEIGHT, format("%dcm", (int)((creature_ptr->ht * 254) / 100)), TERM_L_BLUE);
110+ display_player_one_line(ENTRY_WEIGHT, format("%dkg", (int)((creature_ptr->wt * 4536) / 10000)), TERM_L_BLUE);
111+ display_player_one_line(ENTRY_SOCIAL, format("%d ", (int)creature_ptr->sc), TERM_L_BLUE);
112+#else
113+ display_player_one_line(ENTRY_AGE, format("%d", (int)creature_ptr->age), TERM_L_BLUE);
114+ display_player_one_line(ENTRY_HEIGHT, format("%d", (int)creature_ptr->ht), TERM_L_BLUE);
115+ display_player_one_line(ENTRY_WEIGHT, format("%d", (int)creature_ptr->wt), TERM_L_BLUE);
116+ display_player_one_line(ENTRY_SOCIAL, format("%d", (int)creature_ptr->sc), TERM_L_BLUE);
117+#endif
118+ display_player_one_line(ENTRY_ALIGN, format("%s", your_alignment(creature_ptr)), TERM_L_BLUE);
119+}
120+
121+
122+/*!
99123 * @brief プレイヤーのステータス表示メイン処理
100124 * Display the character on the screen (various modes)
101125 * @param creature_ptr プレーヤーへの参照ポインタ
@@ -127,20 +151,7 @@ void display_player(player_type *creature_ptr, int mode, map_name_pf map_name)
127151 if ((creature_ptr->pclass == CLASS_CHAOS_WARRIOR) || (creature_ptr->muta2 & MUT2_CHAOS_GIFT))
128152 display_player_one_line(ENTRY_PATRON, chaos_patrons[creature_ptr->chaos_patron], TERM_L_BLUE);
129153
130- /* Age, Height, Weight, Social */
131- /* 身長はセンチメートルに、体重はキログラムに変更してあります */
132-#ifdef JP
133- display_player_one_line(ENTRY_AGE, format("%d才", (int)creature_ptr->age), TERM_L_BLUE);
134- display_player_one_line(ENTRY_HEIGHT, format("%dcm", (int)((creature_ptr->ht * 254) / 100)), TERM_L_BLUE);
135- display_player_one_line(ENTRY_WEIGHT, format("%dkg", (int)((creature_ptr->wt * 4536) / 10000)), TERM_L_BLUE);
136- display_player_one_line(ENTRY_SOCIAL, format("%d ", (int)creature_ptr->sc), TERM_L_BLUE);
137-#else
138- display_player_one_line(ENTRY_AGE, format("%d", (int)creature_ptr->age), TERM_L_BLUE);
139- display_player_one_line(ENTRY_HEIGHT, format("%d", (int)creature_ptr->ht), TERM_L_BLUE);
140- display_player_one_line(ENTRY_WEIGHT, format("%d", (int)creature_ptr->wt), TERM_L_BLUE);
141- display_player_one_line(ENTRY_SOCIAL, format("%d", (int)creature_ptr->sc), TERM_L_BLUE);
142-#endif
143- display_player_one_line(ENTRY_ALIGN, format("%s", your_alignment(creature_ptr)), TERM_L_BLUE);
154+ display_phisique(creature_ptr);
144155
145156 char buf[80];
146157 for (int i = 0; i < A_MAX; i++)