record and replay switching between item/quest/spec items

This commit is contained in:
2024-08-31 14:42:51 -05:00
committed by Celtic Minstrel
parent 1cc3ca8c5c
commit a483aff1ac
2 changed files with 6 additions and 0 deletions

View File

@@ -552,6 +552,8 @@ static void replay_next_action() {
use_spec_item(boost::lexical_cast<short>(next_action.GetText()), need_redraw);
}else if(t == "show_item_info"){
show_item_info(boost::lexical_cast<short>(next_action.GetText()));
}else if(t == "set_stat_window"){
set_stat_window(static_cast<eItemWinMode>(boost::lexical_cast<int>(next_action.GetText())));
}else{
std::ostringstream sstr;
sstr << "Couldn't replay action: " << next_action;

View File

@@ -23,6 +23,7 @@ const int TEXT_BUF_LEN = 70;
#include "spell.hpp"
#include "tools/enum_map.hpp"
#include "replay.hpp"
#include <boost/lexical_cast.hpp>
typedef struct {
char line[50];
@@ -550,6 +551,9 @@ void set_stat_window_for_pc(int pc) {
}
void set_stat_window(eItemWinMode new_stat) {
if(recording){
record_action("set_stat_window", boost::lexical_cast<std::string>((int)new_stat));
}
if(new_stat == ITEM_WIN_SPECIAL)
give_help(50,0);