Define the game's events mechanism. More...
#include "map.hpp"#include "variable.hpp"

Go to the source code of this file.
Classes | |
| struct | game_events::manager |
| struct | game_events::entity_location |
| struct | game_events::queued_event |
| class | game_events::event_handler |
Namespaces | |
| namespace | game_events |
Domain specific events. | |
Typedefs | |
| typedef void(* | game_events::action_handler )(const game_events::queued_event &, const vconfig &) |
Functions | |
| void | change_terrain (const map_location &loc, const t_translation::t_terrain &t, gamemap::tmerge_mode mode, bool replace_if_failed) |
| Changes a terrain location. | |
| void | game_events::handle_event_commands (const queued_event &event_info, const vconfig &cfg) |
| Runs the action handler associated to the command sequence cfg. | |
| void | game_events::handle_event_command (const std::string &cmd, const queued_event &event_info, const vconfig &cfg) |
| Runs the action handler associated to cmd with parameters cfg. | |
| void | game_events::write_events (config &cfg) |
| void | game_events::add_events (const config::const_child_itors &cfgs, const std::string &type) |
| bool | game_events::unit_matches_filter (const unit &u, const vconfig &filter) |
| void | game_events::handle_wml_log_message (const config &cfg) |
| Used for [wml_message]. | |
| void | game_events::handle_deprecated_message (const config &cfg) |
| Used for [deprecated_message]. | |
| std::vector< int > | game_events::get_sides_vector (const vconfig &cfg) |
| Gets a vector of sides from side= attribute in a given config node. | |
| bool | game_events::fire (const std::string &event, const entity_location &loc1=map_location::null_location, const entity_location &loc2=map_location::null_location, const config &data=config()) |
| Function to fire an event. | |
| void | game_events::raise (const std::string &event, const entity_location &loc1, const entity_location &loc2, const config &data) |
| bool | game_events::conditional_passed (const vconfig &cond, bool backwards_compat) |
| void | game_events::commit () |
| Handles newly-created handlers. | |
| bool | game_events::pump () |
Define the game's events mechanism.
Events might be units moving or fighting, or when victory or defeat occurs. A scenario's configuration file will define actions to take when certain events occur. This module is responsible for making sure that when the events occur, the actions take place.
Note that game events have nothing to do with SDL events, like mouse movement, keyboard events, etc. See events.hpp for how they are handled.
Definition in file game_events.hpp.
| void change_terrain | ( | const map_location & | loc, | |
| const t_translation::t_terrain & | t, | |||
| gamemap::tmerge_mode | mode, | |||
| bool | replace_if_failed | |||
| ) |
Changes a terrain location.
Ensures that villages are properly lost and that new terrains are discovered.
Definition at line 1769 of file game_events.cpp.
References preferences::encountered_terrains(), resources::game_map, gamemap::get_terrain(), gamemap::is_village(), gamemap::merge_terrains(), t_translation::NONE_TERRAIN, screen_needs_rebuild, gamemap::set_terrain(), gamemap::underlying_union_terrain(), and village_owner().
Referenced by intf_set_terrain().


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