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 > | new_haloes |
A newly added halo will be added to this list, these haloes don't need to be unrendered but do not to be rendered regardless which tiles are invalidated. 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... | |
|
inline |
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 315 of file halo.cpp.
References changing_haloes, disp, halo_id, haloes, mp_ui_alerts::items, itor, new_haloes, utils::split(), and utils::square_parenthetical_split().
Remove the halo with the given handle.
Definition at line 353 of file halo.cpp.
References deleted_haloes, haloes, and halo::NO_HALO.
void halo::halo_impl::render | ( | ) |
Definition at line 442 of file halo.cpp.
References haloes, invalidated_haloes, itor, new_haloes, and preferences::show_haloes().
Set the position of an existing haloing effect, according to its handle.
Definition at line 345 of file halo.cpp.
Referenced by halo::halo_impl::effect::render().
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 364 of file halo.cpp.
References changing_haloes, deleted_haloes, haloes, invalidated_haloes, itor, new_haloes, and preferences::show_haloes().
Referenced by halo::halo_impl::effect::set_location().
|
private |
Haloes that have an animation or expiration time need to be checked every frame and are stored in this set.
Definition at line 105 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 99 of file halo.cpp.
Referenced by remove(), and unrender().
|
private |
Definition at line 75 of file halo.cpp.
Referenced by add(), halo::halo_impl::effect::render(), halo::halo_impl::effect::set_location(), and halo::halo_impl::effect::unrender().
Definition at line 77 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 85 of file halo.cpp.
Referenced by render(), and unrender().
|
private |
A newly added halo will be added to this list, these haloes don't need to be unrendered but do not to be rendered regardless which tiles are invalidated.
These haloes will stay in this set until there're really rendered (rendering won't happen if for example the halo is offscreen).
Definition at line 93 of file halo.cpp.
Referenced by add(), render(), and unrender().