• R/O
  • HTTP
  • SSH
  • HTTPS

Commit

Tags
No Tags

Frequently used words (click to add to your profile)

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

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


Commit MetaInfo

Revisão78d8f4106972611d3c5a7b501a03a06df092f388 (tree)
Hora2020-02-28 23:24:57
AutorHourier <hourier@user...>
CommiterHourier

Mensagem de Log

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

Mudança Sumário

Diff

--- a/src/view/display-player.c
+++ b/src/view/display-player.c
@@ -77,6 +77,25 @@ static void display_player_basic_info(player_type *creature_ptr)
7777
7878
7979 /*!
80+ * @brief 魔法領域を表示する
81+ * @param creature_ptr プレーヤーへの参照ポインタ
82+ * @return なし
83+ */
84+static void display_magic_realms(player_type *creature_ptr)
85+{
86+ if (creature_ptr->realm1 == 0) return;
87+
88+ char tmp[64];
89+ if (creature_ptr->realm2)
90+ sprintf(tmp, "%s, %s", realm_names[creature_ptr->realm1], realm_names[creature_ptr->realm2]);
91+ else
92+ strcpy(tmp, realm_names[creature_ptr->realm1]);
93+
94+ display_player_one_line(ENTRY_REALM, tmp, TERM_L_BLUE);
95+}
96+
97+
98+/*!
8099 * @brief プレイヤーのステータス表示メイン処理
81100 * Display the character on the screen (various modes)
82101 * @param creature_ptr プレーヤーへの参照ポインタ
@@ -103,16 +122,7 @@ void display_player(player_type *creature_ptr, int mode, map_name_pf map_name)
103122 if (display_player_info(creature_ptr, mode)) return;
104123
105124 display_player_basic_info(creature_ptr);
106-
107- char tmp[64];
108- if (creature_ptr->realm1)
109- {
110- if (creature_ptr->realm2)
111- sprintf(tmp, "%s, %s", realm_names[creature_ptr->realm1], realm_names[creature_ptr->realm2]);
112- else
113- strcpy(tmp, realm_names[creature_ptr->realm1]);
114- display_player_one_line(ENTRY_REALM, tmp, TERM_L_BLUE);
115- }
125+ display_magic_realms(creature_ptr);
116126
117127 if ((creature_ptr->pclass == CLASS_CHAOS_WARRIOR) || (creature_ptr->muta2 & MUT2_CHAOS_GIFT))
118128 display_player_one_line(ENTRY_PATRON, chaos_patrons[creature_ptr->chaos_patron], TERM_L_BLUE);