record and replay changing PC graphic

This commit is contained in:
2024-08-24 11:57:30 -05:00
committed by Celtic Minstrel
parent 99565b5cef
commit f597bbc298
3 changed files with 14 additions and 5 deletions

View File

@@ -3265,3 +3265,13 @@ bool check_for_interrupt(){
}
return false;
}
void handle_new_pc_graphic() {
if(recording){
record_action("handle_new_pc_graphic", "");
}
short choice = char_select_pc(1,"New graphic for who?");
if(choice < 6)
pick_pc_graphic(choice,1,nullptr);
draw_terrain();
}

View File

@@ -55,5 +55,6 @@ void handle_drop_item(short item_hit, bool& need_redraw);
void handle_drop_item(location destination, bool& need_redraw);
void handle_give_item(short item_hit, bool& did_something, bool& need_redraw);
void show_dialog_action(std::string xml_file);
void handle_new_pc_graphic();
#endif

View File

@@ -344,6 +344,8 @@ static void replay_next_action() {
pick_preferences();
}else if(t == "do_abort"){
do_abort();
}else if(t == "handle_new_pc_graphic"){
handle_new_pc_graphic();
}
// TODO some of these actions shouldn't call advance_time(). They should return
@@ -671,11 +673,7 @@ void handle_menu_choice(eMenu item_hit) {
handle_quit_event();
break;
case eMenu::OPTIONS_PC_GRAPHIC:
// TODO record and replay
choice = char_select_pc(1,"New graphic for who?");
if(choice < 6)
pick_pc_graphic(choice,1,nullptr);
draw_terrain();
handle_new_pc_graphic();
break;
case eMenu::OPTIONS_DELETE_PC: