3 * @brief プレイヤーの作成を行う / Create a player character
6 * Copyright (c) 1997 Ben Harrison, James E. Wilson, Robert A. Koeneke\n
8 * This software may be copied and distributed for educational, research,\n
9 * and not for profit purposes provided that this copyright and statement\n
10 * are included in all such copies. Other copyrights may also apply.\n
11 * 2013 Deskull Doxygen向けのコメント整理\n
14 #include "birth/character-builder.h"
15 #include "birth/birth-explanations-table.h"
16 #include "birth/birth-wizard.h"
17 #include "birth/game-play-initializer.h"
18 #include "birth/quick-start.h"
19 #include "core/window-redrawer.h"
20 #include "floor/floor-town.h"
21 #include "floor/wild.h"
22 #include "game-option/option-flags.h"
23 #include "io/write-diary.h"
24 #include "main/music-definitions-table.h"
25 #include "main/sound-of-music.h"
26 #include "monster-floor/monster-remover.h"
27 #include "player/player-class.h"
28 #include "player/player-race-types.h"
29 #include "player/player-sex.h"
30 #include "player/race-info-table.h"
31 #include "store/store.h"
32 #include "view/display-messages.h"
33 #include "world/world.h"
36 * @brief プレーヤーキャラの作成結果を日記に書く
37 * @param creature_ptr プレーヤーへの参照ポインタ
40 static void write_birth_diary(player_type *creature_ptr)
44 message_add("====================");
48 exe_write_diary(creature_ptr, DIARY_GAMESTART, 1, _("-------- 新規ゲーム開始 --------", "------- Started New Game -------"));
49 exe_write_diary(creature_ptr, DIARY_DIALY, 0, NULL);
51 sprintf(buf, _(" 性別に%sを選択した。", " chose %s gender."), sex_info[creature_ptr->psex].title);
52 exe_write_diary(creature_ptr, DIARY_DESCRIPTION, 1, buf);
53 sprintf(buf, _(" 種族に%sを選択した。", " chose %s race."), race_info[creature_ptr->prace].title);
54 exe_write_diary(creature_ptr, DIARY_DESCRIPTION, 1, buf);
55 sprintf(buf, _(" 職業に%sを選択した。", " chose %s class."), class_info[creature_ptr->pclass].title);
56 exe_write_diary(creature_ptr, DIARY_DESCRIPTION, 1, buf);
57 if (creature_ptr->realm1) {
58 sprintf(buf, _(" 魔法の領域に%s%sを選択した。", " chose %s%s."),
59 realm_names[creature_ptr->realm1], creature_ptr->realm2 ? format(_("と%s", " and %s realms"), realm_names[creature_ptr->realm2]) : _("", " realm"));
60 exe_write_diary(creature_ptr, DIARY_DESCRIPTION, 1, buf);
63 sprintf(buf, _(" 性格に%sを選択した。", " chose %s personality."),
64 personality_info[creature_ptr->pseikaku].title);
65 exe_write_diary(creature_ptr, DIARY_DESCRIPTION, 1, buf);
69 * @brief プレイヤー作成処理のメインルーチン/ Create a new character.
71 * Note that we may be called with "junk" leftover in the various
72 * fields, so we must be sure to clear them first.
75 void player_birth(player_type *creature_ptr, void (*process_autopick_file_command)(char *))
77 current_world_ptr->play_time = 0;
78 wipe_monsters_list(creature_ptr);
79 player_wipe_without_name(creature_ptr);
80 if (!ask_quick_start(creature_ptr)) {
81 play_music(TERM_XTRA_MUSIC_BASIC, MUSIC_BASIC_DEFAULT);
83 if (player_birth_wizard(creature_ptr, process_autopick_file_command))
86 player_wipe_without_name(creature_ptr);
90 write_birth_diary(creature_ptr);
91 for (int i = 1; i < max_towns; i++) {
92 for (int j = 0; j < MAX_STORES; j++) {
98 if (creature_ptr->prace == RACE_BEASTMAN)
99 creature_ptr->hack_mutation = TRUE;
101 creature_ptr->hack_mutation = FALSE;
104 window_flag[1] |= PW_MESSAGE;
107 window_flag[2] |= PW_INVEN;