SDLPP: add texture flipping/rotation
This commit is contained in:
@@ -57,9 +57,15 @@ void TextRenderer::render() {
|
||||
if ( !getHidden() ) {
|
||||
if ( polygon )
|
||||
polygon->render( *renderer );
|
||||
if ( texture != NULL )
|
||||
SDL_RenderCopy( renderer->getRendererPtr(),
|
||||
texture->getTexturePtr(), NULL, &dst_rect );
|
||||
if ( texture != NULL ) {
|
||||
SDL_Point *rotation_point = NULL;
|
||||
if ( rotation_center.getX() != -1 ) {
|
||||
rotation_point = &rotation_center_point;
|
||||
}
|
||||
SDL_RenderCopyEx( renderer->getRendererPtr(),
|
||||
texture->getTexturePtr(), NULL, &dst_rect,
|
||||
rotation_angle, rotation_point, flip );
|
||||
}
|
||||
}
|
||||
if ( hasCollisions() && renderer->getRenderColiders() && !getHidden() ) {
|
||||
for ( const auto &col : getCollisions() )
|
||||
|
||||
Reference in New Issue
Block a user