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 p_ptr->inventory_list */
for (i = 0; i < INVEN_TOTAL; i++)
p_ptr->total_weight += i_ptr->weight;
/* Increment the equip counter by hand */
- equip_cnt++;
+ p_ptr->equip_cnt++;
}
return;
p_ptr->total_weight += q_ptr->weight;
/* Increment the equip counter by hand */
- equip_cnt++;
+ p_ptr->equip_cnt++;
p_ptr->update |= (PU_BONUS | PU_TORCH | PU_MANA);
p_ptr->window |= (PW_EQUIP);
p_ptr->total_weight += q_ptr->weight;
/* Increment the equip counter by hand */
- equip_cnt++;
+ p_ptr->equip_cnt++;
#define STR_WIELD_RARM _("%s(%c)を右手に装備した。", "You are wielding %s (%c) in your right hand.")
#define STR_WIELD_LARM _("%s(%c)を左手に装備した。", "You are wielding %s (%c) in your left hand.")
extern bool shimmer_objects;
extern bool repair_monsters;
extern bool repair_objects;
-extern s16b inven_cnt;
-extern s16b equip_cnt;
extern OBJECT_IDX o_max;
extern OBJECT_IDX o_cnt;
extern MONSTER_IDX m_max;
GAME_TEXT o_name[MAX_NLEN];
/* Dump the equipment */
- if (equip_cnt)
+ if (p_ptr->equip_cnt)
{
fprintf(fff, _(" [キャラクタの装備]\n\n", " [Character Equipment]\n\n"));
for (i = INVEN_RARM; i < INVEN_TOTAL; i++)
/* Show equipment and p_ptr->inventory_list */
/* Equipment -- if any */
- if (equip_cnt)
+ if (p_ptr->equip_cnt)
{
Term_clear();
(void)show_equip(0, USE_FULL);
}
/* Inventory -- if any */
- if (inven_cnt)
+ if (p_ptr->inven_cnt)
{
Term_clear();
(void)show_inven(0, USE_FULL);
p_ptr->total_weight = 0;
/* No items */
- inven_cnt = 0;
- equip_cnt = 0;
+ p_ptr->inven_cnt = 0;
+ p_ptr->equip_cnt = 0;
/* Read until done */
while (1)
p_ptr->total_weight += (q_ptr->number * q_ptr->weight);
/* One more item */
- equip_cnt++;
+ p_ptr->equip_cnt++;
}
/* Warning -- backpack is full */
- else if (inven_cnt == INVEN_PACK)
+ else if (p_ptr->inven_cnt == INVEN_PACK)
{
note(_("持ち物の中のアイテムが多すぎる!", "Too many items in the p_ptr->inventory_list!"));
p_ptr->total_weight += (q_ptr->number * q_ptr->weight);
/* One more item */
- inven_cnt++;
+ p_ptr->inven_cnt++;
}
}
int i;
/* One less item */
- inven_cnt--;
+ p_ptr->inven_cnt--;
/* Slide everything down */
for (i = item; i < INVEN_PACK; i++)
else
{
/* One less item */
- equip_cnt--;
+ p_ptr->equip_cnt--;
/* Erase the empty slot */
object_wipe(&p_ptr->inventory_list[item]);
int j;
/* Empty slot? */
- if (inven_cnt < INVEN_PACK) return (TRUE);
+ if (p_ptr->inven_cnt < INVEN_PACK) return (TRUE);
/* Similar slot? */
for (j = 0; j < INVEN_PACK; j++)
}
}
- if (inven_cnt > INVEN_PACK) return (-1);
+ if (p_ptr->inven_cnt > INVEN_PACK) return (-1);
/* Find an empty slot */
for (j = 0; j <= INVEN_PACK; j++)
p_ptr->total_weight += (j_ptr->number * j_ptr->weight);
/* Count the items */
- inven_cnt++;
+ p_ptr->inven_cnt++;
p_ptr->update |= (PU_BONUS | PU_COMBINE | PU_REORDER);
p_ptr->window |= (PW_INVEN);
object_absorb(j_ptr, o_ptr);
/* One object is gone */
- inven_cnt--;
+ p_ptr->inven_cnt--;
/* Slide everything down */
for (k = i; k < INVEN_PACK; k++)
for (i = 0; i < INVEN_PACK; i++)
{
/* Mega-Hack -- allow "proper" over-flow */
- if ((i == INVEN_PACK) && (inven_cnt == INVEN_PACK)) break;
+ if ((i == INVEN_PACK) && (p_ptr->inven_cnt == INVEN_PACK)) break;
o_ptr = &p_ptr->inventory_list[i];
s32b feeling_turn; /* The current_world_ptr->game_turn of the last dungeon feeling */
object_type *inventory_list; /* The player's p_ptr->inventory_list [INVEN_TOTAL] */
+ s16b inven_cnt; /* Number of items in inventory */
+ s16b equip_cnt; /* Number of items in equipment */
/*** Temporary fields ***/
bool is_loading_now; /*!< ロード直後にcalc_bonus()時の徳変化、及びsanity_blast()による異常を抑止する */
bool hack_mutation;
-s16b inven_cnt; /* Number of items in p_ptr->inventory_list */
-s16b equip_cnt; /* Number of items in equipment */
-
OBJECT_IDX o_max = 1; /* Number of allocated objects */
OBJECT_IDX o_cnt = 0; /* Number of live objects */