• R/O
  • HTTP
  • SSH
  • HTTPS

hengband: Commit

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


Commit MetaInfo

Revision1a1f8afaa0da87969776c9bca05da700f7cbdf44 (tree)
Time2019-07-08 00:25:16
Authordeskull <deskull@user...>
Commiterdeskull

Log Message

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

Change Summary

Incremental Difference

--- a/src/birth.c
+++ b/src/birth.c
@@ -2643,7 +2643,7 @@ static bool get_player_race(void)
26432643 * @brief プレイヤーの職業選択を行う / Player class
26442644 * @return なし
26452645 */
2646-static bool get_player_class(void)
2646+static bool get_player_class(player_type *creature_ptr)
26472647 {
26482648 int k, n, cs, os;
26492649 char c;
@@ -2687,7 +2687,7 @@ static bool get_player_class(void)
26872687
26882688 /* Get a class */
26892689 k = -1;
2690- cs = p_ptr->pclass;
2690+ cs = creature_ptr->pclass;
26912691 os = MAX_CLASS_CHOICE;
26922692 while (1)
26932693 {
@@ -2799,9 +2799,9 @@ static bool get_player_class(void)
27992799 }
28002800
28012801 /* Set class */
2802- p_ptr->pclass = (byte_hack)k;
2803- cp_ptr = &class_info[p_ptr->pclass];
2804- mp_ptr = &m_info[p_ptr->pclass];
2802+ creature_ptr->pclass = (byte_hack)k;
2803+ cp_ptr = &class_info[creature_ptr->pclass];
2804+ mp_ptr = &m_info[creature_ptr->pclass];
28052805
28062806 /* Display */
28072807 c_put_str(TERM_L_BLUE, cp_ptr->title, 5, 15);
@@ -4057,7 +4057,7 @@ static bool player_birth_aux(player_type *creature_ptr)
40574057 char temp[80*9];
40584058 concptr t;
40594059
4060- if (!get_player_class()) return FALSE;
4060+ if (!get_player_class(creature_ptr)) return FALSE;
40614061
40624062 clear_from(10);
40634063 roff_to_buf(class_jouhou[creature_ptr->pclass], 74, temp, sizeof(temp));
Show on old repository browser