1 #include "core/visuals-reseter.h"
2 #include "game-option/special-options.h"
3 #include "grid/feature.h"
4 #include "io/read-pref-file.h"
5 #include "monster-race/monster-race.h"
6 #include "object/object-kind.h"
9 * @brief オブジェクト、地形の表示シンボルなど初期化する / Reset the "visual" lists
10 * @param owner_ptr プレーヤーへの参照ポインタ
11 * @param process_autopick_file_command 自動拾いファイル読み込みへの関数ポインタ
14 void reset_visuals(player_type *owner_ptr, void (*process_autopick_file_command)(char *))
16 for (int i = 0; i < max_f_idx; i++) {
17 feature_type *f_ptr = &f_info[i];
18 for (int j = 0; j < F_LIT_MAX; j++) {
19 f_ptr->x_attr[j] = f_ptr->d_attr[j];
20 f_ptr->x_char[j] = f_ptr->d_char[j];
24 for (int i = 0; i < max_k_idx; i++) {
25 object_kind *k_ptr = &k_info[i];
26 k_ptr->x_attr = k_ptr->d_attr;
27 k_ptr->x_char = k_ptr->d_char;
30 for (int i = 0; i < max_r_idx; i++) {
31 monster_race *r_ptr = &r_info[i];
32 r_ptr->x_attr = r_ptr->d_attr;
33 r_ptr->x_char = r_ptr->d_char;
36 char *pref_file = use_graphics ? "graf.prf" : "font.prf";
37 char *base_name = use_graphics ? "graf-%s.prf" : "font-%s.prf";
39 process_pref_file(owner_ptr, pref_file, process_autopick_file_command);
40 sprintf(buf, base_name, owner_ptr->base_name);
41 process_pref_file(owner_ptr, buf, process_autopick_file_command);