game.cpp File Reference

#include "global.hpp"
#include "SDL.h"
#include "SDL_mixer.h"
#include "about.hpp"
#include "config.hpp"
#include "construct_dialog.hpp"
#include "cursor.hpp"
#include "dialogs.hpp"
#include "game_display.hpp"
#include "filesystem.hpp"
#include "font.hpp"
#include "game_config.hpp"
#include "game_errors.hpp"
#include "gamestatus.hpp"
#include "gettext.hpp"
#include "gui/dialogs/addon_connect.hpp"
#include "gui/dialogs/language_selection.hpp"
#include "gui/dialogs/mp_method_selection.hpp"
#include "gui/widgets/button.hpp"
#include "help.hpp"
#include "hotkeys.hpp"
#include "intro.hpp"
#include "language.hpp"
#include "loadscreen.hpp"
#include "log.hpp"
#include "widgets/menu.hpp"
#include "marked-up_text.hpp"
#include "multiplayer.hpp"
#include "network.hpp"
#include "playcampaign.hpp"
#include "preferences_display.hpp"
#include "publish_campaign.hpp"
#include "replay.hpp"
#include "sound.hpp"
#include "statistics.hpp"
#include "thread.hpp"
#include "titlescreen.hpp"
#include "util.hpp"
#include "upload_log.hpp"
#include "wml_exception.hpp"
#include "wml_separators.hpp"
#include "serialization/binary_or_text.hpp"
#include "serialization/binary_wml.hpp"
#include "serialization/parser.hpp"
#include "serialization/preprocessor.hpp"
#include "serialization/string_utils.hpp"
#include "sha1.hpp"
#include "wesconfig.h"
#include <clocale>
#include <cmath>
#include <cstdlib>
#include <ctime>
#include <fstream>
#include <iostream>
#include <iterator>
#include <sstream>
#include <string>
#include <boost/iostreams/copy.hpp>
#include <boost/iostreams/filtering_streambuf.hpp>
#include <boost/iostreams/filter/gzip.hpp>

Go to the source code of this file.

Defines

#define ERR_CONFIG   LOG_STREAM(err, config)
#define WRN_CONFIG   LOG_STREAM(warn, config)
#define DBG_CONFIG   LOG_STREAM(debug, config)
#define LOG_CONFIG   LOG_STREAM(info, config)
#define LOG_GENERAL   LOG_STREAM(info, general)
#define DBG_GENERAL   LOG_STREAM(debug, general)
#define ERR_NET   LOG_STREAM(err, network)
#define LOG_NET   LOG_STREAM(info, network)
#define ERR_FS   LOG_STREAM(err, filesystem)

Functions

static bool less_campaigns_rank (const config *a, const config *b)
static std::string format_file_size (const std::string &size_str)
static void safe_exit (int res)
static void gzip_codec (const std::string &input_file, const std::string &output_file, bool encode)
static void gzip_encode (const std::string &input_file, const std::string &output_file)
static void gzip_decode (const std::string &input_file, const std::string &output_file)
static int play_game (int argc, char **argv)
 Process commandline-arguments.
int main (int argc, char **argv)

Variables

static bool new_widgets = false


Define Documentation

#define DBG_CONFIG   LOG_STREAM(debug, config)

Definition at line 87 of file game.cpp.

#define DBG_GENERAL   LOG_STREAM(debug, general)

Definition at line 90 of file game.cpp.

#define ERR_CONFIG   LOG_STREAM(err, config)

#define ERR_FS   LOG_STREAM(err, filesystem)

Definition at line 93 of file game.cpp.

#define ERR_NET   LOG_STREAM(err, network)

Definition at line 91 of file game.cpp.

#define LOG_CONFIG   LOG_STREAM(info, config)

Definition at line 88 of file game.cpp.

Referenced by play_game(), and read_tips_of_day().

#define LOG_GENERAL   LOG_STREAM(info, general)

Definition at line 89 of file game.cpp.

Referenced by play_game(), and safe_exit().

#define LOG_NET   LOG_STREAM(info, network)

Definition at line 92 of file game.cpp.

#define WRN_CONFIG   LOG_STREAM(warn, config)

Definition at line 86 of file game.cpp.

Referenced by server::run().


Function Documentation

static std::string format_file_size ( const std::string &  size_str  )  [static]

Definition at line 1052 of file game.cpp.

References _, size, and stream.

static void gzip_codec ( const std::string &  input_file,
const std::string &  output_file,
bool  encode 
) [static]

Definition at line 2136 of file game.cpp.

References safe_exit(), and io_exception::what().

Referenced by gzip_decode(), and gzip_encode().

static void gzip_decode ( const std::string &  input_file,
const std::string &  output_file 
) [static]

Definition at line 2162 of file game.cpp.

References gzip_codec().

Referenced by play_game().

static void gzip_encode ( const std::string &  input_file,
const std::string &  output_file 
) [static]

Definition at line 2157 of file game.cpp.

References gzip_codec().

Referenced by play_game().

static bool less_campaigns_rank ( const config a,
const config b 
) [static]

Definition at line 95 of file game.cpp.

int main ( int  argc,
char **  argv 
)

static int play_game ( int  argc,
char **  argv 
) [static]

static void safe_exit ( int  res  )  [static]

Definition at line 2126 of file game.cpp.

References LOG_GENERAL.

Referenced by gzip_codec(), and main().


Variable Documentation

int arg_

Definition at line 157 of file game.cpp.

const int argc_

Definition at line 156 of file game.cpp.

const char* const* const argv_

Definition at line 158 of file game.cpp.

Definition at line 193 of file game.cpp.

Definition at line 185 of file game.cpp.

Definition at line 166 of file game.cpp.

Definition at line 181 of file game.cpp.

Definition at line 180 of file game.cpp.

Definition at line 183 of file game.cpp.

Definition at line 170 of file game.cpp.

Definition at line 168 of file game.cpp.

Definition at line 196 of file game.cpp.

Definition at line 196 of file game.cpp.

std::string loaded_game_

Definition at line 189 of file game.cpp.

Definition at line 191 of file game.cpp.

Definition at line 190 of file game.cpp.

Definition at line 169 of file game.cpp.

Definition at line 178 of file game.cpp.

std::string multiplayer_server_

Definition at line 195 of file game.cpp.

Definition at line 172 of file game.cpp.

bool new_widgets = false [static]

Definition at line 102 of file game.cpp.

bool no_gui_

Definition at line 178 of file game.cpp.

Definition at line 193 of file game.cpp.

Definition at line 174 of file game.cpp.

Definition at line 167 of file game.cpp.

Definition at line 173 of file game.cpp.

Referenced by main().

Definition at line 187 of file game.cpp.

bool test_mode_

Definition at line 178 of file game.cpp.

std::string test_scenario_

Definition at line 176 of file game.cpp.

Definition at line 162 of file game.cpp.

Definition at line 171 of file game.cpp.

Definition at line 179 of file game.cpp.

Definition at line 164 of file game.cpp.


Generated by doxygen 1.5.5 on 23 May 2008 for The Battle for Wesnoth
Gna! | Forum | Wiki | CIA | devdocs