|
CorsixTH engine (the C++ part)
Open source implementation of Theme Hospital
|
#include <th_gfx.h>
Public Member Functions | |
| drawable ()=default | |
| virtual void | draw_fn (render_target *canvas, const xy_pair &draw_pos)=0 |
| Draw the object at a specific point on a render target. | |
| virtual bool | hit_test_fn (const xy_pair &draw_pos, const xy_pair &obj_pos)=0 |
| Perform a hit test against the object. | |
| virtual bool | is_multiple_frame_animation_fn ()=0 |
| int | get_drawing_layer () |
| void | set_drawing_layer (int layer) |
Public Member Functions inherited from link_list | |
| link_list () | |
| virtual | ~link_list () |
| void | remove_from_list () |
Public Attributes | |
| uint32_t | flags {0} |
| Drawing flags (zero or more list flags from draw_flags). | |
Public Attributes inherited from link_list | |
| link_list * | prev {nullptr} |
| link_list * | next {nullptr} |
Base class for a linked list of drawable objects. Note that "object" is used as a generic term, not in specific reference to game objects (though they are the most common thing in drawing lists).
|
default |
|
pure virtual |
Draw the object at a specific point on a render target.
Can also "draw" the object to the speakers, i.e. play sounds.
Implemented in animation, and sprite_render_list.
|
inline |
|
pure virtual |
Perform a hit test against the object.
Should return true if when the object is drawn at draw_pos on a canvas, the point obj_pos is within / on the object.
Implemented in animation, and sprite_render_list.
Returns true if instance is a multiple frame animation. Should be overloaded in derived class.
Implemented in animation, and sprite_render_list.
| uint32_t drawable::flags {0} |
Drawing flags (zero or more list flags from draw_flags).