From 17070a5db68b25e63ffcddb1e6372573822d47e8 Mon Sep 17 00:00:00 2001 From: Nat Quayle Nelson Date: Tue, 27 Aug 2024 20:56:22 -0500 Subject: [PATCH] record and replay begin talk mode --- src/game/boe.actions.cpp | 5 ++++- src/game/boe.actions.hpp | 1 + src/game/boe.main.cpp | 2 ++ 3 files changed, 7 insertions(+), 1 deletion(-) diff --git a/src/game/boe.actions.cpp b/src/game/boe.actions.cpp index 162a7be0..5304d286 100644 --- a/src/game/boe.actions.cpp +++ b/src/game/boe.actions.cpp @@ -332,7 +332,10 @@ void handle_begin_look(bool right_button, bool& need_redraw) { need_redraw = true; } -static void handle_begin_talk(bool& need_reprint) { +void handle_begin_talk(bool& need_reprint) { + if(recording){ + record_action("handle_begin_talk", ""); + } overall_mode = MODE_TALK_TOWN; add_string_to_buf("Talk: Select someone."); need_reprint = true; diff --git a/src/game/boe.actions.hpp b/src/game/boe.actions.hpp index 1e375070..702e53c2 100644 --- a/src/game/boe.actions.hpp +++ b/src/game/boe.actions.hpp @@ -92,5 +92,6 @@ void debug_heal(); void handle_print_pc_hp(int which_pc); void handle_print_pc_sp(int which_pc); void handle_trade_places(int which_pc); +void handle_begin_talk(bool& need_reprint); #endif diff --git a/src/game/boe.main.cpp b/src/game/boe.main.cpp index 275b3556..56bb24ca 100644 --- a/src/game/boe.main.cpp +++ b/src/game/boe.main.cpp @@ -529,6 +529,8 @@ static void replay_next_action() { give_pc_info(boost::lexical_cast(next_action.GetText())); }else if(t == "handle_trade_places"){ handle_trade_places(boost::lexical_cast(next_action.GetText())); + }else if(t == "handle_begin_talk"){ + handle_begin_talk(need_reprint); } // TODO some of these actions shouldn't call advance_time(). They should return