#include "angband.h"
#include "sort.h"
+#include "quest.h"
+#include "store.h"
for (i = 0; i < MAX_KUBI; i++)
{
- wr_s16b(kubi_r_idx[i]);
+ wr_s16b(current_world_ptr->bounty_r_idx[i]);
}
for (i = 0; i < 4; i++)
wr_byte(p_ptr->feeling);
/* Turn when level began */
- wr_s32b(old_turn);
+ wr_s32b(current_floor_ptr->generated_turn);
/* Turn of last "feeling" */
wr_s32b(p_ptr->feeling_turn);
- /* Current turn */
- wr_s32b(turn);
+ /* Current current_world_ptr->game_turn */
+ wr_s32b(current_world_ptr->game_turn);
- wr_s32b(dungeon_turn);
+ wr_s32b(current_world_ptr->dungeon_turn);
wr_s32b(old_battle);
/*!
- * @brief フロア保存時のcave情報テンプレートをソートするための比較処理
- * @param u caveテンプレートの参照ポインタ
+ * @brief フロア保存時のcurrent_floor_ptr->grid_array情報テンプレートをソートするための比較処理
+ * @param u current_floor_ptr->grid_arrayテンプレートの参照ポインタ
* @param v 未使用
* @param a スワップするモンスター種族のID1
* @param b スワップするモンスター種族のID2
/*!
- * @brief フロア保存時のcave情報テンプレートをソートするためのスワップ処理 / Sorting hook -- Swap function
- * @param u caveテンプレートの参照ポインタ
+ * @brief フロア保存時のcurrent_floor_ptr->grid_array情報テンプレートをソートするためのスワップ処理 / Sorting hook -- Swap function
+ * @param u current_floor_ptr->grid_arrayテンプレートの参照ポインタ
* @param v 未使用
* @param a スワップするモンスター種族のID1
* @param b スワップするモンスター種族のID2
{
/*** Not a saved floor ***/
- wr_s16b((s16b)dun_level);
+ wr_s16b((s16b)current_floor_ptr->dun_level);
}
else
{
wr_s16b(sf_ptr->lower_floor_id);
}
- wr_u16b((u16b)base_level);
- wr_u16b((s16b)num_repro);
+ wr_u16b((u16b)current_floor_ptr->base_level);
+ wr_u16b((s16b)current_floor_ptr->num_repro);
wr_u16b((u16b)p_ptr->y);
wr_u16b((u16b)p_ptr->x);
- wr_u16b((u16b)cur_hgt);
- wr_u16b((u16b)cur_wid);
+ wr_u16b((u16b)current_floor_ptr->height);
+ wr_u16b((u16b)current_floor_ptr->width);
wr_byte(p_ptr->feeling);
- /*********** Make template for cave_type **********/
+ /*********** Make template for grid_type **********/
/*
* Usually number of templates are fewer than 255. Even if
C_MAKE(templates, max_num_temp, cave_template_type);
/* Extract template array */
- for (y = 0; y < cur_hgt; y++)
+ for (y = 0; y < current_floor_ptr->height; y++)
{
- for (x = 0; x < cur_wid; x++)
+ for (x = 0; x < current_floor_ptr->width; x++)
{
- cave_type *c_ptr = &cave[y][x];
+ grid_type *g_ptr = ¤t_floor_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 current_floor_ptr->grid_array ***/
/* Note that this will induce two wasted bytes */
count = 0;
prev_u16b = 0;
- /* Dump the cave */
- for (y = 0; y < cur_hgt; y++)
+ /* Dump the current_floor_ptr->grid_array */
+ for (y = 0; y < current_floor_ptr->height; y++)
{
- for (x = 0; x < cur_wid; x++)
+ for (x = 0; x < current_floor_ptr->width; x++)
{
- cave_type *c_ptr = &cave[y][x];
+ grid_type *g_ptr = ¤t_floor_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;
}
/* Dump the objects */
for (i = 1; i < o_max; i++)
{
- object_type *o_ptr = &o_list[i];
+ object_type *o_ptr = ¤t_floor_ptr->o_list[i];
/* Dump it */
wr_item(o_ptr);
/* Dump the monsters */
for (i = 1; i < m_max; i++)
{
- monster_type *m_ptr = &m_list[i];
+ monster_type *m_ptr = ¤t_floor_ptr->m_list[i];
/* Dump it */
wr_monster(m_ptr);
wr_s16b(max_floor_id);
/* Current dungeon type */
- wr_byte((byte_hack)dungeon_type);
+ wr_byte((byte_hack)p_ptr->dungeon_idx);
/*** No saved floor (On the surface etc.) ***/
wr_byte(p_ptr->wild_mode);
wr_byte(ambush_flag);
- wr_s32b(max_wild_x);
- wr_s32b(max_wild_y);
+ wr_s32b(current_world_ptr->max_wild_x);
+ wr_s32b(current_world_ptr->max_wild_y);
/* Dump the wilderness seeds */
- for (i = 0; i < max_wild_x; i++)
+ for (i = 0; i < current_world_ptr->max_wild_x; i++)
{
- for (j = 0; j < max_wild_y; j++)
+ for (j = 0; j < current_world_ptr->max_wild_y; j++)
{
wr_u32b(wilderness[j][i].seed);
}
{
for (j = 0; j < MAX_STORES; j++)
{
- wr_store(&town[i].store[j]);
+ wr_store(&town_info[i].store[j]);
}
}
/* Paranoia */
- turn = 0;
+ current_world_ptr->game_turn = 0;
/* Paranoia */
p_ptr->is_dead = FALSE;
/* Paranoia */
if (!err)
{
- /* Invalid turn */
- if (!turn) err = -1;
+ /* Invalid current_world_ptr->game_turn */
+ if (!current_world_ptr->game_turn) err = -1;
/* Message (below) */
if (err) what = _("セーブファイルが壊れています", "Broken savefile");