if ((i == NO_TOWN) || (i == SECRET_TOWN) || (i == p_ptr->town_num) || !(p_ptr->visit & (1L << (i - 1)))) continue;
- sprintf(buf, "%c) %-20s", I2A(i - 1), town[i].name);
+ sprintf(buf, "%c) %-20s", I2A(i - 1), town_info[i].name);
prt(buf, 5 + i, 5);
num++;
}
/* No useful feeling in town */
else if (p_ptr->town_num && !dun_level)
{
- if (!strcmp(town[p_ptr->town_num].name, _("荒野", "wilderness")))
+ if (!strcmp(town_info[p_ptr->town_num].name, _("荒野", "wilderness")))
{
msg_print(_("何かありそうな荒野のようだ。", "Looks like a strange wilderness."));
return;
do_cmd_knowledge_inven_aux(fff, &inventory[i], &j, tval, where);
}
- st_ptr = &town[1].store[STORE_HOME];
+ st_ptr = &town_info[1].store[STORE_HOME];
strcpy(where, _("家", "H "));
for (i = 0; i < st_ptr->stock_num; i++)
{
if (fff)
{
/* Print all homes in the different towns */
- st_ptr = &town[1].store[STORE_HOME];
+ st_ptr = &town_info[1].store[STORE_HOME];
/* Home -- if anything there */
if (st_ptr->stock_num)
{
for (j = 0; j < MAX_STORES; j++)
{
- store_type *st_ptr = &town[i].store[j];
+ store_type *st_ptr = &town_info[i].store[j];
if (st_ptr->last_visit > -10L * TURNS_PER_TICK * STORE_TICKS)
{
extern s16b *mproc_list[MAX_MTIMED];
extern s16b mproc_max[MAX_MTIMED];
extern u16b max_towns;
-extern town_type *town;
+extern town_type *town_info;
extern object_type *inventory;
extern s16b alloc_kind_size;
extern alloc_entry *alloc_kind_table;
/* process_dungeon_file("w_info.txt", 0, 0, max_wild_y, max_wild_x); */
/* Print the home */
- st_ptr = &town[1].store[STORE_HOME];
+ st_ptr = &town_info[1].store[STORE_HOME];
/* Home -- if anything there */
if (st_ptr->stock_num)
/* Print the home */
- st_ptr = &town[1].store[STORE_MUSEUM];
+ st_ptr = &town_info[1].store[STORE_MUSEUM];
/* Home -- if anything there */
if (st_ptr->stock_num)
for (i = 1; i < max_towns; i++)
{
- st_ptr = &town[i].store[STORE_HOME];
+ st_ptr = &town_info[i].store[STORE_HOME];
/* Hack -- Know everything in the home */
for (j = 0; j < st_ptr->stock_num; j++)
/* Homes in the different towns */
for (l = 1; l < max_towns; l++)
{
- st_ptr = &town[l].store[STORE_HOME];
+ st_ptr = &town_info[l].store[STORE_HOME];
/* Home -- if anything there */
if (st_ptr->stock_num)
/*** Prepare the Towns ***/
/* Allocate the towns */
- C_MAKE(town, max_towns, town_type);
+ C_MAKE(town_info, max_towns, town_type);
for (i = 1; i < max_towns; i++)
{
/*** Prepare the Stores ***/
/* Allocate the stores */
- C_MAKE(town[i].store, MAX_STORES, store_type);
+ C_MAKE(town_info[i].store, MAX_STORES, store_type);
/* Fill in each store */
for (j = 0; j < MAX_STORES; j++)
{
/* Access the store */
- store_type *st_ptr = &town[i].store[j];
+ store_type *st_ptr = &town_info[i].store[j];
if ((i > 1) && (j == STORE_MUSEUM || j == STORE_HOME)) continue;
if (z_older_than(10, 3, 3) && (store_number == STORE_HOME))
{
- st_ptr = &town[1].store[store_number];
+ st_ptr = &town_info[1].store[store_number];
if (st_ptr->stock_num) sort = TRUE;
}
else
{
- st_ptr = &town[town_number].store[store_number];
+ st_ptr = &town_info[town_number].store[store_number];
}
/* Read the basic info */
while (1)
{
t_idx = rumor_num(zz[1], NO_TOWN);
- if (town[t_idx].name) break;
+ if (town_info[t_idx].name) break;
}
- strcpy(fullname, town[t_idx].name);
+ strcpy(fullname, town_info[t_idx].name);
visit = (1L << (t_idx - 1));
if ((t_idx != SECRET_TOWN) && !(p_ptr->visit & visit))
{
for (j = 0; j < MAX_STORES; j++)
{
- wr_store(&town[i].store[j]);
+ wr_store(&town_info[i].store[j]);
}
}
bool old_stack_force_notes = stack_force_notes;
bool old_stack_force_costs = stack_force_costs;
- st_ptr = &town[1].store[store_num];
+ st_ptr = &town_info[1].store[store_num];
if (store_num != STORE_HOME)
{
stack_force_notes = FALSE;
if (i == STORE_MUSEUM) continue;
/* Check every item in the store */
- for (j = 0; j < town[p_ptr->town_num].store[i].stock_num; j++)
+ for (j = 0; j < town_info[p_ptr->town_num].store[i].stock_num; j++)
{
- object_type *j_ptr = &town[p_ptr->town_num].store[i].stock[j];
+ object_type *j_ptr = &town_info[p_ptr->town_num].store[i].stock[j];
/* Duplicate item "type", assume crappy */
if (o_ptr->k_idx == j_ptr->k_idx) return (TRUE);
inner_town_num = p_ptr->town_num;
/* Hack -- Check the "locked doors" */
- if ((town[p_ptr->town_num].store[which].store_open >= turn) ||
+ if ((town_info[p_ptr->town_num].store[which].store_open >= turn) ||
(ironman_shops))
{
msg_print(_("ドアに鍵がかかっている。", "The doors are locked."));
}
/* Calculate the number of store maintainances since the last visit */
- maintain_num = (turn - town[p_ptr->town_num].store[which].last_visit) / (TURNS_PER_TICK * STORE_TICKS);
+ maintain_num = (turn - town_info[p_ptr->town_num].store[which].last_visit) / (TURNS_PER_TICK * STORE_TICKS);
/* Maintain the store max. 10 times */
if (maintain_num > 10) maintain_num = 10;
store_maint(p_ptr->town_num, which);
/* Save the visit */
- town[p_ptr->town_num].store[which].last_visit = turn;
+ town_info[p_ptr->town_num].store[which].last_visit = turn;
}
forget_lite();
cur_store_feat = c_ptr->feat;
/* Save the store and owner pointers */
- st_ptr = &town[p_ptr->town_num].store[cur_store_num];
+ st_ptr = &town_info[p_ptr->town_num].store[cur_store_num];
ot_ptr = &owners[cur_store_num][st_ptr->owner];
/* Start at the beginning */
cur_store_num = which;
/* Activate that store */
- st_ptr = &town[p_ptr->town_num].store[cur_store_num];
+ st_ptr = &town_info[p_ptr->town_num].store[cur_store_num];
j = st_ptr->owner;
/* Pick a new owner */
for (i = 1;i < max_towns; i++)
{
if (i == p_ptr->town_num) continue;
- if (st_ptr->owner == town[i].store[cur_store_num].owner) break;
+ if (st_ptr->owner == town_info[i].store[cur_store_num].owner) break;
}
if (i == max_towns) break;
}
if (store_num == STORE_MUSEUM) return;
/* Activate that store */
- st_ptr = &town[town_num].store[store_num];
+ st_ptr = &town_info[town_num].store[store_num];
/* Activate the owner */
ot_ptr = &owners[store_num][st_ptr->owner];
cur_store_num = store_num;
/* Activate that store */
- st_ptr = &town[town_num].store[store_num];
+ st_ptr = &town_info[town_num].store[store_num];
/* Pick an owner */
for (i = 1;i < max_towns; i++)
{
if (i == town_num) continue;
- if (st_ptr->owner == town[i].store[store_num].owner) break;
+ if (st_ptr->owner == town_info[i].store[store_num].owner) break;
}
if (i == max_towns) break;
}
/* Not in town */
if (!p_ptr->town_num) return;
- st_ptr = &town[p_ptr->town_num].store[STORE_BLACK];
+ st_ptr = &town_info[p_ptr->town_num].store[STORE_BLACK];
o_ptr->ident |= IDENT_STORE;
/*
* The towns [max_towns]
*/
-town_type *town;
+town_type *town_info;
/*
else if (p_ptr->inside_battle)
return _("闘技場", "Monster Arena");
else if (!dun_level && p_ptr->town_num)
- return town[p_ptr->town_num].name;
+ return town_info[p_ptr->town_num].name;
else
return d_name+d_info[p_ptr->dungeon_idx].name;
}
wilderness[*y][*x].level = w_letter[id].level;
wilderness[*y][*x].town = w_letter[id].town;
wilderness[*y][*x].road = w_letter[id].road;
- strcpy(town[w_letter[id].town].name, w_letter[id].name);
+ strcpy(town_info[w_letter[id].town].name, w_letter[id].name);
}
(*y)++;
}
/* random artifacts in home */
- st_ptr = &town[1].store[STORE_HOME];
+ st_ptr = &town_info[1].store[STORE_HOME];
for (i = 0; i < st_ptr->stock_num; i++)
{
q_ptr = &st_ptr->stock[i];
}
/* random artifacts in museum */
- st_ptr = &town[1].store[STORE_MUSEUM];
+ st_ptr = &town_info[1].store[STORE_MUSEUM];
for (i = 0; i < st_ptr->stock_num; i++)
{
q_ptr = &st_ptr->stock[i];
}
else if (have_flag(f_ptr->flags, FF_TOWN))
{
- name = town[c_ptr->special].name;
+ name = town_info[c_ptr->special].name;
}
else if (p_ptr->wild_mode && (feat == feat_floor))
{