Classes | |
class | effect |
Public Member Functions | |
halo_impl (display &screen) | |
impl's of exposed functions More... | |
int | add (int x, int y, const std::string &image, const map_location &loc, ORIENTATION orientation=NORMAL, bool infinite=true) |
void | set_location (int handle, int x, int y) |
Set the position of an existing haloing effect, according to its handle. More... | |
void | remove (int handle) |
Remove the halo with the given handle. More... | |
void | unrender (std::set< map_location > invalidated_locations) |
Render and unrender haloes. More... | |
void | render () |
Private Attributes | |
display * | disp |
std::map< int, effect > | haloes |
int | halo_id |
std::set< int > | invalidated_haloes |
Upon unrendering, an invalidation list is send. More... | |
std::set< int > | deleted_haloes |
Upon deleting, a halo isn't deleted but added to this set, upon unrendering the image is unrendered and deleted. More... | |
std::set< int > | changing_haloes |
Haloes that have an animation or expiration time need to be checked every frame and are stored in this set. More... | |
|
inlineexplicit |
impl's of exposed functions
Definition at line 109 of file halo.cpp.
References add(), halo::NORMAL, halo::halo_impl::effect::render(), halo::halo_impl::effect::set_location(), and halo::halo_impl::effect::unrender().
int halo::halo_impl::add | ( | int | x, |
int | y, | ||
const std::string & | image, | ||
const map_location & | loc, | ||
ORIENTATION | orientation = NORMAL , |
||
bool | infinite = true |
||
) |
Definition at line 307 of file halo.cpp.
References changing_haloes, halo::halo_impl::effect::disp, halo::halo_impl::effect::effect(), ERR_DP, halo_id, haloes, id, invalidated_haloes, mp::ui_alerts::items, utils::split(), and utils::square_parenthetical_split().
Referenced by halo_impl().
void halo::halo_impl::remove | ( | int | handle | ) |
Remove the halo with the given handle.
Definition at line 346 of file halo.cpp.
References deleted_haloes, haloes, and halo::NO_HALO.
void halo::halo_impl::render | ( | ) |
Definition at line 432 of file halo.cpp.
References haloes, and invalidated_haloes.
void halo::halo_impl::set_location | ( | int | handle, |
int | x, | ||
int | y | ||
) |
void halo::halo_impl::unrender | ( | std::set< map_location > | invalidated_locations | ) |
Render and unrender haloes.
Which haloes are rendered is determined by invalidated_locations and the internal state in the control sets (in halo.cpp).
Definition at line 357 of file halo.cpp.
References changing_haloes, deleted_haloes, haloes, and invalidated_haloes.
|
private |
Haloes that have an animation or expiration time need to be checked every frame and are stored in this set.
Definition at line 102 of file halo.cpp.
Referenced by add(), and unrender().
|
private |
Upon deleting, a halo isn't deleted but added to this set, upon unrendering the image is unrendered and deleted.
Definition at line 96 of file halo.cpp.
Referenced by remove(), and unrender().
|
private |
Definition at line 82 of file halo.cpp.
Referenced by add(), remove(), render(), set_location(), and unrender().
|
private |
Upon unrendering, an invalidation list is send.
All haloes in that area and the other invalidated haloes are stored in this set. Then there'll be tested which haloes overlap and they're also stored in this set.
Definition at line 90 of file halo.cpp.
Referenced by add(), render(), and unrender().