変愚蛮怒のメインリポジトリです
Revisão | ef6cf1c11631aba2f3d153fd44ca66eb36ee497f (tree) |
---|---|
Hora | 2020-02-28 23:30:24 |
Autor | Hourier <hourier@user...> |
Commiter | Hourier |
[Refactor] #39962 display_player() からdisplay_phisique() を分離 / Separated display_phisique() from display_player()
@@ -96,6 +96,30 @@ static void display_magic_realms(player_type *creature_ptr) | ||
96 | 96 | |
97 | 97 | |
98 | 98 | /*! |
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 | +/*! | |
99 | 123 | * @brief プレイヤーのステータス表示メイン処理 |
100 | 124 | * Display the character on the screen (various modes) |
101 | 125 | * @param creature_ptr プレーヤーへの参照ポインタ |
@@ -127,20 +151,7 @@ void display_player(player_type *creature_ptr, int mode, map_name_pf map_name) | ||
127 | 151 | if ((creature_ptr->pclass == CLASS_CHAOS_WARRIOR) || (creature_ptr->muta2 & MUT2_CHAOS_GIFT)) |
128 | 152 | display_player_one_line(ENTRY_PATRON, chaos_patrons[creature_ptr->chaos_patron], TERM_L_BLUE); |
129 | 153 | |
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); | |
144 | 155 | |
145 | 156 | char buf[80]; |
146 | 157 | for (int i = 0; i < A_MAX; i++) |