Foro de elhacker.net

Programación => Programación C/C++ => Mensaje iniciado por: anonimo12121 en 3 Abril 2011, 20:02 pm



Título: Problema con SDL_image[SOLUCIONADO]
Publicado por: anonimo12121 en 3 Abril 2011, 20:02 pm
Hola. tengo un problema con sdl_image me da un error grave...

(http://img839.imageshack.us/img839/4599/capturalou.jpg) (http://img839.imageshack.us/i/capturalou.jpg/)

El código es muy simple. y el fallo cae en IMG_Load...
Código
  1. #include <SDL/SDL.h>
  2. #include <SDL/SDL_image.h>
  3. int main(int argc,char *argv[]) {
  4.    //Variables
  5.    SDL_Surface *screen,*imagen;
  6.    imagen=IMG_Load("smb-04.bmp");
  7.    SDL_Event evento;//Estructura evento
  8.    int start;
  9.    SDL_Init(SDL_INIT_VIDEO);
  10.    screen=SDL_SetVideoMode(640,480,32,SDL_SWSURFACE);
  11.    while(1){
  12.        start=SDL_GetTicks();
  13.        if(start%25==0){
  14.            SDL_PollEvent(&evento);//devuelve 0 si no hay eventos
  15.            if(evento.key.state==SDL_PRESSED){
  16.                    if(evento.key.keysym.sym == SDLK_ESCAPE)return 0;
  17.            }
  18.            SDL_BlitSurface(imagen,0,screen,0);
  19.            SDL_Flip(screen);
  20.        }
  21.    }
  22.    return 0;
  23. }




EDITO: Posiblemente era una DLL antigua.