54 , exclusive_display_hexes_()
56 , selection_candidate_()
59 , secondary_highlights_()
60 , side_actions_(side_actions)
117 if(act->is_numbering_hex(hex)) {
141 main->accept(hm_visitor);
170 main->accept(uh_visitor);
184 exclusive_display_hexes_.clear();
190 if(move->get_fake_unit()) {
196 bool this_is_last_action = last_action != sa.
end() && move == *last_action;
197 bool last_action_has_fake_unit = last_action != sa.
end() && (*last_action)->get_fake_unit();
198 bool this_is_second_to_last_action = (second_to_last_action != sa.
end() && move == *second_to_last_action);
200 if(this_is_last_action || (this_is_second_to_last_action && !last_action_has_fake_unit)) {
201 move->get_fake_unit()->anim_comp().set_standing(
true);
244 return *
side_actions_->find_first_action_of(locked->get_unit_id());
252 return *
side_actions_->find_last_action_of(locked->get_unit_id());
274 if(move->get_arrow()) {
277 if(move->get_fake_unit()) {
279 move->get_fake_unit()->anim_comp().set_ghosted(
true);
282 highlighter_.exclusive_display_hexes_.insert(move->get_fake_unit()->get_location());
284 highlighter_.last_action_redraw(move);
291 visit(std::static_pointer_cast<move>(attack));
296 if(recruit->get_fake_unit()) {
301 highlighter_.exclusive_display_hexes_.insert(recruit->get_fake_unit()->get_location());
307 if(move->get_arrow()) {
310 if(move->get_fake_unit()) {
311 move->get_fake_unit()->anim_comp().set_ghosted(
true);
314 highlighter_.exclusive_display_hexes_.insert(move->get_fake_unit()->get_location());
316 highlighter_.last_action_redraw(move);
322 visit(std::static_pointer_cast<move>(attack));
327 if(move->get_arrow()) {
330 if(move->get_fake_unit()) {
331 move->get_fake_unit()->anim_comp().set_disabled_ghosted(
false);
333 highlighter_.last_action_redraw(move);
339 visit(std::static_pointer_cast<move>(attack));
344 if(recall->get_fake_unit()) {
349 highlighter_.exclusive_display_hexes_.insert(recall->get_fake_unit()->get_location());
container::iterator iterator
void remove()
Removes a tip.
iterator end()
Returns the iterator for the position after the last executed action within the actions queue...
Arrows destined to be drawn on the map.
static display * get_singleton()
Returns the display object if a display object exists.
action_ptr get_delete_target()
virtual const std::vector< team > & teams() const override
side_actions_ptr side_actions_
std::deque< action_ptr > find_actions_of(const unit &target)
Find the actions of an unit.
virtual const unit_map & units() const override
weak_action_ptr main_highlight_
int main(int, char **argv)
void find_main_highlight()
std::shared_ptr< side_actions > side_actions_ptr
weak_action_ptr selected_action_
auto reversed_view(T &container)
std::shared_ptr< attack > attack_ptr
void find_secondary_highlights()
map_location mouseover_hex_
unit_map & get_unit_map()
Definitions for the interface to Wesnoth Markup Language (WML).
std::shared_ptr< unit > unit_ptr
unit_ptr selection_candidate_
std::shared_ptr< recruit > recruit_ptr
highlighter(side_actions_ptr side_actions)
secondary_highlights_t secondary_highlights_
std::shared_ptr< action > action_ptr
iterator find_last_action_of(const unit &unit, iterator start_position)
Finds the last action that belongs to this unit, starting the search backwards from the specified pos...
Encapsulates the map of the game.
unit_iterator find(std::size_t id)
pointer get_shared_ptr() const
This is exactly the same as operator-> but it's slightly more readable, and can replace &*iter syntax...
void set_mouseover_hex(const map_location &hex)
iterator begin()
Returns the iterator for the first (executed earlier) action within the actions queue.
bool add_exclusive_draw(const map_location &loc, unit &unit)
Allows a unit to request to be the only one drawn in its hex.
std::shared_ptr< move > move_ptr
std::weak_ptr< action > weak_action_ptr
action_ptr get_bump_target()
unit_ptr get_selection_target()
std::set< map_location > exclusive_display_hexes_
Container associating units to locations.
std::shared_ptr< recall > recall_ptr
void last_action_redraw(move_ptr)
Redraw the given move action when needed.
virtual void accept(visitor &v)=0
Ensures that the real unit map is active for the duration of the struct's life.
action_ptr get_execute_target()
Abstract base class for all the whiteboard planned actions.
action_ptr find_action_at(map_location hex, team_filter team_filter)
Find the first action occurring on a given hex.
This internal whiteboard class holds the planned action queues for a team, and offers many utility me...
A planned move, represented on the map by an arrow and a ghosted unit in the destination hex...
std::string remove_exclusive_draw(const map_location &loc)
Cancels an exclusive draw request.
static game_display * get_singleton()