OSDN Git Service

Revert "Revert "Merge branch 'master' of git.osdn.net:/gitroot/hengband/hengband""
[hengbandforosx/hengbandosx.git] / src / load / extra-loader.c
1 /*!
2  * todo 「その他」が雑多すぎて肥大化している。今後の課題として分割を検討する
3  * @brief その他の情報を読み込む処理
4  * @date 2020/07/05
5  * @author Hourier
6  */
7
8 #include "load/extra-loader.h"
9 #include "load/angband-version-comparer.h"
10 #include "load/dummy-loader.h"
11 #include "load/load-util.h"
12 #include "load/world-loader.h"
13 #include "world/world.h"
14
15 /*!
16  * @brief その他の情報を読み込む / Read the "extra" information
17  * @param creature_ptr プレーヤーへの参照ポインタ
18  * @return なし
19  */
20 void rd_extra(player_type *creature_ptr)
21 {
22     if (z_older_than(10, 0, 7))
23         creature_ptr->riding = 0;
24     else
25         rd_s16b(&creature_ptr->riding);
26
27     if (h_older_than(1, 5, 0, 0))
28         creature_ptr->floor_id = 0;
29     else
30         rd_s16b(&creature_ptr->floor_id);
31
32     rd_dummy_monsters(creature_ptr);
33     if (z_older_than(10, 1, 2))
34         current_world_ptr->play_time = 0;
35     else
36         rd_u32b(&current_world_ptr->play_time);
37
38     rd_visited_towns(creature_ptr);
39     if (!z_older_than(11, 0, 5))
40         rd_u32b(&creature_ptr->count);
41 }