Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //http://www.youtube.com/user/thecplusplusguy
- //Thanks for the typed in code to Tapit85
- #include <SDL/SDL.h>
- int main(int argc, char** argv)
- {
- SDL_Init(SDL_INIT_EVERYTHING);
- SDL_Surface *screen;
- screen = SDL_SetVideoMode(640, 480, 32, SDL_SWSURFACE);
- // screen = SDL_SetVideoMode(640, 480, 32, SDL_SWSURFACE|SDL_FULLSCREEN);
- bool running = true;
- while(running) {
- SDL_Event event;
- while(SDL_PollEvent(&event)) {
- switch(event.type) {
- case SDL_QUIT:
- running = false;
- break;
- }
- }
- //logic && render
- SDL_Flip(screen);
- }
- SDL_Quit();
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement