• R/O
  • HTTP
  • SSH
  • HTTPS

提交

標籤
無標籤

Frequently used words (click to add to your profile)

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

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


Commit MetaInfo

修訂7acaae1d2d72f632446756cfb5e978e80b8aaea8 (tree)
時間2020-02-29 00:25:57
作者Hourier <hourier@user...>
CommiterHourier

Log Message

[Refacotr] #39962 display_player() からdisplay_current_floor() を分離 / Separated display_current_floor() from display_player()

Change Summary

差異

--- a/src/view/display-player.c
+++ b/src/view/display-player.c
@@ -231,6 +231,27 @@ static void decide_current_floor(player_type *creature_ptr, char *statmsg, map_n
231231
232232
233233 /*!
234+ * @brief 今いる場所を表示する
235+ * @param statmsg メッセージバッファ
236+ * @return なし
237+ */
238+static void display_current_floor(char *statmsg)
239+{
240+ char temp[128];
241+ roff_to_buf(statmsg, 60, temp, sizeof(temp));
242+ char *t;
243+ t = temp;
244+ for (int i = 0; i < 2; i++)
245+ {
246+ if (t[0] == 0) return;
247+
248+ put_str(t, i + 5 + 12, 10);
249+ t += strlen(t) + 1;
250+ }
251+}
252+
253+
254+/*!
234255 * @brief プレイヤーのステータス表示メイン処理
235256 * Display the character on the screen (various modes)
236257 * @param creature_ptr プレーヤーへの参照ポインタ
@@ -265,7 +286,6 @@ void display_player(player_type *creature_ptr, int mode, map_name_pf map_name)
265286 display_phisique(creature_ptr);
266287 display_player_stats(creature_ptr);
267288
268- floor_type *floor_ptr = creature_ptr->current_floor_ptr;
269289 if (mode == 0)
270290 {
271291 display_player_middle(creature_ptr);
@@ -282,17 +302,7 @@ void display_player(player_type *creature_ptr, int mode, map_name_pf map_name)
282302 decide_current_floor(creature_ptr, statmsg, map_name);
283303 if (!*statmsg) return;
284304
285- char temp[64 * 2];
286- roff_to_buf(statmsg, 60, temp, sizeof(temp));
287- char *t;
288- t = temp;
289- for (int i = 0; i < 2; i++)
290- {
291- if (t[0] == 0) return;
292-
293- put_str(t, i + 5 + 12, 10);
294- t += strlen(t) + 1;
295- }
305+ display_current_floor(statmsg);
296306 }
297307
298308