Haven't used SDL in a long while, but where are you blitting the image onto the surface? Is that apply_surface your own function?
yeah its in applyimage, its identical to lazy foos, thats where its blitting
Last edited on
Post the code for apply_surface()
You are calling load_image before you have initialized SDL.
ooh yeah again dumb thank you peter, but it still dont work here.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33
|
bool init()
{
if( SDL_Init( SDL_INIT_EVERYTHING ) == -1 )
{
return false;
}
screen = SDL_SetVideoMode( SCREEN_WIDTH, SCREEN_HEIGHT, SCREEN_BPP, SDL_SWSURFACE );
if( screen == NULL )
{
return false;
}
SDL_WM_SetCaption( "Animation Test", NULL );
return true;
}
int main ( int argc, char** argv )
{
init();
SDL_Surface *leftclips = load_image("daegclipleft.png");
SDL_Surface *rightclips = load_image("daegclipsright.png");
apply_surface(SCREEN_WIDTH,SCREEN_HEIGHT,leftclips,screen);
SDL_Flip(screen);
SDL_Delay (3000);
apply_surface(SCREEN_WIDTH,SCREEN_HEIGHT,rightclips,screen);
SDL_Flip (screen);
SDL_Delay (3000);
return 0;
}
|
i should have a hotkey that just sends you sdl problems, you solve em all.
Last edited on
You are drawing the images outside the screen.