Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #undef main
- #include <SDL/SDL.h>
- int main( int argc, char **argv[] )
- {
- bool done = false;
- SDL_Surface* hello = NULL;
- SDL_Surface* screen = NULL;
- SDL_Init( SDL_INIT_EVERYTHING );
- screen = SDL_SetVideoMode( 640, 480, 32, SDL_SWSURFACE );
- hello = SDL_LoadBMP( "hello.bmp" );
- SDL_Event event;
- while(!done)
- {
- SDL_BlitSurface( hello, NULL, screen, NULL );
- while(SDL_PollEvent(&event))
- {
- switch(event.type)
- {
- case SDL_QUIT:
- return 0;
- break;
- }
- }
- SDL_Flip( screen );
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment