OSDN Git Service

[fix] #41503 超能力者でゲームを開始しようとするとクラッシュ
[hengband/hengband.git] / src / view / display-player-misc-info.c
1 #include "player/mimic-info-table.h"
2 #include "player/player-class.h"
3 #include "player/player-personality.h"
4 #include "player/player-sex.h"
5 #include "term/screen-processor.h"
6 #include "term/term-color-types.h"
7 #include "view/display-player-stat-info.h"
8
9 /*!
10  * @brief プレイヤーの特性フラグ一覧表示2a /
11  * @param creature_ptr プレーヤーへの参照ポインタ
12  * Special display, part 2a
13  * @return なし
14  */
15 void display_player_misc_info(player_type *creature_ptr)
16 {
17     put_str(_("名前  :", "Name  :"), 1, 26);
18     put_str(_("性別  :", "Sex   :"), 3, 1);
19     put_str(_("種族  :", "Race  :"), 4, 1);
20     put_str(_("職業  :", "Class :"), 5, 1);
21
22     char buf[80];
23     char tmp[80];
24     strcpy(tmp, ap_ptr->title);
25 #ifdef JP
26     if (ap_ptr->no == 1)
27         strcat(tmp, "の");
28 #else
29     strcat(tmp, " ");
30 #endif
31     strcat(tmp, creature_ptr->name);
32
33     c_put_str(TERM_L_BLUE, tmp, 1, 34);
34     c_put_str(TERM_L_BLUE, sp_ptr->title, 3, 9);
35     c_put_str(TERM_L_BLUE, (creature_ptr->mimic_form ? mimic_info[creature_ptr->mimic_form].title : rp_ptr->title), 4, 9);
36     c_put_str(TERM_L_BLUE, cp_ptr->title, 5, 9);
37
38     put_str(_("レベル:", "Level :"), 6, 1);
39     put_str(_("HP  :", "Hits  :"), 7, 1);
40     put_str(_("MP  :", "Mana  :"), 8, 1);
41
42     (void)sprintf(buf, "%d", (int)creature_ptr->lev);
43     c_put_str(TERM_L_BLUE, buf, 6, 9);
44     (void)sprintf(buf, "%d/%d", (int)creature_ptr->chp, (int)creature_ptr->mhp);
45     c_put_str(TERM_L_BLUE, buf, 7, 9);
46     (void)sprintf(buf, "%d/%d", (int)creature_ptr->csp, (int)creature_ptr->msp);
47     c_put_str(TERM_L_BLUE, buf, 8, 9);
48 }