The Battle for Wesnoth  1.19.5+dev
Namespaces | Functions
utility.cpp File Reference
#include <limits>
#include "whiteboard/utility.hpp"
#include "whiteboard/manager.hpp"
#include "whiteboard/side_actions.hpp"
#include "display.hpp"
#include "map/map.hpp"
#include "play_controller.hpp"
#include "resources.hpp"
#include "team.hpp"
#include "units/unit.hpp"
#include "units/animation_component.hpp"
#include "utils/iterable_pair.hpp"
Include dependency graph for utility.cpp:

Go to the source code of this file.

Namespaces

 wb
 

Functions

int wb::viewer_side ()
 
side_actions_ptr wb::viewer_actions ()
 
side_actions_ptr wb::current_side_actions ()
 
unit_const_ptr wb::find_backup_leader (const unit &leader)
 For a given leader on a keep, find another leader on another keep in the same castle. More...
 
unitwb::find_recruiter (std::size_t team_index, const map_location &hex)
 
bool wb::any_recruiter (int side_num, const map_location &loc, std::function< bool(unit &)> func)
 executes func for each unti of side of side_num that can recruit on loc. More...
 
unitwb::future_visible_unit (map_location hex, int viewer_side=wb::viewer_side())
 Applies the future unit map and. More...
 
unitwb::future_visible_unit (int on_side, map_location hex, int viewer_side=wb::viewer_side())
 Applies the future unit map and. More...
 
int wb::path_cost (const std::vector< map_location > &path, const unit &u)
 Computes the MP cost for u to travel path. More...
 
void wb::ghost_owner_unit (unit *unit)
 
void wb::unghost_owner_unit (unit *unit)
 
bool wb::has_actions ()
 Return whether the whiteboard has actions. More...
 
bool wb::team_has_visible_plan (team &)
 Returns whether a given team's plan is visible. More...
 
void wb::for_each_action (std::function< void(action *)> function, team_filter team_filter=team_has_visible_plan)
 Apply a function to all the actions of the whiteboard. More...
 
action_ptr wb::find_action_at (map_location hex, team_filter team_filter=team_has_visible_plan)
 Find the first action occurring on a given hex. More...
 
std::deque< action_ptr > wb::find_actions_of (const unit &target)
 Find the actions of an unit. More...