Classes | Defines | Functions | Variables

gamestatus.cpp File Reference

Maintain status of a game, load&save games. More...

#include "global.hpp"
#include "config.hpp"
#include "gamestatus.hpp"
#include "actions.hpp"
#include "filesystem.hpp"
#include "foreach.hpp"
#include "gettext.hpp"
#include "log.hpp"
#include "game_preferences.hpp"
#include "replay.hpp"
#include "resources.hpp"
#include "statistics.hpp"
#include "team.hpp"
#include "unit.hpp"
#include "unit_id.hpp"
#include "wesconfig.h"
#include "wml_exception.hpp"
#include "formula_string_utils.hpp"
#include "map.hpp"
#include "pathfind/pathfind.hpp"
#include "whiteboard/side_actions.hpp"
#include <boost/bind.hpp>
#include <sys/time.h>
Include dependency graph for gamestatus.cpp:

Go to the source code of this file.

Classes

class  team_builder

Defines

#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)
#define ERR_NG_TC   LOG_STREAM(err, log_engine_tc)
#define WRN_NG_TC   LOG_STREAM(warn, log_engine_tc)
#define LOG_NG_TC   LOG_STREAM(info, log_engine_tc)
#define DBG_NG_TC   LOG_STREAM(debug, log_engine_tc)

Functions

void write_players (game_state &gamestate, config &cfg, const bool use_snapshot, const bool merge_side)
void extract_summary_from_config (config &cfg_save, config &cfg_summary)
static void clear_wmi (std::map< std::string, wml_menu_item * > &gs_wmi)

Variables

static lg::log_domain log_engine ("engine")
static lg::log_domain log_engine_tc ("engine/team_construction")

Detailed Description

Maintain status of a game, load&save games.

Definition in file gamestatus.cpp.


Define Documentation

#define DBG_NG   LOG_STREAM(debug, log_engine)

Definition at line 55 of file gamestatus.cpp.

#define DBG_NG_TC   LOG_STREAM(debug, log_engine_tc)
#define ERR_NG   LOG_STREAM(err, log_engine)

Definition at line 52 of file gamestatus.cpp.

#define ERR_NG_TC   LOG_STREAM(err, log_engine_tc)

Definition at line 58 of file gamestatus.cpp.

Referenced by team_builder::gold().

#define LOG_NG   LOG_STREAM(info, log_engine)

Definition at line 54 of file gamestatus.cpp.

Referenced by game_state::game_state().

#define LOG_NG_TC   LOG_STREAM(info, log_engine_tc)

Definition at line 60 of file gamestatus.cpp.

Referenced by team_builder::log_step().

#define WRN_NG   LOG_STREAM(warn, log_engine)

Definition at line 53 of file gamestatus.cpp.

Referenced by game_state::set_menu_items().

#define WRN_NG_TC   LOG_STREAM(warn, log_engine_tc)

Definition at line 59 of file gamestatus.cpp.


Function Documentation

static void clear_wmi ( std::map< std::string, wml_menu_item * > &  gs_wmi  )  [static]

Definition at line 529 of file gamestatus.cpp.

Referenced by game_state::game_state(), game_state::set_menu_items(), and game_state::~game_state().

Here is the caller graph for this function:

void extract_summary_from_config ( config cfg_save,
config cfg_summary 
)

Todo:
Ideally we should grab all leaders if there's more than 1 human player?

Definition at line 375 of file gamestatus.cpp.

References config::add_child(), config::child(), config::child_or_empty(), config::child_range(), config::empty(), config::find_child(), and get_independent_image_path().

Referenced by savegame::save_index_class::rebuild().

Here is the call graph for this function:

Here is the caller graph for this function:

void write_players ( game_state gamestate,
config cfg,
const bool  use_snapshot,
const bool  merge_side 
)

Definition at line 165 of file gamestatus.cpp.

References config::add_child(), config::child_range(), config::find_child(), config::get(), game_state::snapshot, game_state::starting_pos, and str_cast().

Referenced by play_game().

Here is the call graph for this function:

Here is the caller graph for this function:


Variable Documentation

lg::log_domain log_engine("engine") [static]
lg::log_domain log_engine_tc("engine/team_construction") [static]
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines

Generated by doxygen 1.7.1 on Fri May 25 2012 01:04:29 for The Battle for Wesnoth
Gna! | Forum | Wiki | CIA | devdocs