Comments help find where related editor state functions are

This commit is contained in:
2025-06-12 09:47:18 -05:00
parent 854f18ff9e
commit 74dce15e4c
3 changed files with 7 additions and 0 deletions

View File

@@ -1074,6 +1074,8 @@ void readScenarioFromXml(ticpp::Document&& data, cScenario& scenario) {
throw xMissingElem("scenario", *reqs.begin(), data.FirstChildElement()->Row(), data.FirstChildElement()->Column(), fname);
}
// This state is serialized in scen.fileio.cpp: writeEditorStateToXml()
// and re-applied at editor launch in scen.actions.cpp: restore_editor_state()
void readEditorStateFromXml(ticpp::Document&& data, cScenario& scenario) {
using namespace ticpp;
int maj, min, rev;

View File

@@ -3198,6 +3198,9 @@ bool monst_on_space(location loc,short m_num) {
}
// Restore the state of the editor when the designer last saved this scenario.
// This state is serialized in scen.fileio.cpp: writeEditorStateToXml()
// and parsed in fileio_scen.cpp: readEditorStateFromXml().
void restore_editor_state(bool first_time) {
set_current_town(scenario.editor_state.last_town_edited, first_time);
set_current_out(scenario.editor_state.last_out_edited, false, first_time);

View File

@@ -122,6 +122,8 @@ namespace ticpp {
}
}
// This state is parsed in fileio_scen.cpp: readEditorStateFromXml()
// and re-applied at editor launch in scen.actions.cpp: restore_editor_state()
void writeEditorStateToXml(ticpp::Printer&& data, cScenario& scenario) {
editor_state_t editor_state = scenario.editor_state;