• R/O
  • HTTP
  • SSH
  • HTTPS

hengband: Commit

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


Commit MetaInfo

Revision4a216c87a6792afb1f412ee38669be5c96ba7987 (tree)
Time2019-07-02 23:46:39
Authordeskull <deskull@user...>
Commiterdeskull

Log Message

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

Change Summary

Incremental Difference

--- a/src/birth.c
+++ b/src/birth.c
@@ -4573,7 +4573,7 @@ static bool ask_quick_start(void)
45734573 * fields, so we must be sure to clear them first.
45744574 * @return なし
45754575 */
4576-void player_birth(void)
4576+void player_birth(player_type *creature_ptr)
45774577 {
45784578 int i, j;
45794579 char buf[80];
@@ -4617,22 +4617,22 @@ void player_birth(void)
46174617 do_cmd_write_nikki(NIKKI_GAMESTART, 1, _("-------- 新規ゲーム開始 --------", "-------- Start New Game --------"));
46184618 do_cmd_write_nikki(NIKKI_HIGAWARI, 0, NULL);
46194619
4620- sprintf(buf,_(" 性別に%sを選択した。", " choose %s personality."), sex_info[p_ptr->psex].title);
4620+ sprintf(buf,_(" 性別に%sを選択した。", " choose %s personality."), sex_info[creature_ptr->psex].title);
46214621 do_cmd_write_nikki(NIKKI_BUNSHOU, 1, buf);
46224622
4623- sprintf(buf,_(" 種族に%sを選択した。", " choose %s race."), race_info[p_ptr->prace].title);
4623+ sprintf(buf,_(" 種族に%sを選択した。", " choose %s race."), race_info[creature_ptr->prace].title);
46244624 do_cmd_write_nikki(NIKKI_BUNSHOU, 1, buf);
46254625
4626- sprintf(buf,_(" 職業に%sを選択した。", " choose %s class."), class_info[p_ptr->pclass].title);
4626+ sprintf(buf,_(" 職業に%sを選択した。", " choose %s class."), class_info[creature_ptr->pclass].title);
46274627 do_cmd_write_nikki(NIKKI_BUNSHOU, 1, buf);
46284628
4629- if (p_ptr->realm1)
4629+ if (creature_ptr->realm1)
46304630 {
4631- sprintf(buf,_(" 魔法の領域に%s%sを選択した。", " choose %s%s realm."),realm_names[p_ptr->realm1], p_ptr->realm2 ? format("と%s",realm_names[p_ptr->realm2]) : "");
4631+ sprintf(buf,_(" 魔法の領域に%s%sを選択した。", " choose %s%s realm."),realm_names[creature_ptr->realm1], creature_ptr->realm2 ? format("と%s",realm_names[creature_ptr->realm2]) : "");
46324632 do_cmd_write_nikki(NIKKI_BUNSHOU, 1, buf);
46334633 }
46344634
4635- sprintf(buf,_(" 性格に%sを選択した。", " choose %s."), seikaku_info[p_ptr->pseikaku].title);
4635+ sprintf(buf,_(" 性格に%sを選択した。", " choose %s."), seikaku_info[creature_ptr->pseikaku].title);
46364636 do_cmd_write_nikki(NIKKI_BUNSHOU, 1, buf);
46374637
46384638 /* Init the shops */
@@ -4648,8 +4648,8 @@ void player_birth(void)
46484648 seed_wilderness();
46494649
46504650 /* Give beastman a mutation at character birth */
4651- if (p_ptr->prace == RACE_BEASTMAN) p_ptr->hack_mutation = TRUE;
4652- else p_ptr->hack_mutation = FALSE;
4651+ if (creature_ptr->prace == RACE_BEASTMAN) creature_ptr->hack_mutation = TRUE;
4652+ else creature_ptr->hack_mutation = FALSE;
46534653
46544654 /* Set the message window flag as default */
46554655 if (!window_flag[1])
--- a/src/birth.h
+++ b/src/birth.h
@@ -38,7 +38,7 @@ extern birther previous_char;
3838
3939 /* birth.c */
4040 extern void add_history_from_pref_line(concptr t);
41-extern void player_birth(void);
41+extern void player_birth(player_type *creature_ptr);
4242 extern void get_max_stats(void);
4343 extern void get_height_weight(void);
4444 extern void player_outfit(void);
--- a/src/core.c
+++ b/src/core.c
@@ -5408,7 +5408,7 @@ void play_game(bool new_game)
54085408 current_world_ptr->seed_town = randint0(0x10000000);
54095409
54105410 /* Roll up a new character */
5411- player_birth();
5411+ player_birth(p_ptr);
54125412
54135413 counts_write(2,0);
54145414 p_ptr->count = 0;
Show on old repository browser