mirror of
https://github.com/TerryCavanagh/VVVVVV.git
synced 2026-01-29 17:38:16 +03:00
Change all surface-clearing FillRect()s to use ClearSurface()
ClearSurface() is less verbose than doing it the old way, and also conveys intent clearer. Plus, some of these FillRect()s had hardcoded width and height values, whereas ClearSurface() doesn't - meaning this change also has better future-proofing, in case the widths and heights of the surfaces involved change in the future.
This commit is contained in:
@@ -287,7 +287,7 @@ void Screen::UpdateScreen(SDL_Surface* buffer, SDL_Rect* rect )
|
||||
}
|
||||
|
||||
|
||||
FillRect(m_screen, 0x000);
|
||||
ClearSurface(m_screen);
|
||||
BlitSurfaceStandard(buffer,NULL,m_screen,rect);
|
||||
|
||||
if(badSignalEffect)
|
||||
@@ -318,7 +318,7 @@ void Screen::FlipScreen(void)
|
||||
);
|
||||
SDL_RenderPresent(m_renderer);
|
||||
SDL_RenderClear(m_renderer);
|
||||
SDL_FillRect(m_screen, NULL, 0x00000000);
|
||||
ClearSurface(m_screen);
|
||||
}
|
||||
|
||||
void Screen::toggleFullScreen(void)
|
||||
|
||||
Reference in New Issue
Block a user