#include <dlist.h>
Public Member Functions | |
void | place_character (character *ch, uint16_t depth, const cxform &color_xform, const matrix &mat, float ratio, uint16_t clip_depth) |
Place a new character in this display list replacing any other char at the same depth. | |
void | replace_character (character *ch, uint16_t depth, bool use_cxform, const cxform &color_xform, bool use_matrix, const matrix &mat, float ratio, uint16_t clip_depth) |
Puts a new character at the specified depth, replacing any existing character. | |
void | swap_characters (character *ch, character *ch2) |
void | move_display_object (uint16_t depth, bool use_cxform, const cxform &color_xform, bool use_matrix, const matrix &mat, float ratio, uint16_t clip_depth) |
void | remove_display_object (uint16_t depth) |
Removes the object at the specified depth. | |
void | clear () |
Clear the display list, calling the UNLOAD event on each item still present. | |
void | clear_unaffected (std::vector< uint16 > &affected_depths) |
void | reset () |
Clear the display list, w/out calling the UNLOAD event on the items. | |
void | advance (float delta_time) |
advance referenced characters. | |
void | display () |
Display the referenced characters. Lower depths are obscured by higher depths. | |
character * | get_character_at_depth (int depth) |
May return NULL. | |
const character * | get_character_at_depth (int depth) const |
character * | get_character_by_name (const std::string &name) |
May return NULL. If there are multiples, returns the *first* match only! | |
const character * | get_character_by_name (const std::string &name) const |
character * | get_character_by_name_i (const std::string &name) |
May return NULL. If there are multiples, returns the *first* match only! | |
template<class V> | |
void | visitForward (V &visitor) |
Visit each character in the list in depth order (lower depth first). | |
template<class V> | |
void | visitBackward (V &visitor) |
Visit each character in the list in reverse depth order (higher depth first). | |
void | dump (std::ostream &os) const |
dump list to given output stream (debugging) | |
void | get_invalidated_bounds (rect *bounds, bool force) |
size_t | size () const |
Return number of elements in the list. | |
int | getNextHighestDepth () const |
Return the next highest available depth. |
Any sprite_instance has an associated DisplayList that may change from frame to frame due to control tags instructing when to add or remove characthers from the stage.
|
advance referenced characters.
|
|
Clear the display list, calling the UNLOAD event on each item still present.
|
|
|
|
Display the referenced characters. Lower depths are obscured by higher depths.
|
|
dump list to given output stream (debugging)
|
|
|
|
May return NULL.
|
|
|
|
May return NULL. If there are multiples, returns the *first* match only!
|
|
May return NULL. If there are multiples, returns the *first* match only!
|
|
Like character_instance::get_invalidated_bounds() this method calls the method with the same name of all childs. |
|
Return the next highest available depth. Placing an object at the depth returned by this function should result in a character that is displayd above all others |
|
Updates the transform properties of the object at the specified depth. |
|
Place a new character in this display list replacing any other char at the same depth. If applicable, the event_id::LOAD event associated with the given character is called as last step of addition.
|
|
Removes the object at the specified depth.
|
|
Puts a new character at the specified depth, replacing any existing character. If use_cxform or use_matrix are false, and a character is present at the given depth, then keep those respective properties from the existing character. TODO: use pointers for matrix and cxform, and use NULL instead of the two bool arguments |
|
Clear the display list, w/out calling the UNLOAD event on the items.
|
|
Return number of elements in the list.
|
|
|
|
Visit each character in the list in reverse depth order (higher depth first). The visitor functor will receive a character pointer; must return true if it wants next item or false to exit the loop. |
|
Visit each character in the list in depth order (lower depth first). The visitor functor will receive a character pointer; must return true if it wants next item or false to exit the loop. |