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::locator & | current_image () const |
Private Attributes | |
animated< image::locator > | images_ |
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} |
display * | disp = nullptr |
halo::halo_impl::effect::effect | ( | int | xpos, |
int | ypos, | ||
const animated< image::locator >::anim_description & | img, | ||
const map_location & | loc, | ||
ORIENTATION | orientation, | ||
bool | infinite | ||
) |
Definition at line 151 of file halo.cpp.
References cached_zoom_, disp, display::get_zoom_factor(), images_, set_location(), animated< T >::start_animation(), and update().
Referenced by halo::halo_impl::add().
|
inlineprivate |
Definition at line 73 of file halo.cpp.
References animated< T >::get_current_frame(), and images_.
Referenced by update().
|
inline |
Definition at line 67 of file halo.cpp.
References animated< T >::does_not_change(), images_, location_not_known(), and on_location().
|
inline |
Definition at line 65 of file halo.cpp.
References animated< T >::animation_finished(), animated< T >::cycles(), and images_.
Referenced by halo::halo_impl::update().
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().
bool halo::halo_impl::effect::location_not_known | ( | ) | const |
Referenced by does_change().
|
inline |
Definition at line 66 of file halo.cpp.
References images_, and animated< T >::need_update().
bool halo::halo_impl::effect::on_location | ( | const std::set< map_location > & | locations | ) | const |
Referenced by does_change().
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().
void halo::halo_impl::effect::queue_undraw | ( | ) |
Definition at line 285 of file halo.cpp.
References DBG_HL, disp, draw_manager::invalidate_region(), last_draw_loc_, display::map_outside_area(), and rect::overlaps().
Referenced by update(), and halo::halo_impl::update().
bool halo::halo_impl::effect::render | ( | ) |
Definition at line 255 of file halo.cpp.
References draw::blit(), DBG_HL, disp, draw::flipped(), halo::HREVERSE, halo::HVREVERSE, images_, last_draw_loc_, display::map_outside_area(), halo::NORMAL, orientation_, draw::reduce_clip(), screen_loc_, tex_, animated< T >::update_last_draw_time(), visible(), and halo::VREVERSE.
Referenced by halo::halo_impl::halo_impl(), and halo::halo_impl::render().
void halo::halo_impl::effect::set_location | ( | int | x, |
int | y | ||
) |
Definition at line 170 of file halo.cpp.
References abs_mid_, DBG_HL, disp, display::get_location_x(), display::get_location_y(), and map_location::ZERO().
Referenced by effect(), halo::halo_impl::halo_impl(), and update().
void halo::halo_impl::effect::update | ( | ) |
Update the current location, animation frame, etc.
Definition at line 188 of file halo.cpp.
References abs_mid_, cached_zoom_, current_image(), disp, ERR_HL, display::get_location_x(), display::get_location_y(), image::get_texture(), display::get_zoom_factor(), texture::h(), h, display::hex_size(), last_draw_loc_, map_loc_, queue_redraw(), queue_undraw(), screen_loc_, set_location(), tex_, texture::w(), w, map_location::x, map_location::y, and map_location::ZERO().
Referenced by effect(), and halo::halo_impl::halo_impl().
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().
|
private |
Definition at line 82 of file halo.cpp.
Referenced by set_location(), and update().
|
private |
|
private |
Definition at line 96 of file halo.cpp.
Referenced by effect(), queue_undraw(), render(), set_location(), update(), and visible().
|
private |
Definition at line 75 of file halo.cpp.
Referenced by current_image(), does_change(), effect(), expired(), need_update(), and render().
|
private |
Definition at line 89 of file halo.cpp.
Referenced by queue_undraw(), render(), and update().
|
private |
|
private |
|
private |
Definition at line 87 of file halo.cpp.
Referenced by get_draw_location(), queue_redraw(), render(), update(), and visible().
|
private |