1
0
Fork 0
mirror of https://github.com/TerryCavanagh/VVVVVV.git synced 2024-12-23 01:59:43 +01:00

Add ClearSurface()

This is a function that does what it says - it clears the given surface.
This just means doing a FillRect(), but it's better to use this function
because it conveys intent better.
This commit is contained in:
Misa 2021-02-25 15:26:12 -08:00 committed by Ethan Lee
parent 994f47e7d8
commit 163b85d206
2 changed files with 7 additions and 0 deletions

View file

@ -390,6 +390,11 @@ void FillRect( SDL_Surface* _surface, SDL_Rect rect, int rgba )
SDL_FillRect(_surface, &rect, rgba);
}
void ClearSurface(SDL_Surface* surface)
{
SDL_FillRect(surface, NULL, 0x00000000);
}
void ScrollSurface( SDL_Surface* _src, int _pX, int _pY )
{
SDL_Surface* part1 = NULL;

View file

@ -35,6 +35,8 @@ void FillRect( SDL_Surface* surface, SDL_Rect& rect, const int r, int g, int b )
void FillRect( SDL_Surface* surface, SDL_Rect rect, int rgba );
void ClearSurface(SDL_Surface* surface);
void ScrollSurface(SDL_Surface* _src, int pX, int py);
SDL_Surface * FlipSurfaceVerticle(SDL_Surface* _src);