mp Namespace Reference

This module controls the multiplayer lobby. More...


Classes

class  connect
class  create
struct  minimap_cache_item
class  gamebrowser
class  lobby
class  chat
class  ui
class  wait

Enumerations

enum  controller {
  CNTR_NETWORK = 0, CNTR_LOCAL, CNTR_COMPUTER, CNTR_EMPTY,
  CNTR_LAST
}

Functions

void start_server (game_display &disp, const config &game_config, mp::controller default_controller, bool is_server)
 Starts a multiplayer game in server mode, or in single-user mode.
void start_client (game_display &disp, const config &game_config, const std::string host)
 Starts a multiplayer game in client mode.
void check_response (network::connection res, const config &data)
void level_to_gamestate (config &level, game_state &state, bool saved_game)
std::string get_colour_string (int id)

Variables

const size_t max_login_size = 18


Detailed Description

This module controls the multiplayer lobby.

A section on the server which allows players to chat, create games, and join games.


Enumeration Type Documentation

Enumerator:
CNTR_NETWORK 
CNTR_LOCAL 
CNTR_COMPUTER 
CNTR_EMPTY 
CNTR_LAST 

Definition at line 34 of file multiplayer_ui.hpp.


Function Documentation

void mp::check_response ( network::connection  res,
const config data 
)

Definition at line 70 of file multiplayer_ui.cpp.

References _, config::child(), and lg::err.

Referenced by mp::wait::join_game(), and open_connection().

std::string mp::get_colour_string ( int  id  ) 

void mp::level_to_gamestate ( config level,
game_state state,
bool  saved_game 
)

void mp::start_client ( game_display disp,
const config game_config,
const std::string  host 
)

Starts a multiplayer game in client mode.

Parameters:
disp The global display
game_config The global, top-level WML configuration for the game
host The host to connect to.

Definition at line 470 of file multiplayer.cpp.

References ABORT_SERVER, enter_lobby_mode(), enter_wait_mode(), open_connection(), recorder, preferences::set_message_private(), playmp_controller::set_replay_last_turn(), SIMPLE_SERVER, type, and WESNOTHD_SERVER.

void mp::start_server ( game_display disp,
const config game_config,
mp::controller  default_controller,
bool  is_server 
)

Starts a multiplayer game in server mode, or in single-user mode.

Parameters:
disp The global display
game_config The global, top-level WML configuration for the game
default_controller The default controller type
is_server Whether to open a port to the outside, or not.

Definition at line 459 of file multiplayer.cpp.

References enter_create_mode(), recorder, preferences::set_message_private(), and playmp_controller::set_replay_last_turn().


Variable Documentation

const size_t mp::max_login_size = 18

Definition at line 25 of file multiplayer.hpp.

Referenced by open_connection().


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