X-Git-Url: http://git.osdn.net/view?a=blobdiff_plain;f=src%2Fbirth.c;h=bef4cdbb9bd8a45d10a068583c503056e734a236;hb=fff15ebf01541ddc16eae5457f09acee9787940e;hp=518f423da137dc1753665d63a7441f0c116362cf;hpb=1cb0e90bf318d74999293d9d8813e8783f3eb3c6;p=hengband%2Fhengband.git diff --git a/src/birth.c b/src/birth.c index 518f423da..bef4cdbb9 100644 --- a/src/birth.c +++ b/src/birth.c @@ -12,12 +12,17 @@ */ #include "angband.h" +#include "util.h" +#include "bldg.h" + +#include "artifact.h" #include "avatar.h" #include "history.h" #include "monsterrace-hook.h" #include "store.h" #include "patron.h" #include "quest.h" +#include "player-class.h" #include "player-status.h" #include "spells.h" #include "spells-status.h" @@ -25,6 +30,13 @@ #include "floor.h" #include "cmd-pet.h" #include "dungeon-file.h" +#include "files.h" +#include "birth.h" +#include "player-skill.h" +#include "world.h" +#include "objectkind.h" +#include "monsterrace.h" +#include "autopick.h" /*! * オートローラーの内容を描画する間隔 / @@ -1675,13 +1687,13 @@ static void player_wipe_without_name(void) p_ptr->total_weight = 0; /* No items */ - inven_cnt = 0; - equip_cnt = 0; + p_ptr->inven_cnt = 0; + p_ptr->equip_cnt = 0; - /* Clear the inventory */ + /* Clear the p_ptr->inventory_list */ for (i = 0; i < INVEN_TOTAL; i++) { - object_wipe(&inventory[i]); + object_wipe(&p_ptr->inventory_list[i]); } @@ -1931,7 +1943,7 @@ static void wield_all(void) /* Scan through the slots backwards */ for (item = INVEN_PACK - 1; item >= 0; item--) { - o_ptr = &inventory[item]; + o_ptr = &p_ptr->inventory_list[item]; /* Skip non-objects */ if (!o_ptr->k_idx) continue; @@ -1940,7 +1952,7 @@ static void wield_all(void) slot = wield_slot(o_ptr); if (slot < INVEN_RARM) continue; if (slot == INVEN_LITE) continue; /* Does not wield toaches because buys a lantern soon */ - if (inventory[slot].k_idx) continue; + if (p_ptr->inventory_list[slot].k_idx) continue; i_ptr = &object_type_body; object_copy(i_ptr, o_ptr); @@ -1960,12 +1972,12 @@ static void wield_all(void) floor_item_optimize(0 - item); } - o_ptr = &inventory[slot]; + o_ptr = &p_ptr->inventory_list[slot]; object_copy(o_ptr, i_ptr); p_ptr->total_weight += i_ptr->weight; /* Increment the equip counter by hand */ - equip_cnt++; + p_ptr->equip_cnt++; } return; @@ -4618,8 +4630,8 @@ void player_birth(void) seed_wilderness(); /* Give beastman a mutation at character birth */ - if (p_ptr->prace == RACE_BEASTMAN) hack_mutation = TRUE; - else hack_mutation = FALSE; + if (p_ptr->prace == RACE_BEASTMAN) p_ptr->hack_mutation = TRUE; + else p_ptr->hack_mutation = FALSE; /* Set the message window flag as default */ if (!window_flag[1])