The Battle for Wesnoth  1.19.5+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 44 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
inlineprivate

Definition at line 72 of file halo.cpp.

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

◆ does_change()

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

Definition at line 66 of file halo.cpp.

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

◆ expired()

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

Definition at line 64 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 178 of file halo.cpp.

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

◆ location_not_known()

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

◆ need_update()

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

Definition at line 65 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

◆ queue_redraw()

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

Definition at line 288 of file halo.cpp.

References DBG_HL, and draw_manager::invalidate_region().

◆ queue_undraw()

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

Definition at line 279 of file halo.cpp.

References DBG_HL, and draw_manager::invalidate_region().

◆ render()

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

◆ set_location()

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

Definition at line 169 of file halo.cpp.

References DBG_HL, and map_location::ZERO().

Referenced by effect().

◆ update()

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

Update the current location, animation frame, etc.

Definition at line 185 of file halo.cpp.

References ERR_HL, image::get_texture(), h, halo::halo_impl::set_location(), w, and map_location::ZERO().

Referenced by effect().

◆ visible()

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

Whether the halo is currently visible.

Definition at line 232 of file halo.cpp.

Member Data Documentation

◆ abs_mid_

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

Definition at line 81 of file halo.cpp.

◆ cached_zoom_

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

Definition at line 90 of file halo.cpp.

Referenced by effect().

◆ disp

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

Definition at line 95 of file halo.cpp.

Referenced by effect().

◆ images_

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

Definition at line 74 of file halo.cpp.

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

◆ last_draw_loc_

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

Definition at line 88 of file halo.cpp.

◆ map_loc_

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

Definition at line 93 of file halo.cpp.

◆ orientation_

ORIENTATION halo::halo_impl::effect::orientation_
private

Definition at line 76 of file halo.cpp.

◆ screen_loc_

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

Definition at line 86 of file halo.cpp.

◆ tex_

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

Definition at line 84 of file halo.cpp.


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