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:
parent
994f47e7d8
commit
163b85d206
2 changed files with 7 additions and 0 deletions
|
@ -390,6 +390,11 @@ void FillRect( SDL_Surface* _surface, SDL_Rect rect, int rgba )
|
||||||
SDL_FillRect(_surface, &rect, 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 )
|
void ScrollSurface( SDL_Surface* _src, int _pX, int _pY )
|
||||||
{
|
{
|
||||||
SDL_Surface* part1 = NULL;
|
SDL_Surface* part1 = NULL;
|
||||||
|
|
|
@ -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 FillRect( SDL_Surface* surface, SDL_Rect rect, int rgba );
|
||||||
|
|
||||||
|
void ClearSurface(SDL_Surface* surface);
|
||||||
|
|
||||||
void ScrollSurface(SDL_Surface* _src, int pX, int py);
|
void ScrollSurface(SDL_Surface* _src, int pX, int py);
|
||||||
|
|
||||||
SDL_Surface * FlipSurfaceVerticle(SDL_Surface* _src);
|
SDL_Surface * FlipSurfaceVerticle(SDL_Surface* _src);
|
||||||
|
|
Loading…
Reference in a new issue