Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Ignore the vestigial parts. I'll deal with them later.
- #include <stdio.h>
- #include <SDL/SDL.h>
- #include <SDL/SDL_image.h>
- #include <string.h>
- int trial();
- SDL_Surface* screen = SDL_SetVideoMode(1100, 1100, 0, 0);
- main()
- {
- float version = 0.1;
- char command [10];
- char tagline [100];
- int quit = 0;
- int char_x = 1;
- int char_y = 1;
- int done = 0;
- int room [110] [110];
- printf("I'm Really Bad At Acronyms\nVersion: %f\n",version);
- printf("\nFor information on usage, check the README or type \"help\".\n");
- while(quit < 1)
- {
- gets(command);
- if(!strcmp(command, "help"))
- {
- printf("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"))
- {
- quit++;
- }
- if(!strcmp(command, "trial"))
- {
- SDL_Init(SDL_INIT_VIDEO);
- SDL_WM_SetCaption("IRBAA", "GPL v2");
- while(done == 0)
- {
- SDL_Surface* temp = IMG_Load("default.png");
- SDL_Surface* bg = SDL_DisplayFormat(temp);
- SDL_FreeSurface(temp);
- SDL_BlitSurface(bg, NULL, screen, NULL);
- SDL_UpdateRect(screen, 0, 0, 0, 0);
- if(trial == 1)
- {
- quit++;
- }
- SDL_FreeSurface(bg);
- SDL_Quit();
- }
- }
- }
- }
- trial()
- {
- SDL_Surface* temp = IMG_Load("block.png");
- SDL_Surface* fg = SDL_DisplayFormat(temp);
- SDL_FreeSurface(temp);
- SDL_BlitSurface(fg, NULL, screen, NULL);
- }
- 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