summaryrefslogtreecommitdiff
path: root/helpscreen.c
diff options
context:
space:
mode:
Diffstat (limited to 'helpscreen.c')
-rw-r--r--helpscreen.c17
1 files changed, 11 insertions, 6 deletions
diff --git a/helpscreen.c b/helpscreen.c
index dbbbce0..bebc936 100644
--- a/helpscreen.c
+++ b/helpscreen.c
@@ -1,12 +1,19 @@
-void help( SDL_Surface * surf_screen )
+void help(SDL_Renderer* renderer, SDL_Texture * surf_screen )
{
// 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_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_RenderPresent(renderer);
// now free the memory we used to draw this image
free( surf_help );
@@ -27,5 +34,3 @@ void help( SDL_Surface * surf_screen )
}
}
}
-
-