#include "game_state.h" #include "log.h" #include "platform.h" #include // 009c79a0 Empties the saved run and drops both availabilities, keeping the files it is saved to. void GameState::Clear() { *this = {.rerunPath = std::move(rerunPath), .savePath = std::move(savePath)}; } // 009c8350 Removes the saved run's file, warning when there is none named, and empties the run. void GameState::Delete() { if (savePath.empty()) log_printf(LOG_INFO, "[warn] GameState::Delete: no filename specified.\n"); std::remove(savePath.c_str()); Clear(); } // 009c8410 Removes the rerun's file, keeping the run. // The original warns on an empty save file name here too, not on the rerun's. void GameState::DeleteRerun() { if (savePath.empty()) log_printf(LOG_INFO, "[warn] GameState::DeleteRerun: no filename specified.\n"); std::remove(rerunPath.c_str()); } // Not reconstructed yet: each stops the game where it is reached. // Netplay is offline, so read always reads a run as this machine's own (the original's isLocalRun). bool GameState::read(std::span) { reconstruction_missing("GameState::read 009cc1a0"); } bool GameState::read_rerun(std::span) { reconstruction_missing("GameState::read_rerun 009d7d50"); }