playmp_controller Class Reference

#include <playmp_controller.hpp>

Inheritance diagram for playmp_controller:

Inheritance graph
[legend]
Collaboration diagram for playmp_controller:

Collaboration graph
[legend]

List of all members.

Public Member Functions

 playmp_controller (const config &level, game_state &state_of_game, const int ticks, const int num_turns, const config &game_config, CVideo &video, bool skip_replay, bool is_host)
 ~playmp_controller ()
bool is_host ()
bool counting_down ()
void think_about_countdown (int ticks)
void process (events::pump_info &info)
void linger (upload_log &log)
void wait_for_upload ()
 Wait for the host to upload the next scenario.

Static Public Member Functions

static unsigned int replay_last_turn ()
static void set_replay_last_turn (unsigned int turn)

Protected Member Functions

virtual void handle_generic_event (const std::string &name)
virtual void speak ()
virtual void whisper ()
virtual void shout ()
virtual void clear_labels ()
virtual bool can_execute_command (hotkey::HOTKEY_COMMAND command, int index=-1) const
 Check if a command can be executed.
virtual void play_side (const unsigned int team_index, bool save)
virtual void before_human_turn (bool save)
virtual void play_human_turn ()
virtual void after_human_turn ()
virtual void finish_side_turn ()
void play_network_turn ()

Protected Attributes

turn_infoturn_data_
int beep_warning_time_

Private Member Functions

void process_oos (const std::string &err_msg)
void set_end_scenario_button ()
void reset_end_scenario_button ()

Static Private Attributes

static unsigned int replay_last_turn_ = 0


Detailed Description

Definition at line 28 of file playmp_controller.hpp.


Constructor & Destructor Documentation

playmp_controller::playmp_controller ( const config level,
game_state state_of_game,
const int  ticks,
const int  num_turns,
const config game_config,
CVideo video,
bool  skip_replay,
bool  is_host 
)

playmp_controller::~playmp_controller (  ) 

Definition at line 49 of file playmp_controller.cpp.

References beep_warning_time_, and sound::stop_bell().


Member Function Documentation

bool playmp_controller::is_host (  )  [inline]

Definition at line 36 of file playmp_controller.hpp.

References play_controller::is_host_.

static unsigned int playmp_controller::replay_last_turn (  )  [inline, static]

Definition at line 38 of file playmp_controller.hpp.

References replay_last_turn_.

void playmp_controller::set_replay_last_turn ( unsigned int  turn  )  [static]

Definition at line 56 of file playmp_controller.cpp.

References replay_last_turn_.

Referenced by mp::lobby::process_event(), mp::start_client(), and mp::start_server().

bool playmp_controller::counting_down (  ) 

Definition at line 132 of file playmp_controller.cpp.

References beep_warning_time_.

Referenced by play_human_turn(), and process().

void playmp_controller::think_about_countdown ( int  ticks  ) 

void playmp_controller::process ( events::pump_info info  )  [virtual]

void playmp_controller::linger ( upload_log log  ) 

void playmp_controller::wait_for_upload (  ) 

void playmp_controller::handle_generic_event ( const std::string &  name  )  [protected, virtual]

void playmp_controller::speak (  )  [protected, virtual]

Reimplemented from hotkey::command_executor.

Definition at line 64 of file playmp_controller.cpp.

References play_controller::menu_handler_, and events::menu_handler::speak().

void playmp_controller::whisper (  )  [protected, virtual]

void playmp_controller::shout (  )  [protected, virtual]

Reimplemented from hotkey::command_executor.

Definition at line 72 of file playmp_controller.cpp.

References play_controller::menu_handler_, and events::menu_handler::shout().

void playmp_controller::clear_labels (  )  [protected, virtual]

bool playmp_controller::can_execute_command ( hotkey::HOTKEY_COMMAND  command,
int  index = -1 
) const [protected, virtual]

void playmp_controller::play_side ( const unsigned int  team_index,
bool  save 
) [protected, virtual]

void playmp_controller::before_human_turn ( bool  save  )  [protected, virtual]

void playmp_controller::play_human_turn (  )  [protected, virtual]

void playmp_controller::after_human_turn (  )  [protected, virtual]

void playmp_controller::finish_side_turn (  )  [protected, virtual]

void playmp_controller::play_network_turn (  )  [protected]

void playmp_controller::process_oos ( const std::string &  err_msg  )  [private]

void playmp_controller::set_end_scenario_button (  )  [private]

void playmp_controller::reset_end_scenario_button (  )  [private]


Member Data Documentation

unsigned int playmp_controller::replay_last_turn_ = 0 [static, private]


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

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