old_autosave_turn = current_world_ptr->game_turn;
}
- /* HACK -- Reset start_time to stop counting current_world_ptr->play_time while edit */
+ /* HACK -- Reset current_world_ptr->start_time to stop counting current_world_ptr->play_time while edit */
update_playtime();
/* Free old entries */
/* Reload autopick pref */
process_autopick_file(buf);
- /* HACK -- reset start_time so that current_world_ptr->play_time is not increase while edit */
- start_time = (u32b)time(NULL);
+ /* HACK -- reset current_world_ptr->start_time so that current_world_ptr->play_time is not increase while edit */
+ current_world_ptr->start_time = (u32b)time(NULL);
/* Save cursor location */
cx_save = tb->cx;
p_ptr->is_dead = TRUE;
- start_time = (u32b)time(NULL);
+ current_world_ptr->start_time = (u32b)time(NULL);
/* No suspending now */
signals_ignore_tstp();
current_world_ptr->timewalk_m_idx = 0;
p_ptr->now_damaged = FALSE;
now_message = 0;
- start_time = time(NULL) - 1;
+ current_world_ptr->start_time = time(NULL) - 1;
record_o_name[0] = '\0';
/* Reset map panel */
extern MONSTER_IDX pet_t_m_idx;
extern MONSTER_IDX riding_t_m_idx;
extern MONRACE_IDX today_mon;
-extern u32b start_time;
extern bool sukekaku;
extern bool new_mane;
MONSTER_IDX today_mon;
-u32b start_time;
-
bool sukekaku;
bool new_mane;
void update_playtime(void)
{
/* Check if the game has started */
- if (start_time != 0)
+ if (current_world_ptr->start_time != 0)
{
u32b tmp = (u32b)time(NULL);
- current_world_ptr->play_time += (tmp - start_time);
- start_time = tmp;
+ current_world_ptr->play_time += (tmp - current_world_ptr->start_time);
+ current_world_ptr->start_time = tmp;
}
}
GAME_TURN dungeon_turn; /*!< NASTY生成の計算に関わる内部ターン値 / Game current_world_ptr->game_turn in dungeon */
GAME_TURN dungeon_turn_limit; /*!< dungeon_turnの最大値 / Limit of game_turn in dungeon */
GAME_TURN arena_start_turn; /*!< 闘技場賭博の開始ターン値 */
+ u32b start_time;
MONSTER_IDX timewalk_m_idx; /*!< 現在時間停止を行っているモンスターのID */
bool creating_savefile; /* New savefile is currently created */
+
} world_type;
extern bool is_daytime(void);