SDLPP: add option to get SRC rect of texture
This commit is contained in:
@@ -223,6 +223,9 @@ void RenderObject::setTextureSourceRect( const SDL_Rect &source_rect ) {
|
||||
void RenderObject::setTextureSourceRect( int x, int y, int w, int h ) {
|
||||
setTextureSourceRect( { x, y, w, h } );
|
||||
}
|
||||
SDL_Rect RenderObject::getTextureSourceRect() const {
|
||||
return src_rect;
|
||||
}
|
||||
void RenderObject::setAnimationFrames( const std::vector< SDL_Rect > &frames ) {
|
||||
animation = frames;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user