The Battle for Wesnoth  1.13.4+dev
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
Public Types | Public Member Functions | Private Member Functions | Private Attributes | List of all members
game_launcher Class Reference

#include <game_launcher.hpp>

Public Types

enum  RELOAD_GAME_DATA { RELOAD_DATA, NO_RELOAD_DATA }
 

Public Member Functions

 game_launcher (const commandline_options &cmdline_opts, const char *appname)
 
 ~game_launcher ()
 
CVideovideo ()
 
bool init_video ()
 
bool init_language ()
 
bool init_joystick ()
 
bool init_lua_script ()
 
bool play_test ()
 
bool play_screenshot_mode ()
 
bool play_render_image_mode ()
 
int unit_test ()
 
bool is_loading () const
 
void clear_loaded_game ()
 
bool load_game ()
 
void set_tutorial ()
 
std::string jump_to_campaign_id () const
 
bool new_campaign ()
 
bool goto_campaign ()
 
bool goto_multiplayer ()
 
bool goto_editor ()
 
bool jump_to_editor () const
 
bool play_multiplayer ()
 
bool play_multiplayer_commandline ()
 
bool change_language ()
 
void show_preferences ()
 
void launch_game (RELOAD_GAME_DATA reload=RELOAD_DATA)
 
void play_replay ()
 
editor::EXIT_STATUS start_editor ()
 
void start_wesnothd ()
 
const commandline_optionsopts () const
 

Private Member Functions

 game_launcher (const game_launcher &)
 
void operator= (const game_launcher &)
 
void mark_completed_campaigns (std::vector< config > &campaigns)
 
editor::EXIT_STATUS start_editor (const std::string &filename)
 

Private Attributes

const commandline_optionscmdline_opts_
 
boost::scoped_ptr< CVideovideo_
 
const font::manager font_manager_
 
const preferences::manager prefs_manager_
 
const image::manager image_manager_
 
const events::event_context main_event_context_
 
const hotkey::manager hotkey_manager_
 
sound::music_thinker music_thinker_
 
std::string test_scenario_
 
std::string screenshot_map_
 
std::string screenshot_filename_
 
saved_game state_
 
bool play_replay_
 
std::string multiplayer_server_
 
bool jump_to_multiplayer_
 
jump_to_campaign_info jump_to_campaign_
 
bool jump_to_editor_
 

Detailed Description

Definition at line 53 of file game_launcher.hpp.

Member Enumeration Documentation

Enumerator
RELOAD_DATA 
NO_RELOAD_DATA 

Definition at line 90 of file game_launcher.hpp.

Constructor & Destructor Documentation

game_launcher::game_launcher ( const commandline_options cmdline_opts,
const char *  appname 
)

Definition at line 106 of file game_launcher.cpp.

References preferences::_set_maximized(), preferences::_set_resolution(), filesystem::base_name(), commandline_options::campaign, commandline_options::campaign_difficulty, jump_to_campaign_info::campaign_id_, commandline_options::campaign_scenario, commandline_options::clock, cmdline_opts_, commandline_options::core_id, game_config::debug, commandline_options::debug, jump_to_campaign_info::difficulty_, preferences::disable_preferences_save(), commandline_options::editor, font_manager_, commandline_options::fps, commandline_options::fullscreen, game::load_game_exception::game, filesystem::get_cwd(), commandline_options::headless_unit_test, if(), jump_to_campaign_info::jump_, jump_to_campaign_, jump_to_editor_, jump_to_multiplayer_, commandline_options::load, commandline_options::max_fps, game_config::mp_debug, multiplayer_server_, preferences::network_host(), gui2::new_widgets, commandline_options::new_widgets, game_config::no_delay, commandline_options::nodelay, commandline_options::nogui, commandline_options::nomusic, commandline_options::nosound, game_config::path, commandline_options::resolution, jump_to_campaign_info::scenario_id_, commandline_options::screenshot, screenshot_filename_, screenshot_map_, commandline_options::screenshot_map_file, commandline_options::screenshot_output_file, commandline_options::server, game_config::server_list, preferences::set_core_id(), preferences::set_draw_delay(), CVideo::set_fullscreen(), preferences::set_level(), preferences::set_show_fps(), gui2::show_debug_clock_button, font::manager::update_font_path(), and video().

game_launcher::~game_launcher ( )

Definition at line 1050 of file game_launcher.cpp.

References sound::close_sound(), and gui::dialog::delete_empty_menu().

game_launcher::game_launcher ( const game_launcher )
private

Member Function Documentation

bool game_launcher::change_language ( )
void game_launcher::clear_loaded_game ( )
inline
bool game_launcher::goto_campaign ( )
bool game_launcher::goto_editor ( )
bool game_launcher::goto_multiplayer ( )

Definition at line 752 of file game_launcher.cpp.

References jump_to_multiplayer_, and play_multiplayer().

bool game_launcher::init_joystick ( )

Definition at line 290 of file game_launcher.cpp.

References i, and preferences::joystick_support_enabled().

bool game_launcher::init_language ( )
bool game_launcher::init_lua_script ( )
bool game_launcher::init_video ( )
bool game_launcher::is_loading ( ) const

Definition at line 622 of file game_launcher.cpp.

References game::load_game_exception::game.

std::string game_launcher::jump_to_campaign_id ( ) const

Definition at line 733 of file game_launcher.cpp.

References jump_to_campaign_info::campaign_id_, and jump_to_campaign_.

bool game_launcher::jump_to_editor ( ) const
inline

Definition at line 82 of file game_launcher.hpp.

References jump_to_editor_.

void game_launcher::launch_game ( RELOAD_GAME_DATA  reload = RELOAD_DATA)
bool game_launcher::load_game ( )
void game_launcher::mark_completed_campaigns ( std::vector< config > &  campaigns)
private

Definition at line 715 of file game_launcher.cpp.

References preferences::is_campaign_completed().

bool game_launcher::new_campaign ( )
void game_launcher::operator= ( const game_launcher )
private
const commandline_options& game_launcher::opts ( ) const
inline

Definition at line 98 of file game_launcher.hpp.

References cmdline_opts_.

bool game_launcher::play_multiplayer ( )
bool game_launcher::play_multiplayer_commandline ( )
bool game_launcher::play_render_image_mode ( )
void game_launcher::play_replay ( )
bool game_launcher::play_screenshot_mode ( )
bool game_launcher::play_test ( )
void game_launcher::set_tutorial ( )
void game_launcher::show_preferences ( )
editor::EXIT_STATUS game_launcher::start_editor ( )
inline

Definition at line 94 of file game_launcher.hpp.

References start_editor().

Referenced by goto_editor(), and start_editor().

editor::EXIT_STATUS game_launcher::start_editor ( const std::string filename)
private
void game_launcher::start_wesnothd ( )
int game_launcher::unit_test ( )
CVideo& game_launcher::video ( )
inline

Member Data Documentation

const commandline_options& game_launcher::cmdline_opts_
private
const font::manager game_launcher::font_manager_
private

Definition at line 111 of file game_launcher.hpp.

Referenced by game_launcher().

const hotkey::manager game_launcher::hotkey_manager_
private

Definition at line 115 of file game_launcher.hpp.

const image::manager game_launcher::image_manager_
private

Definition at line 113 of file game_launcher.hpp.

jump_to_campaign_info game_launcher::jump_to_campaign_
private
bool game_launcher::jump_to_editor_
private

Definition at line 129 of file game_launcher.hpp.

Referenced by game_launcher(), goto_editor(), init_lua_script(), and jump_to_editor().

bool game_launcher::jump_to_multiplayer_
private

Definition at line 126 of file game_launcher.hpp.

Referenced by game_launcher(), goto_multiplayer(), and init_lua_script().

const events::event_context game_launcher::main_event_context_
private

Definition at line 114 of file game_launcher.hpp.

std::string game_launcher::multiplayer_server_
private

Definition at line 125 of file game_launcher.hpp.

Referenced by game_launcher(), and play_multiplayer().

sound::music_thinker game_launcher::music_thinker_
private

Definition at line 116 of file game_launcher.hpp.

bool game_launcher::play_replay_
private

Definition at line 123 of file game_launcher.hpp.

Referenced by launch_game(), load_game(), and new_campaign().

const preferences::manager game_launcher::prefs_manager_
private

Definition at line 112 of file game_launcher.hpp.

std::string game_launcher::screenshot_filename_
private

Definition at line 120 of file game_launcher.hpp.

Referenced by game_launcher(), and play_screenshot_mode().

std::string game_launcher::screenshot_map_
private

Definition at line 120 of file game_launcher.hpp.

Referenced by game_launcher(), and play_screenshot_mode().

saved_game game_launcher::state_
private
std::string game_launcher::test_scenario_
private

Definition at line 118 of file game_launcher.hpp.

Referenced by play_test(), and unit_test().

boost::scoped_ptr<CVideo> game_launcher::video_
private

Definition at line 109 of file game_launcher.hpp.

Referenced by video().


The documentation for this class was generated from the following files: