Advertisement
Guest User

;sakdfjs;

a guest
Feb 26th, 2012
84
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.49 KB | None | 0 0
  1. Ignore the vestigial parts. I'll deal with them later.
  2.  
  3. #include <stdio.h>
  4. #include <SDL/SDL.h>
  5. #include <SDL/SDL_image.h>
  6. #include <string.h>
  7.  
  8. int trial();
  9. SDL_Surface* screen = SDL_SetVideoMode(1100, 1100, 0, 0);
  10.  
  11. main()
  12. {
  13. float version = 0.1;
  14. char command [10];
  15. char tagline [100];
  16. int quit = 0;
  17. int char_x = 1;
  18. int char_y = 1;
  19. int done = 0;
  20. int room [110] [110];
  21. printf("I'm Really Bad At Acronyms\nVersion: %f\n",version);
  22. printf("\nFor information on usage, check the README or type \"help\".\n");
  23. while(quit < 1)
  24. {
  25. gets(command);
  26. if(!strcmp(command, "help"))
  27. {
  28. printf("We haven\'t gotten around to printing help from the command line yet.\nHow about checking out the README instead?\n");
  29. }
  30. if(!strcmp(command, "quit"))
  31. {
  32. quit++;
  33. }
  34. if(!strcmp(command, "trial"))
  35. {
  36. SDL_Init(SDL_INIT_VIDEO);
  37. SDL_WM_SetCaption("IRBAA", "GPL v2");
  38. while(done == 0)
  39. {
  40. SDL_Surface* temp = IMG_Load("default.png");
  41. SDL_Surface* bg = SDL_DisplayFormat(temp);
  42. SDL_FreeSurface(temp);
  43. SDL_BlitSurface(bg, NULL, screen, NULL);
  44. SDL_UpdateRect(screen, 0, 0, 0, 0);
  45. if(trial == 1)
  46. {
  47. quit++;
  48. }
  49. SDL_FreeSurface(bg);
  50. SDL_Quit();
  51. }
  52. }
  53. }
  54. }
  55. trial()
  56. {
  57. SDL_Surface* temp = IMG_Load("block.png");
  58. SDL_Surface* fg = SDL_DisplayFormat(temp);
  59. SDL_FreeSurface(temp);
  60. SDL_BlitSurface(fg, NULL, screen, NULL);
  61. }
  62.  
  63. SDL_Surface* screen = SDL_SetVideoMode(1100, 1100, 0, 0); was in main, but I needed it in trial. So then I decided to try stupidity.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement