Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //============================================================================
- // Name : App1.cpp
- // Author :
- // Version :
- // Copyright : Your copyright notice
- //============================================================================
- #include<stdio.h>
- #include <SDL/SDL.h>
- int main(int argc, char **argv) {
- SDL_Init(SDL_INIT_EVERYTHING);
- SDL_Event event;
- SDL_bool EXIT_STATUS = SDL_FALSE;
- /* window 320X240, 32bits of color*/
- SDL_Surface *screen = SDL_SetVideoMode(320, 240, 32, 0);
- /*MainLoop*/
- while (!EXIT_STATUS) {
- /* Event loop*/
- while (SDL_PollEvent(&event)) {
- if (event.type == SDL_QUIT) {
- EXIT_STATUS = SDL_TRUE;
- }
- }
- /*update*/
- SDL_FillRect(screen,NULL,SDL_MapRGB(screen->format,200,100,0));
- /*Draw*/
- SDL_Flip(screen);
- SDL_Delay(10);
- }
- printf("Hola");
- SDL_Quit();
- return 0;
- }
Add Comment
Please, Sign In to add comment