OSDN Git Service

f9011981cedc804ad3f38d43ccbdfa40403fb997
[hengbandforosx/hengbandosx.git] / src / view / display-player-misc-info.cpp
1 #include "player-info/class-info.h"
2 #include "player-info/mimic-info-table.h"
3 #include "player/player-personality.h"
4 #include "player/player-sex.h"
5 #include "system/player-type-definition.h"
6 #include "term/screen-processor.h"
7 #include "term/term-color-types.h"
8 #include "view/display-player-stat-info.h"
9
10 /*!
11  * @brief プレイヤーの特性フラグ一覧表示2a /
12  * @param player_ptr プレイヤーへの参照ポインタ
13  * Special display, part 2a
14  */
15 void display_player_misc_info(PlayerType *player_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     }
29 #else
30     strcat(tmp, " ");
31 #endif
32     strcat(tmp, player_ptr->name);
33
34     c_put_str(TERM_L_BLUE, tmp, 1, 34);
35     c_put_str(TERM_L_BLUE, sp_ptr->title, 3, 9);
36     c_put_str(TERM_L_BLUE, (player_ptr->mimic_form != MimicKindType::NONE ? mimic_info.at(player_ptr->mimic_form).title : rp_ptr->title), 4, 9);
37     c_put_str(TERM_L_BLUE, cp_ptr->title, 5, 9);
38
39     put_str(_("レベル:", "Level :"), 6, 1);
40     put_str(_("HP  :", "Hits  :"), 7, 1);
41     put_str(_("MP  :", "Mana  :"), 8, 1);
42
43     (void)sprintf(buf, "%d", (int)player_ptr->lev);
44     c_put_str(TERM_L_BLUE, buf, 6, 9);
45     (void)sprintf(buf, "%d/%d", (int)player_ptr->chp, (int)player_ptr->mhp);
46     c_put_str(TERM_L_BLUE, buf, 7, 9);
47     (void)sprintf(buf, "%d/%d", (int)player_ptr->csp, (int)player_ptr->msp);
48     c_put_str(TERM_L_BLUE, buf, 8, 9);
49 }