FLOOR_IDX max_floor_id;
/*
- * Sign for current process used in temporal files.
+ * Sign for current process used in temporary files.
* Actually it is the start time of current process.
*/
u32b saved_floor_file_sign;
* @brief 保存フロア配列を初期化する / Initialize saved_floors array.
* @param creature_ptr プレーヤーへの参照ポインタ
* @param force テンポラリファイルが残っていた場合も警告なしで強制的に削除するフラグ
- * @details Make sure that old temporal files are not remaining as gurbages.
+ * @details Make sure that old temporary files are not remaining as gurbages.
* @return なし
*/
void init_saved_floors(player_type *creature_ptr, bool force)
{
if (!force)
{
- msg_print(_("エラー:古いテンポラリ・ファイルが残っています。", "Error: There are old temporal files."));
+ msg_print(_("エラー:古いテンポラリ・ファイルが残っています。", "Error: There are old temporary files."));
msg_print(_("変愚蛮怒を二重に起動していないか確認してください。", "Make sure you are not running two game processes simultaneously."));
- msg_print(_("過去に変愚蛮怒がクラッシュした場合は一時ファイルを", "If the temporal files are garbages of old crashed process, "));
+ msg_print(_("過去に変愚蛮怒がクラッシュした場合は一時ファイルを", "If the temporary files are garbages of old crashed process, "));
msg_print(_("強制的に削除して実行を続けられます。", "you can delete it safely."));
- if (!get_check(_("強制的に削除してもよろしいですか?", "Do you delete old temporal files? ")))
+ if (!get_check(_("強制的に削除してもよろしいですか?", "Do you delete old temporary files? ")))
quit(_("実行中止", "Aborted."));
force = TRUE;
}
/* Grab permissions */
safe_setuid_grab();
- /* Simply kill the temporal file */
+ /* Simply kill the temporary file */
(void)fd_kill(floor_savefile);
/* Drop permissions */
/* vist_mark is from 1 */
latest_visit_mark = 1;
- /* A sign to mark temporal files */
+ /* A sign to mark temporary files */
saved_floor_file_sign = (u32b)time(NULL);
/* No next floor yet */
}
/*!
- * @brief 保存フロア用テンポラリファイルを削除する / Kill temporal files
+ * @brief 保存フロア用テンポラリファイルを削除する / Kill temporary files
* @details Should be called just before the game quit.
* @param creature_ptr プレーヤーへの参照ポインタ
* @return なし
{
saved_floor_type *sf_ptr = &saved_floors[i];
- /* No temporal file */
+ /* No temporary file */
if (!sf_ptr->floor_id) continue;
if (sf_ptr->floor_id == creature_ptr->floor_id) continue;
/* Grab permissions */
safe_setuid_grab();
- /* Simply kill the temporal file */
+ /* Simply kill the temporary file */
(void)fd_kill(floor_savefile);
/* Drop permissions */
/* Kill current floor */
creature_ptr->floor_id = 0;
- /* Current floor doesn't have temporal file */
+ /* Current floor doesn't have temporary file */
}
else
{
/* Grab permissions */
safe_setuid_grab();
- /* Simply kill the temporal file */
+ /* Simply kill the temporary file */
(void)fd_kill(floor_savefile);
/* Drop permissions */
for (x = 0; x < MAX_WID; x++)
{
/* Create "solid" perma-wall */
- place_solid_perm_bold(creature_ptr->current_floor_ptr, y, x);
+ place_bold(creature_ptr, y, x, solid_perm);
}
}
creature_ptr->x = creature_ptr->current_floor_ptr->width / 2;
/* Give one square */
- place_floor_bold(creature_ptr->current_floor_ptr, creature_ptr->y, creature_ptr->x);
+ place_bold(creature_ptr, creature_ptr->y, creature_ptr->x, floor);
wipe_generate_random_floor_flags(creature_ptr->current_floor_ptr);
}
if (m_ptr->parent_m_idx)
{
master_ptr->riding = 0;
- master_ptr->pet_extra_flags &= ~(PF_RYOUTE);
+ master_ptr->pet_extra_flags &= ~(PF_TWO_HANDS);
master_ptr->riding_ryoute = master_ptr->old_riding_ryoute = FALSE;
}
else
(void)COPY(&party_mon[0], m_ptr, monster_type);
/* Delete from this floor */
- delete_monster_idx(master_ptr->riding);
+ delete_monster_idx(master_ptr, master_ptr->riding);
}
}
* when you or the pet can see the other.
*/
if (m_ptr->nickname &&
- ((player_has_los_bold(master_ptr, m_ptr->fy, m_ptr->fx) && projectable(master_ptr->current_floor_ptr, master_ptr->y, master_ptr->x, m_ptr->fy, m_ptr->fx)) ||
- (los(master_ptr->current_floor_ptr, m_ptr->fy, m_ptr->fx, master_ptr->y, master_ptr->x) && projectable(master_ptr->current_floor_ptr, m_ptr->fy, m_ptr->fx, master_ptr->y, master_ptr->x))))
+ ((player_has_los_bold(master_ptr, m_ptr->fy, m_ptr->fx) && projectable(master_ptr, master_ptr->y, master_ptr->x, m_ptr->fy, m_ptr->fx)) ||
+ (los(master_ptr, m_ptr->fy, m_ptr->fx, master_ptr->y, master_ptr->x) && projectable(master_ptr, m_ptr->fy, m_ptr->fx, master_ptr->y, master_ptr->x))))
{
if (dis > 3) continue;
}
num++;
/* Delete from this floor */
- delete_monster_idx(i);
+ delete_monster_idx(master_ptr, i);
}
}
if (!m_ptr->nickname) continue;
if (master_ptr->riding == i) continue;
- monster_desc(m_name, m_ptr, MD_ASSUME_VISIBLE | MD_INDEF_VISIBLE);
- exe_write_diary(master_ptr, NIKKI_NAMED_PET, RECORD_NAMED_PET_MOVED, m_name);
+ monster_desc(master_ptr, m_name, m_ptr, MD_ASSUME_VISIBLE | MD_INDEF_VISIBLE);
+ exe_write_diary(master_ptr, DIARY_NAMED_PET, RECORD_NAMED_PET_MOVED, m_name);
}
}
if (is_seen(m_ptr))
{
GAME_TEXT m_name[MAX_NLEN];
- monster_desc(m_name, m_ptr, 0);
+ monster_desc(master_ptr, m_name, m_ptr, 0);
msg_format(_("%sは消え去った!", "%^s disappears!"), m_name);
}
- delete_monster_idx(i);
+ delete_monster_idx(master_ptr, i);
}
}
}
if (i == 0)
{
- m_idx = m_pop();
+ m_idx = m_pop(master_ptr);
master_ptr->riding = m_idx;
if (m_idx)
{
{
for (j = 1000; j > 0; j--)
{
- scatter(&cy, &cx, master_ptr->y, master_ptr->x, d, 0);
+ scatter(master_ptr, &cy, &cx, master_ptr->y, master_ptr->x, d, 0);
if (monster_can_enter(cy, cx, &r_info[party_mon[i].r_idx], 0)) break;
}
if (j) break;
}
- m_idx = (d == 6) ? 0 : m_pop();
+ m_idx = (d == 6) ? 0 : m_pop(master_ptr);
}
if (m_idx)
repair_monsters = TRUE;
}
update_monster(master_ptr, m_idx, TRUE);
- lite_spot(cy, cx);
+ lite_spot(master_ptr, cy, cx);
/* Pre-calculated in precalc_cur_num_of_pet() */
/* r_ptr->cur_num++; */
monster_race *r_ptr = real_r_ptr(m_ptr);
GAME_TEXT m_name[MAX_NLEN];
- monster_desc(m_name, m_ptr, 0);
+ monster_desc(master_ptr, m_name, m_ptr, 0);
msg_format(_("%sとはぐれてしまった。", "You have lost sight of %s."), m_name);
if (record_named_pet && m_ptr->nickname)
{
- monster_desc(m_name, m_ptr, MD_INDEF_VISIBLE);
- exe_write_diary(master_ptr, NIKKI_NAMED_PET, RECORD_NAMED_PET_LOST_SIGHT, m_name);
+ monster_desc(master_ptr, m_name, m_ptr, MD_INDEF_VISIBLE);
+ exe_write_diary(master_ptr, DIARY_NAMED_PET, RECORD_NAMED_PET_LOST_SIGHT, m_name);
}
/* Pre-calculated in precalc_cur_num_of_pet(), but need to decrease */
(creature_ptr->change_floor_mode & CFM_SAVE_FLOORS) &&
!(creature_ptr->change_floor_mode & CFM_NO_RETURN))
{
- /* Get temporal floor_id */
+ /* Get temporary floor_id */
tmp_floor_idx = get_new_floor_id(creature_ptr);
}
(r_ptr->flags7 & RF7_NAZGUL)) continue;
/* Delete non-unique quest monsters */
- delete_monster_idx(i);
+ delete_monster_idx(creature_ptr, i);
}
/* Check if there is a same item */
clear_mon_lite(creature_ptr->current_floor_ptr);
/* Save current floor */
- if (!save_floor(sf_ptr, 0))
+ if (!save_floor(creature_ptr, sf_ptr, 0))
{
/* Save failed -- No return */
prepare_change_floor_mode(creature_ptr, CFM_NO_RETURN);
* @return なし
* @details
* If the floor is an old saved floor, it will be\n
- * restored from the temporal file. If the floor is new one, new floor\n
+ * restored from the temporary file. If the floor is new one, new floor\n
* will be generated.\n
*/
void change_floor(player_type *creature_ptr)
m_ptr->hp = m_ptr->maxhp = m_ptr->max_maxhp;
/* Remove timed status (except MTIMED_CSLEEP) */
- (void)set_monster_fast(i, 0);
- (void)set_monster_slow(i, 0);
- (void)set_monster_stunned(i, 0);
- (void)set_monster_confused(i, 0);
- (void)set_monster_monfear(i, 0);
- (void)set_monster_invulner(i, 0, FALSE);
+ (void)set_monster_fast(creature_ptr, i, 0);
+ (void)set_monster_slow(creature_ptr, i, 0);
+ (void)set_monster_stunned(creature_ptr, i, 0);
+ (void)set_monster_confused(creature_ptr, i, 0);
+ (void)set_monster_monfear(creature_ptr, i, 0);
+ (void)set_monster_invulner(creature_ptr, i, 0, FALSE);
}
/* Extract real monster race */
if (r_ptr->floor_id != new_floor_id)
{
/* Disapper from here */
- delete_monster_idx(i);
+ delete_monster_idx(creature_ptr, i);
}
}
if (a_info[o_ptr->name1].floor_id != new_floor_id)
{
/* Disappear from here */
- delete_object_idx(i);
+ delete_object_idx(creature_ptr, i);
}
else
{
}
}
- (void)place_quest_monsters(creature_ptr->current_floor_ptr, creature_ptr);
+ (void)place_quest_monsters(creature_ptr);
/* Place some random monsters */
alloc_times = absence_ticks / alloc_chance;
for (i = 0; i < alloc_times; i++)
{
/* Make a (group of) new monster */
- (void)alloc_monster(0, 0);
+ (void)alloc_monster(creature_ptr, 0, 0);
}
}
{
if (sf_ptr->last_visit)
{
- /* Temporal file is broken? */
+ /* Temporary file is broken? */
msg_print(_("階段は行き止まりだった。", "The staircases come to a dead end..."));
/* Create simple dead end */
/*** Create connected stairs ***/
/* No stairs down from Quest */
- if ((creature_ptr->change_floor_mode & CFM_UP) && !quest_number(creature_ptr->current_floor_ptr->dun_level))
+ if ((creature_ptr->change_floor_mode & CFM_UP) && !quest_number(creature_ptr, creature_ptr->current_floor_ptr->dun_level))
{
- g_ptr->feat = (creature_ptr->change_floor_mode & CFM_SHAFT) ? feat_state(feat_down_stair, FF_SHAFT) : feat_down_stair;
+ g_ptr->feat = (creature_ptr->change_floor_mode & CFM_SHAFT) ? feat_state(creature_ptr, feat_down_stair, FF_SHAFT) : feat_down_stair;
}
/* No stairs up when ironman_downward */
else if ((creature_ptr->change_floor_mode & CFM_DOWN) && !ironman_downward)
{
- g_ptr->feat = (creature_ptr->change_floor_mode & CFM_SHAFT) ? feat_state(feat_up_stair, FF_SHAFT) : feat_up_stair;
+ g_ptr->feat = (creature_ptr->change_floor_mode & CFM_SHAFT) ? feat_state(creature_ptr, feat_up_stair, FF_SHAFT) : feat_up_stair;
}
/* Paranoia -- Clear mimic */