The Battle for Wesnoth  1.13.4+dev
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
Macros | Variables
saved_game.cpp File Reference
#include "saved_game.hpp"
#include "carryover.hpp"
#include "config_assign.hpp"
#include "cursor.hpp"
#include "log.hpp"
#include "game_config_manager.hpp"
#include "generators/map_create.hpp"
#include "statistics.hpp"
#include "serialization/binary_or_text.hpp"
#include "util.hpp"
#include "variable_info.hpp"
#include "formula/string_utils.hpp"
#include "config.hpp"
#include <boost/range/adaptors.hpp>
#include <boost/range/algorithm/copy.hpp>
#include <cassert>
Include dependency graph for saved_game.cpp:

Go to the source code of this file.

Macros

#define ERR_NG   LOG_STREAM(err, log_engine)
 
#define WRN_NG   LOG_STREAM(warn, log_engine)
 
#define LOG_NG   LOG_STREAM(info, log_engine)
 
#define DBG_NG   LOG_STREAM(debug, log_engine)
 

Variables

static lg::log_domain log_engine ("engine")
 Some information about savefiles: A saveile can contain: General information (toplevel atributes, [multiplayer]) This is present in all savefiles [statistics] This is present in all savefiles but it's not handled by playcampaign/play_controller/saved_game. More...
 

Macro Definition Documentation

#define DBG_NG   LOG_STREAM(debug, log_engine)

Definition at line 72 of file saved_game.cpp.

#define ERR_NG   LOG_STREAM(err, log_engine)

Definition at line 69 of file saved_game.cpp.

Referenced by saved_game::load_mod(), and saved_game::set_defaults().

#define LOG_NG   LOG_STREAM(info, log_engine)
#define WRN_NG   LOG_STREAM(warn, log_engine)

Definition at line 70 of file saved_game.cpp.

Variable Documentation

lg::log_domain log_engine("engine")
static

Some information about savefiles: A saveile can contain: General information (toplevel atributes, [multiplayer]) This is present in all savefiles [statistics] This is present in all savefiles but it's not handled by playcampaign/play_controller/saved_game.

It's handled by savegame.cpp [snapshot] If a savegame was saved during a scenario this contains a snapshot of the game at the point when it was saved. [carryover_sides_start] At start-of-scenrio saves this contains data from the previous scenario that was preserved [carryover_sides] In savefile made during the game, this tag contains data from [carryover_sides_start] that was not used in the current scenario but should be saved for a next scenario [replay_start] A snapshot made very early to replay the game from. [replay] A record of game actions that was made between the creation of [replay_start] and [snapshot].

The following types of savegames are known: Start of scenario savefiles These files only contain general information, statistics, and [carryover_sides_start] When these saves are loaded, the scenario data is loaded form the game config using the next_scenario attribute from [carryover_sides_start] Expanded Start of scenario savefiles Similar to normal Start-of-scenario savefiles, but the also contain a [scenario] that contains the scenario data. This type is only used internally and usually doesn't get written to the disk. Ingame savefile These files contain general information, statistics, [snapshot], [replay], [replay_start], [snapshot], [carryover_sides] These files don't contain a [carryover_sides_start] because both starting points ([replay_start] and [snapshot]) were made after [carryover_sides_start] was merged into the scenario. Replay savefiles Like a Ingame save made during linger mode, but without the [snapshot]