
- Código: Seleccionar todo
- #include <stdio.h>
 #include <stdlib.h>
 #include <conio.h>
 #include "SDL.h"
 #include "SDL_image.h"
 int main(int argc, char *argv[])
 {
 SDL_Surface *screen = SDL_SetVideoMode(640, 480, 16, SDL_HWSURFACE);
 SDL_Surface *img = ("rojo1.jpg");
 if(img == NULL)
 {
 printf("que pasa aqui: %s", SDL_GetError()); ///---------------->rojo.jpg couldnt open
 getch();
 }
 SDL_Rect cuadrado;
 cuadrado.x = 10;
 cuadrado.y = 10;
 SDL_BlitSurface(img, 0, screen, &cuadrado);
 SDL_Flip(screen);
 SDL_Delay(5000);
 return 0;
 }




