Guest User

Untitled

a guest
Jun 19th, 2018
69
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.58 KB | None | 0 0
  1. int main()
  2. {
  3.   quit = 0;
  4.   option = 0;
  5.  
  6.   init_Screen();
  7.  
  8.   SDL_Event event;
  9.   SDL_EnableKeyRepeat(0,0);
  10.  
  11.   struct S_SPRITESHEET *S_sprite;
  12.   init_Surface(&S_sprite);
  13.  
  14.   while(!quit && SDL_WaitEvent(&event)) {
  15.     process_Events(event);
  16.  
  17.     if(option == 0) {option = show_Menu(&screen,&S_sprite,event); }
  18.     if (option == 1 ) { start_GW(&screen,&S_sprite,event);  }
  19.     else if (option == 2) { start_Game(&screen,&S_sprite,event); }
  20.  
  21.     SDL_Flip(SDL_GetVideoSurface());
  22.    }
  23.  
  24.   free_Surface(&S_sprite);
  25.   // Close SDL process
  26.   SDL_Quit();
  27.  
  28.   return 0;
  29. }
Add Comment
Please, Sign In to add comment