Public Member Functions | |
float | x () const final |
void | set_x (float x) final |
float | y () const final |
void | set_y (float y) final |
float | z () const final |
void | set_z (float z) |
float | angle () const final |
void | set_angle (float angle) final |
float | width () const final |
void | set_width (float width) |
float | height () const final |
void | set_height (float height) |
bool | spatial () const final |
void | set_spatial (bool spatial) |
std::shared_ptr< wze::texture > const & | texture () const final |
void | set_texture (std::shared_ptr< wze::texture > const &texture) final |
Sets the wze::texture of the object. | |
uint8_t | color_r () const final |
void | set_color_r (uint8_t color_r) |
uint8_t | color_g () const final |
void | set_color_g (uint8_t color_g) |
uint8_t | color_b () const final |
void | set_color_b (uint8_t color_b) |
uint8_t | color_a () const final |
void | set_color_a (uint8_t color_a) |
enum flip | flip () const final |
void | set_flip (enum flip flip) |
bool | visible () const final |
void | set_visible (bool visible) |
uint8_t | priority () const final |
void | set_priority (uint8_t priority) |
bool | animated () const final |
Gets whether the object should be animated. | |
void | set_animated (bool animated) |
float | x_offset () const final |
void | set_x_offset (float x_offset) |
float | y_offset () const final |
void | set_y_offset (float y_offset) |
float | angle_offset () const final |
void | set_angle_offset (float angle_offset) |
bool | attach_x () const final |
void | set_attach_x (bool attach_x) |
bool | attach_y () const final |
void | set_attach_y (bool attach_y) |
bool | attach_angle () const final |
void | set_attach_angle (bool attach_angle) |
bool | x_angle_lock () const final |
void | set_x_angle_lock (bool x_angle_lock) |
bool | y_angle_lock () const final |
void | set_y_angle_lock (bool y_angle_lock) |
sprite (float x=0, float y=0, float z=0, float angle=0, float width=0, float height=0, bool spatial=false, std::shared_ptr< wze::texture > const &texture={}, uint8_t color_r=std::numeric_limits< uint8_t >::max(), uint8_t color_g=std::numeric_limits< uint8_t >::max(), uint8_t color_b=std::numeric_limits< uint8_t >::max(), uint8_t color_a=std::numeric_limits< uint8_t >::max(), enum flip flip=FLIP_NONE, bool visible=true, uint8_t priority=std::numeric_limits< uint8_t >::max()/2, bool animated=true, float x_offset=0, float y_offset=0, float angle_offset=0, bool attach_x=true, bool attach_y=true, bool attach_angle=true, bool x_angle_lock=true, bool y_angle_lock=true) | |
![]() | |
SDL_FRect const & | screen_area () const |
float | screen_angle () const |
renderable (renderable const &other) | |
renderable & | operator= (renderable const &other) |
![]() | |
virtual | ~animatable ()=default |
Default virtual destructor. | |
![]() |
Definition at line 38 of file sprite.hpp.
|
explicit |
Definition at line 219 of file sprite.cpp.
|
nodiscardfinalvirtual |
|
finalvirtual |
|
nodiscardfinalvirtual |
|
finalvirtual |
|
nodiscardfinalvirtual |
void wze::sprite::set_z | ( | float | z | ) |
Definition at line 47 of file sprite.cpp.
|
nodiscardfinalvirtual |
|
finalvirtual |
|
nodiscardfinalvirtual |
void wze::sprite::set_width | ( | float | width | ) |
Definition at line 63 of file sprite.cpp.
|
nodiscardfinalvirtual |
void wze::sprite::set_height | ( | float | height | ) |
Definition at line 71 of file sprite.cpp.
|
nodiscardfinalvirtual |
void wze::sprite::set_spatial | ( | bool | spatial | ) |
Definition at line 79 of file sprite.cpp.
|
nodiscardfinalvirtual |
|
finalvirtual |
Sets the wze::texture of the object.
texture | wze::texture of the object. |
Implements wze::animatable.
Definition at line 87 of file sprite.cpp.
|
nodiscardfinalvirtual |
void wze::sprite::set_color_r | ( | uint8_t | color_r | ) |
Definition at line 95 of file sprite.cpp.
|
nodiscardfinalvirtual |
Implements wze::renderable.
Definition at line 99 of file sprite.cpp.
void wze::sprite::set_color_g | ( | uint8_t | color_g | ) |
Definition at line 103 of file sprite.cpp.
|
nodiscardfinalvirtual |
Implements wze::renderable.
Definition at line 107 of file sprite.cpp.
void wze::sprite::set_color_b | ( | uint8_t | color_b | ) |
Definition at line 111 of file sprite.cpp.
|
nodiscardfinalvirtual |
Implements wze::renderable.
Definition at line 115 of file sprite.cpp.
void wze::sprite::set_color_a | ( | uint8_t | color_a | ) |
Definition at line 119 of file sprite.cpp.
|
nodiscardfinalvirtual |
Definition at line 127 of file sprite.cpp.
|
nodiscardfinalvirtual |
Implements wze::renderable.
Definition at line 131 of file sprite.cpp.
void wze::sprite::set_visible | ( | bool | visible | ) |
Definition at line 135 of file sprite.cpp.
|
nodiscardfinalvirtual |
Implements wze::renderable.
Definition at line 139 of file sprite.cpp.
void wze::sprite::set_priority | ( | uint8_t | priority | ) |
Definition at line 143 of file sprite.cpp.
|
nodiscardfinalvirtual |
Gets whether the object should be animated.
Implements wze::animatable.
Definition at line 147 of file sprite.cpp.
void wze::sprite::set_animated | ( | bool | animated | ) |
Definition at line 151 of file sprite.cpp.
|
nodiscardfinalvirtual |
Implements wze::component.
Definition at line 155 of file sprite.cpp.
void wze::sprite::set_x_offset | ( | float | x_offset | ) |
Definition at line 159 of file sprite.cpp.
|
nodiscardfinalvirtual |
Implements wze::component.
Definition at line 163 of file sprite.cpp.
void wze::sprite::set_y_offset | ( | float | y_offset | ) |
Definition at line 167 of file sprite.cpp.
|
nodiscardfinalvirtual |
Implements wze::component.
Definition at line 171 of file sprite.cpp.
void wze::sprite::set_angle_offset | ( | float | angle_offset | ) |
Definition at line 175 of file sprite.cpp.
|
nodiscardfinalvirtual |
Implements wze::component.
Definition at line 179 of file sprite.cpp.
void wze::sprite::set_attach_x | ( | bool | attach_x | ) |
Definition at line 183 of file sprite.cpp.
|
nodiscardfinalvirtual |
Implements wze::component.
Definition at line 187 of file sprite.cpp.
void wze::sprite::set_attach_y | ( | bool | attach_y | ) |
Definition at line 191 of file sprite.cpp.
|
nodiscardfinalvirtual |
Implements wze::component.
Definition at line 195 of file sprite.cpp.
void wze::sprite::set_attach_angle | ( | bool | attach_angle | ) |
Definition at line 199 of file sprite.cpp.
|
nodiscardfinalvirtual |
Implements wze::component.
Definition at line 203 of file sprite.cpp.
void wze::sprite::set_x_angle_lock | ( | bool | x_angle_lock | ) |
Definition at line 207 of file sprite.cpp.
|
nodiscardfinalvirtual |
Implements wze::component.
Definition at line 211 of file sprite.cpp.
void wze::sprite::set_y_angle_lock | ( | bool | y_angle_lock | ) |
Definition at line 215 of file sprite.cpp.