record and replay resting

This commit is contained in:
2024-08-26 19:54:55 -05:00
committed by Celtic Minstrel
parent 6165a3f823
commit b5fa2db5fd
3 changed files with 7 additions and 1 deletions

View File

@@ -355,7 +355,10 @@ static void handle_toggle_active(bool& need_reprint) {
need_reprint = true;
}
static void handle_rest(bool& need_redraw, bool& need_reprint) {
void handle_rest(bool& need_redraw, bool& need_reprint) {
if(recording){
record_action("handle_rest", "");
}
sf::Event dummy_evt;
int i = 0;
ter_num_t ter = univ.out[univ.party.out_loc.x][univ.party.out_loc.y];

View File

@@ -61,5 +61,6 @@ void handle_rename_pc();
void handle_begin_look(bool right_button, bool& need_redraw);
void handle_look(location destination, bool right_button, eKeyMod mods, bool& need_redraw, bool& need_reprint);
void screen_shift(int dx, int dy, bool& need_redraw);
void handle_rest(bool& need_redraw, bool& need_reprint);
#endif

View File

@@ -423,6 +423,8 @@ static void replay_next_action() {
sstr >> dy;
screen_shift(dx, dy, need_redraw);
}else if(t == "handle_rest"){
handle_rest(need_redraw, need_reprint);
}
// TODO some of these actions shouldn't call advance_time(). They should return