}
/* Process objects on floor */
- for (i = 1; i < o_max; i++)
+ for (i = 1; i < current_floor_ptr->o_max; i++)
{
object_type *o_ptr = ¤t_floor_ptr->o_list[i];
/* Hack -- Compact the object list occasionally */
- if (o_cnt + 32 > current_floor_ptr->max_o_idx) compact_objects(64);
+ if (current_floor_ptr->o_cnt + 32 > current_floor_ptr->max_o_idx) compact_objects(64);
/* Hack -- Compress the object list occasionally */
- if (o_cnt + 32 < o_max) compact_objects(0);
+ if (current_floor_ptr->o_cnt + 32 < current_floor_ptr->o_max) compact_objects(0);
/* Process the player */
process_player();
extern bool shimmer_objects;
extern bool repair_monsters;
extern bool repair_objects;
-extern OBJECT_IDX o_max;
-extern OBJECT_IDX o_cnt;
extern MONSTER_IDX m_max;
extern MONSTER_IDX m_cnt;
extern MONSTER_IDX hack_m_idx;
}
/* Examine each unidentified object */
- for (i = 1; i < o_max; i++)
+ for (i = 1; i < current_floor_ptr->o_max; i++)
{
object_type *o_ptr = ¤t_floor_ptr->o_list[i];
object_kind *k_ptr = &k_info[o_ptr->k_idx];
int i;
/* Very simplified version of wipe_o_list() */
- (void)C_WIPE(current_floor_ptr->o_list, o_max, object_type);
- o_max = 1;
- o_cnt = 0;
+ (void)C_WIPE(current_floor_ptr->o_list, current_floor_ptr->o_max, object_type);
+ current_floor_ptr->o_max = 1;
+ current_floor_ptr->o_cnt = 0;
/* Very simplified version of wipe_m_list() */
for (i = 1; i < max_r_idx; i++)
/* Prevent object over-flow */
- if (o_max >= current_floor_ptr->max_o_idx)
+ if (current_floor_ptr->o_max >= current_floor_ptr->max_o_idx)
{
why = _("アイテムが多すぎる", "too many objects");
okay = FALSE;
}
/* Maintain artifatcs */
- for (i = 1; i < o_max; i++)
+ for (i = 1; i < current_floor_ptr->o_max; i++)
{
object_type *o_ptr = ¤t_floor_ptr->o_list[i];
}
/* Maintain artifatcs */
- for (i = 1; i < o_max; i++)
+ for (i = 1; i < current_floor_ptr->o_max; i++)
{
object_type *o_ptr = ¤t_floor_ptr->o_list[i];
object_type *o_list; /*!< The array of dungeon items [current_floor_ptr->max_o_idx] */
OBJECT_IDX max_o_idx; /*!< Maximum number of objects in the level */
+ OBJECT_IDX o_max; /* Number of allocated objects */
+ OBJECT_IDX o_cnt; /* Number of live objects */
monster_type *m_list; /*!< The array of dungeon monsters [current_floor_ptr->max_m_idx] */
MONSTER_IDX max_m_idx; /*!< Maximum number of monsters in the level */
object_wipe(j_ptr);
/* Count objects */
- o_cnt--;
+ current_floor_ptr->o_cnt--;
}
object_wipe(o_ptr);
/* Count objects */
- o_cnt--;
+ current_floor_ptr->o_cnt--;
}
/* Objects are gone */
if (i1 == i2) return;
/* Repair objects */
- for (i = 1; i < o_max; i++)
+ for (i = 1; i < current_floor_ptr->o_max; i++)
{
o_ptr = ¤t_floor_ptr->o_list[i];
cur_dis = 5 * (20 - cnt);
/* Examine the objects */
- for (i = 1; i < o_max; i++)
+ for (i = 1; i < current_floor_ptr->o_max; i++)
{
o_ptr = ¤t_floor_ptr->o_list[i];
/* Excise dead objects (backwards!) */
- for (i = o_max - 1; i >= 1; i--)
+ for (i = current_floor_ptr->o_max - 1; i >= 1; i--)
{
o_ptr = ¤t_floor_ptr->o_list[i];
if (o_ptr->k_idx) continue;
/* Move last object into open hole */
- compact_objects_aux(o_max - 1, i);
+ compact_objects_aux(current_floor_ptr->o_max - 1, i);
- /* Compress "o_max" */
- o_max--;
+ /* Compress "current_floor_ptr->o_max" */
+ current_floor_ptr->o_max--;
}
}
int i;
/* Delete the existing objects */
- for (i = 1; i < o_max; i++)
+ for (i = 1; i < current_floor_ptr->o_max; i++)
{
object_type *o_ptr = ¤t_floor_ptr->o_list[i];
object_wipe(o_ptr);
}
- /* Reset "o_max" */
- o_max = 1;
+ /* Reset "current_floor_ptr->o_max" */
+ current_floor_ptr->o_max = 1;
- /* Reset "o_cnt" */
- o_cnt = 0;
+ /* Reset "current_floor_ptr->o_cnt" */
+ current_floor_ptr->o_cnt = 0;
}
OBJECT_IDX i;
/* Initial allocation */
- if (o_max < current_floor_ptr->max_o_idx)
+ if (current_floor_ptr->o_max < current_floor_ptr->max_o_idx)
{
/* Get next space */
- i = o_max;
+ i = current_floor_ptr->o_max;
/* Expand object array */
- o_max++;
+ current_floor_ptr->o_max++;
/* Count objects */
- o_cnt++;
+ current_floor_ptr->o_cnt++;
/* Use this object */
return (i);
/* Recycle dead objects */
- for (i = 1; i < o_max; i++)
+ for (i = 1; i < current_floor_ptr->o_max; i++)
{
object_type *o_ptr;
o_ptr = ¤t_floor_ptr->o_list[i];
if (o_ptr->k_idx) continue;
/* Count objects */
- o_cnt++;
+ current_floor_ptr->o_cnt++;
/* Use this object */
return (i);
/*** Dump objects ***/
/* Total objects */
- wr_u16b(o_max);
+ wr_u16b(current_floor_ptr->o_max);
/* Dump the objects */
- for (i = 1; i < o_max; i++)
+ for (i = 1; i < current_floor_ptr->o_max; i++)
{
object_type *o_ptr = ¤t_floor_ptr->o_list[i];
feature_type *f_ptr;
/* Memorize objects */
- for (i = 1; i < o_max; i++)
+ for (i = 1; i < current_floor_ptr->o_max; i++)
{
object_type *o_ptr = ¤t_floor_ptr->o_list[i];
}
/* Forget all objects */
- for (i = 1; i < o_max; i++)
+ for (i = 1; i < current_floor_ptr->o_max; i++)
{
object_type *o_ptr = ¤t_floor_ptr->o_list[i];
if (d_info[p_ptr->dungeon_idx].flags1 & DF1_DARKNESS) range2 /= 3;
/* Scan objects */
- for (i = 1; i < o_max; i++)
+ for (i = 1; i < current_floor_ptr->o_max; i++)
{
object_type *o_ptr = ¤t_floor_ptr->o_list[i];
if (d_info[p_ptr->dungeon_idx].flags1 & DF1_DARKNESS) range2 /= 3;
/* Scan objects */
- for (i = 1; i < o_max; i++)
+ for (i = 1; i < current_floor_ptr->o_max; i++)
{
object_type *o_ptr = ¤t_floor_ptr->o_list[i];
if (d_info[p_ptr->dungeon_idx].flags1 & DF1_DARKNESS) range /= 3;
/* Scan all objects */
- for (i = 1; i < o_max; i++)
+ for (i = 1; i < current_floor_ptr->o_max; i++)
{
object_type *o_ptr = ¤t_floor_ptr->o_list[i];
bool is_loading_now; /*!< ロード直後にcalc_bonus()時の徳変化、及びsanity_blast()による異常を抑止する */
bool hack_mutation;
-OBJECT_IDX o_max = 1; /* Number of allocated objects */
-OBJECT_IDX o_cnt = 0; /* Number of live objects */
MONSTER_IDX m_max = 1; /* Number of allocated monsters */
MONSTER_IDX m_cnt = 0; /* Number of live monsters */