OSDN Git Service

[fix] #41503 超能力者でゲームを開始しようとするとクラッシュ
[hengband/hengband.git] / src / view / display-birth.c
1 #include "view/display-birth.h"
2 #include "birth/auto-roller.h"
3 #include "birth/birth-stat.h"
4 #include "game-option/birth-options.h"
5 #include "player/player-class.h"
6 #include "player/player-personality.h"
7 #include "player/player-race.h"
8 #include "term/screen-processor.h"
9 #include "term/term-color-types.h"
10
11 /*!
12  * @brief オートロール中のステータスを表示する / Display stat values, subset of "put_stats()"
13  * @details See 'display_player(p_ptr, )' for screen layout constraints.
14  * @return なし
15  */
16 void birth_put_stats(player_type *creature_ptr)
17 {
18     if (!autoroller)
19         return;
20
21     const int col = 22;
22     for (int i = 0; i < A_MAX; i++) {
23         int j = rp_ptr->r_adj[i] + cp_ptr->c_adj[i] + ap_ptr->a_adj[i];
24         int m = adjust_stat(creature_ptr->stat_max[i], j);
25         char buf[80];
26         cnv_stat(m, buf);
27         c_put_str(TERM_L_GREEN, buf, 3 + i, col + 24);
28     }
29 }