summaryrefslogtreecommitdiff
path: root/helpscreen.c
diff options
context:
space:
mode:
Diffstat (limited to 'helpscreen.c')
-rw-r--r--helpscreen.c14
1 files changed, 4 insertions, 10 deletions
diff --git a/helpscreen.c b/helpscreen.c
index bebc936..bb298bf 100644
--- a/helpscreen.c
+++ b/helpscreen.c
@@ -1,22 +1,16 @@
-void help(SDL_Renderer* renderer, SDL_Texture * surf_screen )
+void help(SDL_Renderer* renderer)
{
// Load help image
- SDL_Surface* surf_help = IMG_Load( "helpscreen.png" );
+ SDL_Surface* surf_help = IMG_Load("helpscreen.png");
SDL_Texture* surf_help_tex = SDL_CreateTextureFromSurface(renderer, surf_help);
- // Draw this image onto screen
- //SDL_BlitSurface( surf_help, NULL, surf_screen, NULL);
- //SDL_Flip( surf_screen );
-
- SDL_UpdateTexture(surf_screen, NULL, surf_help_tex, 640 * sizeof (Uint32));
-
SDL_RenderClear(renderer);
- SDL_RenderCopy(renderer, surf_screen, NULL, NULL);
+ SDL_RenderCopy(renderer, surf_help_tex, NULL, NULL);
SDL_RenderPresent(renderer);
// now free the memory we used to draw this image
- free( surf_help );
+ SDL_FreeSurface(surf_help);
// Now wait until the user presses a key
SDL_Event event;