From 1cb863682cba91dc9928eef55e7ef552e4d1651f Mon Sep 17 00:00:00 2001 From: deskull Date: Mon, 23 Dec 2019 23:58:54 +0900 Subject: [PATCH] =?utf8?q?[Refactor]=20#39076=20"inventory=5Flist"=20?= =?utf8?q?=E3=81=AE=20=E7=BD=AE=E6=8F=9B=E5=87=A6=E7=90=86=E3=81=A7?= =?utf8?q?=E8=AA=A4=E3=81=A3=E3=81=9F=E3=82=B3=E3=83=A1=E3=83=B3=E3=83=88?= =?utf8?q?=E3=82=92=E4=BF=AE=E6=AD=A3/=E5=89=8A=E9=99=A4=EF=BC=8E=20/=20Fi?= =?utf8?q?x=20and=20delete=20wrong=20replaced=20'inventory=5Flist'=20comme?= =?utf8?q?nts.?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- src/autopick.c | 4 ++-- src/bldg.c | 2 +- src/cmd/cmd-magiceat.c | 4 ++-- src/cmd/cmd-zapwand.c | 2 +- src/core.c | 4 +--- src/creature.c | 2 +- src/files.c | 10 ++-------- src/load.c | 16 ++++++---------- src/object-broken.c | 6 +++--- src/object-flavor.c | 2 -- src/object-hook.h | 6 +++--- src/object1.c | 2 +- src/object2.c | 20 ++++++++++---------- src/player-inventory.c | 49 ++++++++++++------------------------------------- src/player-move.c | 2 +- src/save.c | 2 -- src/spells-object.c | 2 +- src/spells3.c | 12 ++++++------ src/store.c | 13 +++++-------- src/term.c | 2 +- src/view-mainwindow.c | 4 +--- src/wizard1.c | 1 - 22 files changed, 60 insertions(+), 107 deletions(-) diff --git a/src/autopick.c b/src/autopick.c index 80f012ed3..661a47820 100644 --- a/src/autopick.c +++ b/src/autopick.c @@ -1446,7 +1446,7 @@ static bool is_autopick_aux(object_type *o_ptr, autopick_type *entry, concptr o_ { /* * 'Collecting' means the item must be absorbed - * into an p_ptr->inventory_list slot. + * into an inventory slot. * But an item can not be absorbed into itself! */ if ((&p_ptr->inventory_list[j] != o_ptr) && @@ -1695,7 +1695,7 @@ void autopick_delayed_alter(void) /* * Auto-inscription and/or destroy * - * Auto-destroyer works only on p_ptr->inventory_list or on floor stack only when + * Auto-destroyer works only on inventory or on floor stack only when * requested. */ void autopick_alter_item(INVENTORY_IDX item, bool destroy) diff --git a/src/bldg.c b/src/bldg.c index ea7ba57c1..296c98a17 100644 --- a/src/bldg.c +++ b/src/bldg.c @@ -1800,7 +1800,7 @@ static bool kankin(void) GAME_TEXT o_name[MAX_NLEN]; object_type *o_ptr; - /* Loop for p_ptr->inventory_list and right/left arm */ + /* Loop for inventory and right/left arm */ for (i = 0; i <= INVEN_LARM; i++) { o_ptr = &p_ptr->inventory_list[i]; diff --git a/src/cmd/cmd-magiceat.c b/src/cmd/cmd-magiceat.c index e4248d2a2..13c2a8555 100644 --- a/src/cmd/cmd-magiceat.c +++ b/src/cmd/cmd-magiceat.c @@ -35,8 +35,8 @@ * 400 item comparisons, but only occasionally. * * There may be a BIG problem with any "effect" that can cause "changes" - * to the p_ptr->inventory_list. For example, a "scroll of recharging" can cause - * a wand/staff to "disappear", moving the p_ptr->inventory_list up. Luckily, the + * to the inventory. For example, a "scroll of recharging" can cause + * a wand/staff to "disappear", moving the inventory up. Luckily, the * scrolls all appear BEFORE the staffs/wands, so this is not a problem. * But, for example, a "staff of recharging" could cause MAJOR problems. * In such a case, it will be best to either (1) "postpone" the effect diff --git a/src/cmd/cmd-zapwand.c b/src/cmd/cmd-zapwand.c index ad0366037..824908685 100644 --- a/src/cmd/cmd-zapwand.c +++ b/src/cmd/cmd-zapwand.c @@ -317,7 +317,7 @@ bool wand_effect(player_type *creature_ptr, OBJECT_SUBTYPE_VALUE sval, DIRECTION * Handle "unstacking" in a logical manner. * For simplicity, you cannot use a stack of items from the * ground. This would require too much nasty code. -* There are no wands which can "destroy" themselves, in the p_ptr->inventory_list +* There are no wands which can "destroy" themselves, in the inventory * or on the ground, so we can ignore this possibility. Note that this * required giving "wand of wonder" the ability to ignore destruction * by electric balls. diff --git a/src/core.c b/src/core.c index 980011708..905a08786 100644 --- a/src/core.c +++ b/src/core.c @@ -220,8 +220,6 @@ static void sense_inventory_aux(INVENTORY_IDX slot, bool heavy) #endif } - - /* Message (p_ptr->inventory_list) */ else { #ifdef JP @@ -254,7 +252,7 @@ static void sense_inventory_aux(INVENTORY_IDX slot, bool heavy) * @brief 1プレイヤーターン毎に武器、防具の擬似鑑定が行われるかを判定する。 * @return なし * @details - * Sense the p_ptr->inventory_list\n + * Sense the inventory\n *\n * Class 0 = Warrior --> fast and heavy\n * Class 1 = Mage --> slow and light\n diff --git a/src/creature.c b/src/creature.c index 367ab97cc..a192c5d8d 100644 --- a/src/creature.c +++ b/src/creature.c @@ -18,7 +18,7 @@ * and you must get all the way to "Fast (+50)" to reach the * point of getting 45 energy per turn. After that point, * furthur increases in speed are more or less pointless, - * except to balance out heavy p_ptr->inventory_list. + * except to balance out heavy inventory. * * Note that currently the fastest monster is "Fast (+30)". * diff --git a/src/files.c b/src/files.c index 4789c75ac..505b3acbd 100644 --- a/src/files.c +++ b/src/files.c @@ -406,7 +406,7 @@ static named_num gf_desc[] = * F:\:\:\ * Specify the attr/char values for unaware "objects" by kind tval * U:\:\:\ - * Specify the attr/char values for p_ptr->inventory_list "objects" by kind tval + * Specify the attr/char values for inventory "objects" by kind tval * E:\:\:\ * Define a macro action, given an encoded macro action * A:\ @@ -570,7 +570,7 @@ errr process_pref_file_command(char *buf) } break; - /* Process "E::" -- attribute for p_ptr->inventory_list objects */ + /* Process "E::" -- attribute for inventory objects */ case 'E': if (tokenize(buf+2, 2, zz, TOKENIZE_CHECKQUOTE) == 2) { @@ -4887,7 +4887,6 @@ static void dump_aux_equipment_inventory(FILE *fff) fprintf(fff, "\n\n"); } - /* Dump the p_ptr->inventory_list */ fprintf(fff, _(" [キャラクタの持ち物]\n\n", " [Character Inventory]\n\n")); for (i = 0; i < INVEN_PACK; i++) @@ -4895,7 +4894,6 @@ static void dump_aux_equipment_inventory(FILE *fff) /* Don't dump the empty slots */ if (!p_ptr->inventory_list[i].k_idx) break; - /* Dump the p_ptr->inventory_list slots */ object_desc(o_name, &p_ptr->inventory_list[i], 0); fprintf(fff, "%c) %s\n", index_to_label(i), o_name); } @@ -6423,15 +6421,11 @@ void show_info(void) update_playtime(); display_player(p_ptr, 0); - /* Prompt for p_ptr->inventory_list */ prt(_("何かキーを押すとさらに情報が続きます (ESCで中断): ", "Hit any key to see more information (ESC to abort): "), 23, 0); /* Allow abort at this point */ if (inkey() == ESCAPE) return; - - /* Show equipment and p_ptr->inventory_list */ - /* Equipment -- if any */ if (p_ptr->equip_cnt) { diff --git a/src/load.c b/src/load.c index f66476e8e..083a64cca 100644 --- a/src/load.c +++ b/src/load.c @@ -2400,16 +2400,16 @@ static void rd_extra(player_type *creature_ptr) /*! - * @brief プレイヤーの所持品情報を読み込む / Read the player p_ptr->inventory_list + * @brief プレイヤーの所持品情報を読み込む / Read the player inventory * @return なし * @details - * Note that the p_ptr->inventory_list changed in Angband 2.7.4. Two extra + * Note that the inventory changed in Angband 2.7.4. Two extra * pack slots were added and the equipment was rearranged. Note * that these two features combine when parsing old save-files, in * which items from the old "aux" slot are "carried", perhaps into - * one of the two new "p_ptr->inventory_list" slots. + * one of the two new "inventory" slots. * - * Note that the p_ptr->inventory_list is "re-sorted" later by "dungeon()". + * Note that the inventory is "re-sorted" later by "dungeon()". */ static errr rd_inventory(void) { @@ -2463,13 +2463,11 @@ static errr rd_inventory(void) /* Warning -- backpack is full */ else if (p_ptr->inven_cnt == INVEN_PACK) { - note(_("持ち物の中のアイテムが多すぎる!", "Too many items in the p_ptr->inventory_list!")); + note(_("持ち物の中のアイテムが多すぎる!", "Too many items in the inventory")); /* Fail */ return (54); } - - /* Carry p_ptr->inventory_list */ else { /* Get a slot */ @@ -3848,11 +3846,9 @@ static errr rd_savefile_new_aux(void) p_ptr->spell_order[i] = (SPELL_IDX)tmp8u; } - - /* Read the p_ptr->inventory_list */ if (rd_inventory()) { - note(_("持ち物情報を読み込むことができません", "Unable to read p_ptr->inventory_list")); + note(_("持ち物情報を読み込むことができません", "Unable to read inventory")); return (21); } diff --git a/src/object-broken.c b/src/object-broken.c index 5f3168c0d..7ce57c8f3 100644 --- a/src/object-broken.c +++ b/src/object-broken.c @@ -8,7 +8,7 @@ * @param o_ptr アイテムの情報参照ポインタ * @return 破損するならばTRUEを返す * Note that amulets, rods, and high-level spell books are immune -* to "p_ptr->inventory_list damage" of any kind. Also sling ammo and shovels. +* to "inventory damage" of any kind. Also sling ammo and shovels. * Does a given class of objects (usually) hate acid? * Note that acid can either melt or corrode something. */ @@ -258,10 +258,10 @@ int set_cold_destroy(object_type *o_ptr) * who --- who caused the potion to shatter (0=player) * potions that smash on the floor are assumed to * be caused by no-one (who = 1), as are those that - * shatter inside the player p_ptr->inventory_list. + * shatter inside the player inventory. * (Not anymore -- I changed this; TY) * y, x --- coordinates of the potion (or player if - * the potion was in her p_ptr->inventory_list); + * the potion was in her inventory); * o_ptr --- pointer to the potion object. * */ diff --git a/src/object-flavor.c b/src/object-flavor.c index 1b474b59e..7dc3dcc62 100644 --- a/src/object-flavor.c +++ b/src/object-flavor.c @@ -1379,7 +1379,6 @@ void object_desc(char *buf, object_type *o_ptr, BIT_FLAGS mode) /* Allow flavors to be hidden when aware */ if (aware && ((mode & OD_NO_FLAVOR) || plain_descriptions)) flavor = FALSE; - /* Object is in the p_ptr->inventory_list of a store or spoiler */ if ((mode & OD_STORE) || (o_ptr->ident & IDENT_STORE)) { /* Don't show flavors */ @@ -1883,7 +1882,6 @@ void object_desc(char *buf, object_type *o_ptr, BIT_FLAGS mode) return; } - /* Used in the "p_ptr->inventory_list" routine */ default: { strcpy(buf, _("(なし)", "(nothing)")); diff --git a/src/object-hook.h b/src/object-hook.h index 40cda48b6..a1eb27a1e 100644 --- a/src/object-hook.h +++ b/src/object-hook.h @@ -52,17 +52,17 @@ extern bool can_player_destroy_object(object_type *o_ptr); extern bool object_is_quest_target(object_type *o_ptr); /* - * Determine if a given p_ptr->inventory_list item is "aware" + * Determine if a given inventory item is "aware" */ #define object_is_aware(T) (k_info[(T)->k_idx].aware) /* - * Determine if a given p_ptr->inventory_list item is "tried" + * Determine if a given inventory item is "tried" */ #define object_is_tried(T) (k_info[(T)->k_idx].tried) /* - * Determine if a given p_ptr->inventory_list item is "known" + * Determine if a given inventory item is "known" * Test One -- Check for special "known" tag * Test Two -- Check for "Easy Know" + "Aware" */ diff --git a/src/object1.c b/src/object1.c index 867cb4455..e7579727a 100644 --- a/src/object1.c +++ b/src/object1.c @@ -1304,7 +1304,7 @@ bool screen_object(object_type *o_ptr, BIT_FLAGS mode) /*! * @brief オブジェクト選択時の選択アルファベットラベルを返す / - * Convert an p_ptr->inventory_list index into a one character label + * Convert an inventory index into a one character label * @param i プレイヤーの所持/装備オブジェクトID * @return 対応するアルファベット * @details Note that the label does NOT distinguish inven/equip. diff --git a/src/object2.c b/src/object2.c index 12607205c..7c2be2aeb 100644 --- a/src/object2.c +++ b/src/object2.c @@ -4809,7 +4809,7 @@ OBJECT_IDX drop_near(object_type *j_ptr, PERCENTAGE chance, POSITION y, POSITION /*! * @brief 魔道具の使用回数の残量を示すメッセージを表示する / - * Describe the charges on an item in the p_ptr->inventory_list. + * Describe the charges on an item in the inventory. * @param item 残量を表示したいプレイヤーのアイテム所持スロット * @return なし */ @@ -4850,7 +4850,7 @@ void inven_item_charges(INVENTORY_IDX item) /*! * @brief アイテムの残り所持数メッセージを表示する / - * Describe an item in the p_ptr->inventory_list. + * Describe an item in the inventory. * @param item 残量を表示したいプレイヤーのアイテム所持スロット * @return なし */ @@ -4897,7 +4897,7 @@ void vary_item(INVENTORY_IDX item, ITEM_NUMBER num) /*! * @brief アイテムを増減させ残り所持数メッセージを表示する / - * Increase the "number" of an item in the p_ptr->inventory_list + * Increase the "number" of an item in the inventory * @param item 所持数を増やしたいプレイヤーのアイテム所持スロット * @param num 増やしたい量 * @return なし @@ -4946,7 +4946,7 @@ void inven_item_increase(INVENTORY_IDX item, ITEM_NUMBER num) /*! * @brief 所持アイテムスロットから所持数のなくなったアイテムを消去する / - * Erase an p_ptr->inventory_list slot if it has no more items + * Erase an inventory slot if it has no more items * @param item 消去したいプレイヤーのアイテム所持スロット * @return なし */ @@ -5233,13 +5233,13 @@ bool object_sort_comp(object_type *o_ptr, s32b o_value, object_type *j_ptr) /*! * @brief オブジェクトをプレイヤーが拾って所持スロットに納めるメインルーチン / - * Add an item to the players p_ptr->inventory_list, and return the slot used. + * Add an item to the players inventory, and return the slot used. * @param o_ptr 拾うオブジェクトの構造体参照ポインタ * @return 収められた所持スロットのID、拾うことができなかった場合-1を返す。 * @details - * If the new item can combine with an existing item in the p_ptr->inventory_list,\n + * If the new item can combine with an existing item in the inventory,\n * it will do so, using "object_similar()" and "object_absorb()", else,\n - * the item will be placed into the "proper" location in the p_ptr->inventory_list.\n + * the item will be placed into the "proper" location in the inventory.\n *\n * This function can be used to "over-fill" the player's pack, but only\n * once, and such an action must trigger the "overflow" code immediately.\n @@ -5249,7 +5249,7 @@ bool object_sort_comp(object_type *o_ptr, s32b o_value, object_type *j_ptr) * combined. This may be tricky. See "dungeon.c" for info.\n *\n * Note that this code must remove any location/stack information\n - * from the object once it is placed into the p_ptr->inventory_list.\n + * from the object once it is placed into the inventory.\n */ s16b inven_carry(object_type *o_ptr) { @@ -5364,7 +5364,7 @@ s16b inven_carry(object_type *o_ptr) * Note that only one item at a time can be wielded per slot.\n * Note that taking off an item when "full" may cause that item\n * to fall to the ground.\n - * Return the p_ptr->inventory_list slot into which the item is placed.\n + * Return the inventory slot into which the item is placed.\n */ INVENTORY_IDX inven_takeoff(INVENTORY_IDX item, ITEM_NUMBER amt) { @@ -5440,7 +5440,7 @@ INVENTORY_IDX inven_takeoff(INVENTORY_IDX item, ITEM_NUMBER amt) /*! * @brief 所持スロットから床下にオブジェクトを落とすメインルーチン / - * Drop (some of) a non-cursed p_ptr->inventory_list/equipment item + * Drop (some of) a non-cursed inventory/equipment item * @param item 所持テーブルのID * @param amt 落としたい個数 * @return なし diff --git a/src/player-inventory.c b/src/player-inventory.c index 542a50be3..df9d5bd1c 100644 --- a/src/player-inventory.c +++ b/src/player-inventory.c @@ -274,7 +274,7 @@ bool can_get_item(OBJECT_TYPE_VALUE tval) /*! * @brief 床オブジェクトに選択タグを与える/タグに該当するオブジェクトがあるかを返す / - * Find the "first" p_ptr->inventory_list object with the given "tag". + * Find the "first" inventory object with the given "tag". * @param cp 対応するタグIDを与える参照ポインタ * @param tag 該当するオブジェクトがあるかを調べたいタグ * @param floor_list 床上アイテムの配列 @@ -370,7 +370,7 @@ static bool get_tag_floor(COMMAND_CODE *cp, char tag, FLOOR_IDX floor_list[], IT /*! * @brief 所持/装備オブジェクトに選択タグを与える/タグに該当するオブジェクトがあるかを返す / - * Find the "first" p_ptr->inventory_list object with the given "tag". + * Find the "first" inventory object with the given "tag". * @param cp 対応するタグIDを与える参照ポインタ * @param tag 該当するオブジェクトがあるかを調べたいタグ * @param mode 所持、装備の切り替え @@ -408,7 +408,6 @@ static bool get_tag(COMMAND_CODE *cp, char tag, BIT_FLAGS mode, OBJECT_TYPE_VALU /**** Find a tag in the form of {@x#} (allow alphabet tag) ***/ - /* Check every p_ptr->inventory_list object */ for (i = start; i <= end; i++) { object_type *o_ptr = &p_ptr->inventory_list[i]; @@ -429,7 +428,6 @@ static bool get_tag(COMMAND_CODE *cp, char tag, BIT_FLAGS mode, OBJECT_TYPE_VALU /* Check the special tags */ if ((s[1] == command_cmd) && (s[2] == tag)) { - /* Save the actual p_ptr->inventory_list ID */ *cp = i; /* Success */ @@ -472,7 +470,6 @@ static bool get_tag(COMMAND_CODE *cp, char tag, BIT_FLAGS mode, OBJECT_TYPE_VALU /* Check the normal tags */ if (s[1] == tag) { - /* Save the actual p_ptr->inventory_list ID */ *cp = i; /* Success */ @@ -561,7 +558,7 @@ static void prepare_label_string_floor(char *label, FLOOR_IDX floor_list[], ITEM /*! * @brief 所持アイテムの表示を行う / - * Display the p_ptr->inventory_list. + * Display the inventory. * @param target_item アイテムの選択処理を行うか否か。 * @return 選択したアイテムのタグ * @details @@ -603,7 +600,6 @@ COMMAND_CODE show_inven(int target_item, BIT_FLAGS mode, OBJECT_TYPE_VALUE tval) prepare_label_string(inven_label, USE_INVEN, tval); - /* Display the p_ptr->inventory_list */ for (k = 0, i = 0; i < z; i++) { o_ptr = &p_ptr->inventory_list[i]; @@ -823,10 +819,10 @@ static bool get_item_allow(INVENTORY_IDX item) * All "item_tester" restrictions are cleared before this function returns.\n *\n * The user is allowed to choose acceptable items from the equipment,\n - * p_ptr->inventory_list, or floor, respectively, if the proper flag was given,\n + * inventory, or floor, respectively, if the proper flag was given,\n * and there are any acceptable items in that location.\n *\n - * The equipment or p_ptr->inventory_list are displayed (even if no acceptable\n + * The equipment or inventory are displayed (even if no acceptable\n * items are in that location) if the proper flag was given.\n *\n * If there are no acceptable items available anywhere, and "str" is\n @@ -835,10 +831,10 @@ static bool get_item_allow(INVENTORY_IDX item) *\n * Note that the user must press "-" to specify the item on the floor,\n * and there is no way to "examine" the item on the floor, while the\n - * use of "capital" letters will "examine" an p_ptr->inventory_list/equipment item,\n + * use of "capital" letters will "examine" an inventory/equipment item,\n * and prompt for its use.\n *\n - * If a legal item is selected from the p_ptr->inventory_list, we save it in "cp"\n + * If a legal item is selected from the inventory, we save it in "cp"\n * directly (0 to 35), and return TRUE.\n *\n * If a legal item is selected from the floor, we save it in "cp" as\n @@ -849,15 +845,15 @@ static bool get_item_allow(INVENTORY_IDX item) *\n * If no item is selected, we do nothing to "cp", and return FALSE.\n *\n - * Global "p_ptr->command_new" is used when viewing the p_ptr->inventory_list or equipment\n + * Global "command_new" is used when viewing the inventory or equipment\n * to allow the user to enter a command while viewing those screens, and\n * also to induce "auto-enter" of stores, and other such stuff.\n *\n - * Global "p_ptr->command_see" may be set before calling this function to start\n + * Global "command_see" may be set before calling this function to start\n * out in "browse" mode. It is cleared before this function returns.\n *\n - * Global "p_ptr->command_wrk" is used to choose between equip/inven listings.\n - * If it is TRUE then we are viewing p_ptr->inventory_list, else equipment.\n + * Global "command_wrk" is used to choose between equip/inven listings.\n + * If it is TRUE then we are viewing inventory, else equipment.\n *\n * We always erase the prompt when we are done, leaving a blank line,\n * or a warning message, if appropriate, if no items are available.\n @@ -983,12 +979,9 @@ bool get_item(OBJECT_IDX *cp, concptr pmt, concptr str, BIT_FLAGS mode, OBJECT_T /* No item selected */ item = FALSE; - - /* Full p_ptr->inventory_list */ i1 = 0; i2 = INVEN_PACK - 1; - /* Forbid p_ptr->inventory_list */ if (!inven) i2 = -1; else if (use_menu) { @@ -996,7 +989,6 @@ bool get_item(OBJECT_IDX *cp, concptr pmt, concptr str, BIT_FLAGS mode, OBJECT_T if (item_tester_okay(&p_ptr->inventory_list[j], tval) || (mode & USE_FULL)) max_inven++; } - /* Restrict p_ptr->inventory_list indexes */ while ((i1 <= i2) && (!get_item_okay(i1))) i1++; while ((i1 <= i2) && (!get_item_okay(i2))) i2--; @@ -1060,25 +1052,21 @@ bool get_item(OBJECT_IDX *cp, concptr pmt, concptr str, BIT_FLAGS mode, OBJECT_T /* Analyze choices */ else { - /* Hack -- Start on equipment if requested */ if (command_see && command_wrk && equip) { command_wrk = TRUE; } - /* Use p_ptr->inventory_list if allowed */ else if (inven) { command_wrk = FALSE; } - /* Use equipment if allowed */ else if (equip) { command_wrk = TRUE; } - /* Use p_ptr->inventory_list for floor */ else { command_wrk = FALSE; @@ -1143,7 +1131,6 @@ bool get_item(OBJECT_IDX *cp, concptr pmt, concptr str, BIT_FLAGS mode, OBJECT_T if (command_see) get_item_label = show_equip(menu_line, mode, tval); } - /* Viewing p_ptr->inventory_list */ if (!command_wrk) { /* Begin the prompt */ @@ -1454,7 +1441,6 @@ bool get_item(OBJECT_IDX *cp, concptr pmt, concptr str, BIT_FLAGS mode, OBJECT_T case '\n': case '\r': { - /* Choose "default" p_ptr->inventory_list item */ if (!command_wrk) { k = ((i1 == i2) ? i1 : -1); @@ -1537,7 +1523,6 @@ bool get_item(OBJECT_IDX *cp, concptr pmt, concptr str, BIT_FLAGS mode, OBJECT_T ver = isupper(which); which = (char)tolower(which); - /* Convert letter to p_ptr->inventory_list index */ if (!command_wrk) { if (which == '(') k = i1; @@ -1737,7 +1722,6 @@ COMMAND_CODE show_floor(int target_item, POSITION y, POSITION x, TERM_LEN *min_w /* Save the index */ out_index[k] = i; - /* Acquire p_ptr->inventory_list color */ out_color[k] = tval_to_attr[o_ptr->tval & 0x7F]; /* Save the object description */ @@ -1967,12 +1951,9 @@ bool get_item_floor(COMMAND_CODE *cp, concptr pmt, concptr str, BIT_FLAGS mode, /* No item selected */ item = FALSE; - - /* Full p_ptr->inventory_list */ i1 = 0; i2 = INVEN_PACK - 1; - /* Forbid p_ptr->inventory_list */ if (!inven) i2 = -1; else if (use_menu) { @@ -1980,7 +1961,6 @@ bool get_item_floor(COMMAND_CODE *cp, concptr pmt, concptr str, BIT_FLAGS mode, if (item_tester_okay(&p_ptr->inventory_list[j], tval) || (mode & USE_FULL)) max_inven++; } - /* Restrict p_ptr->inventory_list indexes */ while ((i1 <= i2) && (!get_item_okay(i1))) i1++; while ((i1 <= i2) && (!get_item_okay(i2))) i2--; @@ -2022,7 +2002,6 @@ bool get_item_floor(COMMAND_CODE *cp, concptr pmt, concptr str, BIT_FLAGS mode, floor_num = scan_floor(floor_list, p_ptr->y, p_ptr->x, 0x03); } - /* Accept p_ptr->inventory_list */ if (i1 <= i2) allow_inven = TRUE; /* Accept equipment */ @@ -2055,7 +2034,6 @@ bool get_item_floor(COMMAND_CODE *cp, concptr pmt, concptr str, BIT_FLAGS mode, command_wrk = (USE_EQUIP); } - /* Use p_ptr->inventory_list if allowed */ else if (allow_inven) { command_wrk = (USE_INVEN); @@ -2154,7 +2132,6 @@ bool get_item_floor(COMMAND_CODE *cp, concptr pmt, concptr str, BIT_FLAGS mode, if (command_see) get_item_label = show_floor(menu_line, p_ptr->y, p_ptr->x, &min_width); } - /* Viewing p_ptr->inventory_list */ if (command_wrk == (USE_INVEN)) { /* Begin the prompt */ @@ -2732,7 +2709,6 @@ bool get_item_floor(COMMAND_CODE *cp, concptr pmt, concptr str, BIT_FLAGS mode, case '\n': case '\r': { - /* Choose "default" p_ptr->inventory_list item */ if (command_wrk == (USE_INVEN)) { k = ((i1 == i2) ? i1 : -1); @@ -2858,7 +2834,6 @@ bool get_item_floor(COMMAND_CODE *cp, concptr pmt, concptr str, BIT_FLAGS mode, ver = isupper(which); which = (char)tolower(which); - /* Convert letter to p_ptr->inventory_list index */ if (command_wrk == (USE_INVEN)) { if (which == '(') k = i1; @@ -3462,7 +3437,7 @@ COMMAND_CODE show_equip(int target_item, BIT_FLAGS mode, OBJECT_TYPE_VALUE tval) * @param i 状態表現を求めるプレイヤーの所持/装備オブジェクトID * @return 状態表現内容の文字列ポインタ * @details - * Currently, only used for items in the equipment, not p_ptr->inventory_list. + * Currently, only used for items in the equipment, inventory. */ concptr describe_use(int i) { diff --git a/src/player-move.c b/src/player-move.c index cf64deaaf..f6303ab04 100644 --- a/src/player-move.c +++ b/src/player-move.c @@ -264,7 +264,7 @@ void search(player_type *creature_ptr) * だが、違和感が\n * あるという指摘をうけたので、「~を拾った、~を持っている」という表示\n * にかえてある。そのための配列。\n - * Add the given dungeon object to the character's p_ptr->inventory_list.\n + * Add the given dungeon object to the character's inventory.\n * Delete the object afterwards.\n */ void py_pickup_aux(OBJECT_IDX o_idx) diff --git a/src/save.c b/src/save.c index 367f3000d..8cc13c8c2 100644 --- a/src/save.c +++ b/src/save.c @@ -1427,8 +1427,6 @@ static bool wr_savefile_new(void) wr_byte((byte_hack)p_ptr->spell_order[i]); } - - /* Write the p_ptr->inventory_list */ for (i = 0; i < INVEN_TOTAL; i++) { object_type *o_ptr = &p_ptr->inventory_list[i]; diff --git a/src/spells-object.c b/src/spells-object.c index e89d2c7e0..41d14d2f6 100644 --- a/src/spells-object.c +++ b/src/spells-object.c @@ -1240,7 +1240,7 @@ bool enchant(object_type *o_ptr, int n, int eflag) /*! * @brief 装備修正強化処理のメインルーチン / - * Enchant an item (in the p_ptr->inventory_list or on the floor) + * Enchant an item (in the inventory or on the floor) * @param num_hit 命中修正量 * @param num_dam ダメージ修正量 * @param num_ac AC修正量 diff --git a/src/spells3.c b/src/spells3.c index 2bc58d5ac..3677f68a4 100644 --- a/src/spells3.c +++ b/src/spells3.c @@ -1393,7 +1393,7 @@ void identify_pack(player_type *target_ptr) /*! * @brief 装備の解呪処理 / - * Removes curses from items in p_ptr->inventory_list + * Removes curses from items in inventory * @param all 軽い呪いまでの解除ならば0 * @return 解呪されたアイテムの数 * @details @@ -1708,7 +1708,7 @@ bool identify_item(player_type *owner_ptr, object_type *o_ptr) /*! * @brief アイテム鑑定のメインルーチン処理 / - * Identify an object in the p_ptr->inventory_list (or on the floor) + * Identify an object in the inventory (or on the floor) * @param only_equip 装備品のみを対象とするならばTRUEを返す * @return 実際に鑑定を行ったならばTRUEを返す * @details @@ -1773,12 +1773,12 @@ bool ident_spell(player_type *caster_ptr, bool only_equip) /*! * @brief アイテム凡庸化のメインルーチン処理 / - * Identify an object in the p_ptr->inventory_list (or on the floor) + * Identify an object in the inventory (or on the floor) * @param only_equip 装備品のみを対象とするならばTRUEを返す * @return 実際に凡庸化をを行ったならばTRUEを返す * @details *
- * Mundanify an object in the p_ptr->inventory_list (or on the floor)
+ * Mundanify an object in the inventory (or on the floor)
  * This routine does *not* automatically combine objects.
  * Returns TRUE if something was mundanified, else FALSE.
  * 
@@ -1824,11 +1824,11 @@ bool mundane_spell(bool only_equip) /*! * @brief アイテム*鑑定*のメインルーチン処理 / - * Identify an object in the p_ptr->inventory_list (or on the floor) + * Identify an object in the inventory (or on the floor) * @param only_equip 装備品のみを対象とするならばTRUEを返す * @return 実際に鑑定を行ったならばTRUEを返す * @details - * Fully "identify" an object in the p_ptr->inventory_list -BEN- + * Fully "identify" an object in the inventory -BEN- * This routine returns TRUE if an item was identified. */ bool identify_fully(bool only_equip) diff --git a/src/store.c b/src/store.c index 425ba229b..da4243075 100644 --- a/src/store.c +++ b/src/store.c @@ -3016,7 +3016,7 @@ bool combine_and_reorder_home(int store_num) /*! * @brief 我が家にオブジェクトを加える / - * Add the item "o_ptr" to the p_ptr->inventory_list of the "Home" + * Add the item "o_ptr" to the inventory of the "Home" * @param o_ptr 加えたいオブジェクトの構造体参照ポインタ * @return 収めた先のID * @details @@ -3121,7 +3121,7 @@ static int home_carry(object_type *o_ptr) /*! * @brief 店舗にオブジェクトを加える / - * Add the item "o_ptr" to a real stores p_ptr->inventory_list. + * Add the item "o_ptr" to a real stores inventory. * @param o_ptr 加えたいオブジェクトの構造体参照ポインタ * @return 収めた先のID * @details @@ -3226,7 +3226,7 @@ static int store_carry(object_type *o_ptr) /*! * @brief 店舗のオブジェクト数を増やす / - * Add the item "o_ptr" to a real stores p_ptr->inventory_list. + * Add the item "o_ptr" to a real stores inventory. * @param item 増やしたいアイテムのID * @param num 増やしたい数 * @return なし @@ -3685,7 +3685,7 @@ static void display_entry(int pos) /*! * @brief 店の商品リストを表示する / - * Displays a store's p_ptr->inventory_list -RAK- + * Displays a store's inventory -RAK- * @return なし * @details * All prices are listed as "per individual object". -BEN- @@ -3830,8 +3830,6 @@ static void display_store(void) /* Display the current gold */ store_prt_gold(); - - /* Draw in the p_ptr->inventory_list */ display_inventory(); } @@ -4801,7 +4799,6 @@ static void store_purchase(void) msg_print(_("店主は新たな在庫を取り出した。", "The shopkeeper brings out some new stock.")); } - /* New p_ptr->inventory_list */ for (i = 0; i < 10; i++) { /* Maintain the store */ @@ -6036,7 +6033,7 @@ void store_shuffle(int which) /*! * @brief 店の品揃えを変化させる / - * Maintain the p_ptr->inventory_list at the stores. + * Maintain the inventory at the stores. * @param town_num 町のID * @param store_num 店舗種類のID * @return なし diff --git a/src/term.c b/src/term.c index 7319f3711..3cba10a2c 100644 --- a/src/term.c +++ b/src/term.c @@ -365,7 +365,7 @@ TERM_COLOR misc_to_attr[256]; SYMBOL_CODE misc_to_char[256]; /* - * Specify attr/char pairs for p_ptr->inventory_list items (by tval) + * Specify attr/char pairs for inventory items (by tval) * Be sure to use "index & 0x7F" to avoid illegal access */ TERM_COLOR tval_to_attr[128]; diff --git a/src/view-mainwindow.c b/src/view-mainwindow.c index d9cdac998..97d73f5de 100644 --- a/src/view-mainwindow.c +++ b/src/view-mainwindow.c @@ -1552,7 +1552,7 @@ static void prt_frame_extra(void) /*! - * @brief サブウィンドウに所持品一覧を表示する / Hack -- display p_ptr->inventory_list in sub-windows + * @brief サブウィンドウに所持品一覧を表示する / Hack -- display inventory in sub-windows * @return なし */ static void fix_inven(void) @@ -1573,7 +1573,6 @@ static void fix_inven(void) /* Activate */ Term_activate(angband_term[j]); - /* Display p_ptr->inventory_list */ display_inven(p_ptr, item_tester_tval); Term_fresh(); Term_activate(old); @@ -2281,7 +2280,6 @@ void window_stuff(void) /* Nothing to do */ if (!p_ptr->window) return; - /* Display p_ptr->inventory_list */ if (p_ptr->window & (PW_INVEN)) { p_ptr->window &= ~(PW_INVEN); diff --git a/src/wizard1.c b/src/wizard1.c index 25c148931..75141aada 100644 --- a/src/wizard1.c +++ b/src/wizard1.c @@ -2535,7 +2535,6 @@ void spoil_random_artifact(concptr fname) spoil_random_artifact_aux(q_ptr, j); } - /* random artifacts in p_ptr->inventory_list */ for (i = 0; i < INVEN_PACK; i++) { q_ptr = &p_ptr->inventory_list[i]; -- 2.11.0