SDLPP: add function to change texture while keeping SRC rect

This commit is contained in:
2021-07-23 00:05:40 +02:00
parent 0e71dfa7d5
commit 79d9f266b4
2 changed files with 4 additions and 0 deletions
+3
View File
@@ -78,6 +78,9 @@ void RenderObject::setTexture( const std::shared_ptr< Texture > &t,
texture = t;
src_rect = source_rect;
}
void RenderObject::setTextureKeepSRC( const std::shared_ptr< Texture > &t ) {
setTexture(t, src_rect);
}
void RenderObject::setTexture( const std::shared_ptr< Texture > &t,
int source_x, int source_y, int source_width,
int source_height ) {