16 #ifndef SAVEGAME_H_INCLUDED
17 #define SAVEGAME_H_INCLUDED
52 ,
const bool select_difficulty
54 ,
bool skip_version_check);
70 return cfg[
"replay"].to_bool() && !cfg[
"snapshot"].to_bool(
true);
116 bool save_game_automatic(
CVideo& video,
bool ask_for_overwrite =
false,
const std::string& filename =
"");
153 static bool is_illegal_file_char(
char c);
161 bool check_overwrite(
CVideo& video);
165 void write_game_to_disk(
const std::string& filename);
std::string difficulty_
Name of the savefile to be loaded.
void show_difficulty_dialog()
Display the difficulty dialog.
bool select_difficulty_
State of the "cancel_orders" checkbox in the load-game dialog.
bool load_game()
Load a game without providing any information.
Class for start-of-scenario saves.
bool cancel_orders() const
The class for loading a savefile.
void write_game(config_writer &out)
Writing the savegame config to a file.
void set_gamestate()
Generate the gamestate out of the loaded game config.
replay_savegame(saved_game &gamestate, const compression::format compress_saves)
ingame_savegame(saved_game &gamestate, game_display &gui, const compression::format compress_saves)
void show_dialog()
Display the load-game dialog.
Class for "normal" midgame saves.
virtual void create_filename()
Create a filename for automatic saves.
compression::format compress_saves_
Determines if a confirmation of successful saving the game is shown.
loadgame(CVideo &video, const config &game_config, saved_game &gamestate)
scenariostart_savegame(saved_game &gamestate, const compression::format compress_saves)
void write_game(config_writer &out)
Writing the savegame config to a file.
virtual void create_filename()
Create a filename for automatic saves.
config summary_
State of the "change_difficulty" checkbox in the load-game dialog.
Class for writing a config out to a file in pieces.
autosave_savegame(saved_game &gamestate, game_display &gui, const compression::format compress_saves)
bool save_game_exists(const std::string &name, compression::format compressed)
Returns true if there is already a savegame with that name.
static bool is_replay_save(const config &cfg)
virtual int show_save_dialog(CVideo &video, const std::string &message, const gui::DIALOG_TYPE dialog_type)
Display the save game dialog.
const config & game_config_
std::string error_message_
Title of the savegame dialog.
void convert_old_saves(config &cfg)
converts saves from older versions of wesnoth
void write_game(config_writer &out)
Writing the savegame config to a file.
void clean_saves(const std::string &label)
Delete all autosaves of a certain scenario.
Game configuration data as global variables.
const std::string & filename() const
bool show_confirmation_
Error message to be displayed if the savefile could not be generated.
Declarations for File-IO.
virtual void create_filename()
Create a filename for automatic saves.
bool load_multiplayer_game()
Loading a game from within the multiplayer-create dialog.
Class for replay saves (either manually or automatically).
Represents version numbers.
const std::string & title()
GLuint const GLchar * name
void copy_era(config &cfg)
Copy era information into the snapshot.
void set_error_message(const std::string &error_message)
Customize the standard error message.
std::string filename_
Primary output information.
Filename and modification date for a file list.
const saved_game & gamestate()
virtual void create_filename()
Build the filename according to the specific savegame's needs.
void autosave(const bool disable_autosave, const int autosave_max, const int infinite_autosaves)
GLsizei GLenum GLuint GLuint GLsizei char * message
std::string filename_
Filename of the savegame file on disk.
const std::string & filename() const
A config object defines a single node in a WML file, with access to child nodes.
config load_config_
The difficulty the save is meant to be loaded with.
bool cancel_orders_
State of the "show_replay" checkbox in the load-game dialog.
bool check_version_compatibility()
Call check_version_compatibility above, using the version of this savefile.
const std::string version
GLsizei const GLcharARB ** string
bool show_replay_
Config information of the savefile to be loaded.
oos_savegame(saved_game &gamestate, game_display &gui, bool &ignore)