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 authored and Ethan Lee committed 2021-02-25 19:38:25 -05:00
1 parent 994f47e7d8
commit 163b85d206
2 files changed
+7

No files matched your search

+5
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;