fixup end_level_data

made is_victory persistent
This commit is contained in:
gfgtdf 2015-03-01 21:31:35 +01:00
parent 5b5916ac6a
commit 12034ba8a4
2 changed files with 4 additions and 1 deletions

View File

@ -29,6 +29,7 @@ end_level_data::end_level_data()
: prescenario_save(true)
, replay_save(true)
, proceed_to_next_level(false)
, is_victory(true)
, transient()
{
}
@ -38,6 +39,7 @@ void end_level_data::write(config& cfg) const
cfg["prescenario_save"] = prescenario_save;
cfg["replay_save"] = replay_save;
cfg["proceed_to_next_level"] = proceed_to_next_level;
cfg["is_victory"] = is_victory;
}
void end_level_data::read(const config& cfg)
@ -45,4 +47,5 @@ void end_level_data::read(const config& cfg)
prescenario_save = cfg["prescenario_save"].to_bool(true);
replay_save = cfg["replay_save"].to_bool(true);
proceed_to_next_level = cfg["proceed_to_next_level"].to_bool(true);
is_victory = cfg["is_victory"].to_bool(true);
}

View File

@ -180,7 +180,7 @@ struct end_level_data
bool prescenario_save; /**< Should a prescenario be created the next game? */
bool replay_save; /**< Should a replay save be made? */
bool proceed_to_next_level; /**< whether to proceed to the next scenario, equals (res == VICTORY) in sp. We need to save this in saves during linger mode. > */
bool proceed_to_next_level; /**< whether to proceed to the next scenario, equals is_victory in sp. We need to save this in saves during linger mode. > */
transient_end_level transient;
bool is_victory;
void write(config& cfg) const;