diff options
Diffstat (limited to 'helpscreen.c')
-rw-r--r-- | helpscreen.c | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/helpscreen.c b/helpscreen.c new file mode 100644 index 0000000..dbbbce0 --- /dev/null +++ b/helpscreen.c @@ -0,0 +1,31 @@ +
+void help( SDL_Surface * surf_screen )
+{
+ // Load help image
+ SDL_Surface *surf_help = IMG_Load( "helpscreen.png" );
+
+ // Draw this image onto screen
+ SDL_BlitSurface( surf_help, NULL, surf_screen, NULL);
+ SDL_Flip( surf_screen );
+
+ // now free the memory we used to draw this image
+ free( surf_help );
+
+ // Now wait until the user presses a key
+ SDL_Event event;
+ int waiting_for_user = 1;
+
+ while ( waiting_for_user )
+ {
+ while ( SDL_PollEvent( &event ) )
+ {
+ if ( event.type == SDL_KEYDOWN )
+ {
+ waiting_for_user = 0;
+ break;
+ }
+ }
+ }
+}
+
+
|