/*!
- * @brief フロア保存時のcave情報テンプレートをソートするための比較処理
- * @param u caveテンプレートの参照ポインタ
+ * @brief フロア保存時のgrid_array情報テンプレートをソートするための比較処理
+ * @param u grid_arrayテンプレートの参照ポインタ
* @param v 未使用
* @param a スワップするモンスター種族のID1
* @param b スワップするモンスター種族のID2
/*!
- * @brief フロア保存時のcave情報テンプレートをソートするためのスワップ処理 / Sorting hook -- Swap function
- * @param u caveテンプレートの参照ポインタ
+ * @brief フロア保存時のgrid_array情報テンプレートをソートするためのスワップ処理 / Sorting hook -- Swap function
+ * @param u grid_arrayテンプレートの参照ポインタ
* @param v 未使用
* @param a スワップするモンスター種族のID1
* @param b スワップするモンスター種族のID2
- /*********** Make template for cave_type **********/
+ /*********** Make template for grid_type **********/
/*
* Usually number of templates are fewer than 255. Even if
{
for (x = 0; x < cur_wid; x++)
{
- cave_type *c_ptr = &cave[y][x];
+ grid_type *g_ptr = &grid_array[y][x];
for (i = 0; i < num_temp; i++)
{
- if (templates[i].info == c_ptr->info &&
- templates[i].feat == c_ptr->feat &&
- templates[i].mimic == c_ptr->mimic &&
- templates[i].special == c_ptr->special)
+ if (templates[i].info == g_ptr->info &&
+ templates[i].feat == g_ptr->feat &&
+ templates[i].mimic == g_ptr->mimic &&
+ templates[i].special == g_ptr->special)
{
/* Same terrain is exist */
templates[i].occurrence++;
}
/* Add new template */
- templates[num_temp].info = c_ptr->info;
- templates[num_temp].feat = c_ptr->feat;
- templates[num_temp].mimic = c_ptr->mimic;
- templates[num_temp].special = c_ptr->special;
+ templates[num_temp].info = g_ptr->info;
+ templates[num_temp].feat = g_ptr->feat;
+ templates[num_temp].mimic = g_ptr->mimic;
+ templates[num_temp].special = g_ptr->special;
templates[num_temp].occurrence = 1;
/* Increase number of template */
- /*** "Run-Length-Encoding" of cave ***/
+ /*** "Run-Length-Encoding" of grid_array ***/
/* Note that this will induce two wasted bytes */
count = 0;
prev_u16b = 0;
- /* Dump the cave */
+ /* Dump the grid_array */
for (y = 0; y < cur_hgt; y++)
{
for (x = 0; x < cur_wid; x++)
{
- cave_type *c_ptr = &cave[y][x];
+ grid_type *g_ptr = &grid_array[y][x];
for (i = 0; i < num_temp; i++)
{
- if (templates[i].info == c_ptr->info &&
- templates[i].feat == c_ptr->feat &&
- templates[i].mimic == c_ptr->mimic &&
- templates[i].special == c_ptr->special)
+ if (templates[i].info == g_ptr->info &&
+ templates[i].feat == g_ptr->feat &&
+ templates[i].mimic == g_ptr->mimic &&
+ templates[i].special == g_ptr->special)
break;
}
wr_s16b(max_floor_id);
/* Current dungeon type */
- wr_byte((byte_hack)dungeon_idx);
+ wr_byte((byte_hack)p_ptr->dungeon_idx);
/*** No saved floor (On the surface etc.) ***/
{
for (j = 0; j < MAX_STORES; j++)
{
- wr_store(&town[i].store[j]);
+ wr_store(&town_info[i].store[j]);
}
}