add was_replaying to track how the game started

This commit is contained in:
2025-02-06 11:23:58 -06:00
committed by Celtic Minstrel
parent aed913a7f4
commit a3ddff55aa
3 changed files with 8 additions and 1 deletions

View File

@@ -1099,6 +1099,7 @@ void handle_events() {
}
replay_next_action();
}else{
replaying = false;
#ifdef __APPLE__
if (menuChoiceId>=0) {
eMenuChoice aMenuChoice=menuChoice;

View File

@@ -27,6 +27,7 @@ using base64 = cppcodec::base64_rfc4648;
bool recording = false;
bool replaying = false;
bool was_replaying = false;
bool record_verbose = false;
bool replay_verbose = false;
@@ -107,7 +108,7 @@ bool init_action_log(std::string command, std::string file) {
checking_action = checking_action->NextSiblingElement(false);
}while(checking_action != nullptr);
replaying = true;
was_replaying = replaying = true;
} catch(...) {
std::cout << "Failed to load file " << file << std::endl;
return false;

View File

@@ -16,7 +16,12 @@ using ticpp::Element;
struct word_rect_t;
extern bool recording;
// True if a replay is currently ongoing.
// False after actions run out, Ctrl+C interrupts the replay,
// or an error occurs:
extern bool replaying;
// Always true if this session started as a replay:
extern bool was_replaying;
extern bool replay_strict;