summaryrefslogtreecommitdiff
path: root/screen.c
diff options
context:
space:
mode:
authorJacob McDonnell <jacob@jacobmcdonnell.com>2024-02-19 20:43:39 -0500
committerJacob McDonnell <jacob@jacobmcdonnell.com>2024-02-19 20:43:39 -0500
commit563d44c4a3cabeddc442bfe8377bc2cdfde4a6dd (patch)
tree484a7c958dfe782ec7800fa2a3b0b828af46bae2 /screen.c
parent9d4fbd735e60c8bfd8360a9cdcfc1c757a6cced1 (diff)
Fixed screen flicker and added ball speedup
Diffstat (limited to 'screen.c')
-rw-r--r--screen.c7
1 files changed, 1 insertions, 6 deletions
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 );
-}