The Battle for Wesnoth  1.17.6+dev
Public Member Functions | Private Member Functions | Private Attributes | List of all members
halo::halo_impl::effect Class Reference

Public Member Functions

 effect (int xpos, int ypos, const animated< image::locator >::anim_description &img, const map_location &loc, ORIENTATION, bool infinite)
void set_location (int x, int y)
rect get_draw_location ()
bool visible ()
 Whether the halo is currently visible. More...
void queue_undraw ()
void queue_redraw ()
void update ()
 Update the current location, animation frame, etc. More...
bool render ()
bool expired () const
bool need_update () const
bool does_change () const
bool on_location (const std::set< map_location > &locations) const
bool location_not_known () const

Private Member Functions

const image::locatorcurrent_image () const

Private Attributes

animated< image::locatorimages_
ORIENTATION orientation_
point abs_mid_ = {0, 0}
texture tex_ = {}
rect screen_loc_ = {}
rect last_draw_loc_ = {}
double cached_zoom_ = 1.0
map_location map_loc_ = {-1, -1}
displaydisp = nullptr

Detailed Description

Definition at line 45 of file halo.cpp.

Constructor & Destructor Documentation

◆ effect()

halo::halo_impl::effect::effect ( int  xpos,
int  ypos,
const animated< image::locator >::anim_description &  img,
const map_location loc,
ORIENTATION  orientation,
bool  infinite 

Member Function Documentation

◆ current_image()

const image::locator& halo::halo_impl::effect::current_image ( ) const

Definition at line 73 of file halo.cpp.

References animated< T >::get_current_frame(), and images_.

Referenced by update().

◆ does_change()

bool halo::halo_impl::effect::does_change ( ) const

◆ expired()

bool halo::halo_impl::effect::expired ( ) const

Definition at line 65 of file halo.cpp.

References animated< T >::animation_finished(), animated< T >::cycles(), and images_.

Referenced by halo::halo_impl::update().

◆ get_draw_location()

rect halo::halo_impl::effect::get_draw_location ( )

Definition at line 181 of file halo.cpp.

References screen_loc_.

Referenced by halo::halo_impl::render().

◆ location_not_known()

bool halo::halo_impl::effect::location_not_known ( ) const

Referenced by does_change().

◆ need_update()

bool halo::halo_impl::effect::need_update ( ) const

Definition at line 66 of file halo.cpp.

References images_, and animated< T >::need_update().

◆ on_location()

bool halo::halo_impl::effect::on_location ( const std::set< map_location > &  locations) const

Referenced by does_change().

◆ queue_redraw()

void halo::halo_impl::effect::queue_redraw ( )

Definition at line 294 of file halo.cpp.

References DBG_HL, draw_manager::invalidate_region(), screen_loc_, and visible().

Referenced by update().

◆ queue_undraw()

void halo::halo_impl::effect::queue_undraw ( )

◆ render()

bool halo::halo_impl::effect::render ( )

◆ set_location()

void halo::halo_impl::effect::set_location ( int  x,
int  y 

◆ update()

void halo::halo_impl::effect::update ( )

◆ visible()

bool halo::halo_impl::effect::visible ( )

Whether the halo is currently visible.

Definition at line 238 of file halo.cpp.

References disp, map_loc_, display::map_outside_area(), rect::overlaps(), screen_loc_, display::shrouded(), map_location::x, and map_location::y.

Referenced by queue_redraw(), and render().

Member Data Documentation

◆ abs_mid_

point halo::halo_impl::effect::abs_mid_ = {0, 0}

Definition at line 82 of file halo.cpp.

Referenced by set_location(), and update().

◆ cached_zoom_

double halo::halo_impl::effect::cached_zoom_ = 1.0

Definition at line 91 of file halo.cpp.

Referenced by effect(), and update().

◆ disp

display* halo::halo_impl::effect::disp = nullptr

Definition at line 96 of file halo.cpp.

Referenced by effect(), queue_undraw(), render(), set_location(), update(), and visible().

◆ images_

animated<image::locator> halo::halo_impl::effect::images_

Definition at line 75 of file halo.cpp.

Referenced by current_image(), does_change(), effect(), expired(), need_update(), and render().

◆ last_draw_loc_

rect halo::halo_impl::effect::last_draw_loc_ = {}

Definition at line 89 of file halo.cpp.

Referenced by queue_undraw(), render(), and update().

◆ map_loc_

map_location halo::halo_impl::effect::map_loc_ = {-1, -1}

Definition at line 94 of file halo.cpp.

Referenced by update(), and visible().

◆ orientation_

ORIENTATION halo::halo_impl::effect::orientation_

Definition at line 77 of file halo.cpp.

Referenced by render().

◆ screen_loc_

rect halo::halo_impl::effect::screen_loc_ = {}

Definition at line 87 of file halo.cpp.

Referenced by get_draw_location(), queue_redraw(), render(), update(), and visible().

◆ tex_

texture halo::halo_impl::effect::tex_ = {}

Definition at line 85 of file halo.cpp.

Referenced by render(), and update().

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