Adding flip support.
This commit is contained in:
parent
cb419be11e
commit
c1a3dea560
|
|
@ -215,7 +215,13 @@ texture_t *asset_manager_get_texture(asset_manager_t *asset_manager, const char
|
|||
return asset->data.texture;
|
||||
}
|
||||
|
||||
void asset_manager_draw_texture(texture_t *texture, rect_t *src_rect, rect_t *dst_rect, bool flip __attribute__((unused)))
|
||||
void asset_manager_draw_texture(texture_t *texture, rect_t *src_rect, rect_t *dst_rect, bool flip)
|
||||
{
|
||||
if(flip)
|
||||
{
|
||||
dst_rect->x = dst_rect->x + dst_rect->w;
|
||||
dst_rect->w = -dst_rect->w;
|
||||
}
|
||||
|
||||
SDL_RenderCopy(renderer, texture, src_rect, dst_rect);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue