From 563d44c4a3cabeddc442bfe8377bc2cdfde4a6dd Mon Sep 17 00:00:00 2001 From: Jacob McDonnell Date: Mon, 19 Feb 2024 20:43:39 -0500 Subject: Fixed screen flicker and added ball speedup --- screen.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) (limited to 'screen.c') diff --git a/screen.c b/screen.c index 7f8e767..b00c97e 100644 --- a/screen.c +++ b/screen.c @@ -35,7 +35,7 @@ bool InitScreen ( void ) { } gScreenSurface = SDL_GetWindowSurface( gWindow ); - ClearScreen(); + SDL_FillRect( gScreenSurface, NULL, SDL_MapRGB( gScreenSurface->format, 0x00, 0x00, 0x00 ) ); ballSurface = LoadSurface( "ball.bmp" ); leftPaddleSurface = LoadSurface( "paddle.bmp" ); @@ -65,8 +65,3 @@ void Draw ( const struct moveable_t m, SDL_Surface * const surface ) { printf( "Error with draw! SDL Error: %s\n", SDL_GetError() ); } } - -void ClearScreen( void ) { - SDL_FillRect( gScreenSurface, NULL, SDL_MapRGB( gScreenSurface->format, 0x00, 0x00, 0x00 ) ); - SDL_UpdateWindowSurface( gWindow ); -} -- cgit v1.2.3