Title: Wheee! Author: Anonymous Pastebin link: http://pastebin.com/4H9YbCCj First Edit: Saturday 3rd of March 2012 12:50:21 PM CDT Last Edit: Saturday 3rd of March 2012 12:50:21 PM CDT #include #include #include #include #include #include   main() { int loop; char command[10]; puts("Welcome to IRBAA. See README for commands. The game currently requires a controller to play"); while(loop != 1) { gets(command); if(!strcmp(command, "help")) {         puts("We haven\'t gotten around to printing help from the command line yet.\nHow about checking out the README instead?\n"); } if(!strcmp(command, "quit")) {         loop = 1; } /*if(!strcmp(command, "test")) {         test(); } */ if(!strcmp(command, "start")) {         game(); } } } void game() {         SDL_Init(SDL_INIT_VIDEO);         const SDL_VideoInfo* screensize = SDL_GetVideoInfo();         TTF_Init();         SDL_InitSubSystem(SDL_INIT_JOYSTICK);         TTF_Font *Normal;         SDL_Surface *screen, *db, *bg, *fg;         int height, width;         height = screensize->current_h;         width = screensize->current_w;         screen = SDL_SetVideoMode(height, width, 0, 0);         SDL_UpdateRect(screen, 0, 0, 0, 0); } /* void test() {           SDL_Joystick *gamepad;         puts("Checking controller.");         SDL_InitSubSystem(SDL_INIT_JOYSTICK);         SDL_NumJoysticks();         if(SDL_NumJoysticks < 1)         {                 puts("No controller found. Please hook one up and try the test again.");                 return 0;         }         else         {                 SDL_Init(SDL_INIT_VIDEO);                 TTF_Init();                 TTF_Font *FreeMono;                 FreeMono = TTF_OpenFont("FreeMono.ttf", 18);                 SDL_Surface *field, *db, *character, *bg;                 SDL_Joystick *player1;                 SDL_Event event;                 SDL_Color text = { 0, 0, 0 };                 player1 = SDL_JoystickOpen(0);                 int redraw = 0;                 int running = 1;                 field = SDL_SetVideoMode(400, 300, 0, 0);                 SDL_WM_SetCaption("Test Screen", "A test screen");                 db = IMG_Load("field.png");                 bg = SDL_DisplayFormat(db);                 SDL_FreeSurface(db);                 SDL_BlitSurface(bg, NULL, field, NULL);                 /Ask to map start button/                 while(running = 1)                 {                 if(SDL_PollEvent(&event))                 {                         switch (event.type)                         {                         case SDL_JOYBUTTONDOWN:                                 / Toggles the pause screen /                                 if(redraw == 0)                                 {                                 redraw++;                                 }                                 if(redraw == 1)                                 {                                 redraw--;                                 }                                 break;                         case SDL_QUIT:                                 SDL_FreeSurface(field);                                 TTF_Quit();                                 SDL_Quit();                                 break;                         }                 }                 if(redraw = 1)                 {                         SDL_UpdateRect(field, 0, 0, 0, 0);                         if(SDL_PollEvent(&event))                         {                                 switch (event.type)                                 {                                 case SDL_HAT_UP:                                 }                         }                         redraw--;                 }                 }         } } */