Original Post
I dos'nt show any of the pics
#ifdef WIN32
#pragma comment(lib, "SDL.lib")
#pragma comment(lib, "SDLmain.lib")
#endif
#include "SDL.h"
int main( int argc, char* argv[] )
{
SDL_Init( SDL_INIT_VIDEO );
atexit( SDL_Quit );
SDL_Surface * screen = SDL_SetVideoMode( 800,600, 24, SDL_ANYFORMAT|SDL_DOUBLEBUF );
SDL_Surface * tdisplay = SDL_SetVideoMode( 800,600, 24, SDL_ANYFORMAT|SDL_DOUBLEBUF );
SDL_Surface * img = SDL_LoadBMP( "filename.bmp" );
SDL_Rect dest;
dest.x = 200;
dest.y = 300;
SDL_Event event;
SDL_Event a;
SDL_Event b;
SDL_Event Event
;SDL_Rect coord;
coord.x = 100;
coord.y = 100;
SDL_Surface * tdisplay;
while(true);
{
SDL_BlitSurface(img,NULL,screen, &dest);
SDL_Flip( screen );// wait for user exit
}
while( !( SDL_PollEvent(&event) && event.type == SDL_QUIT ) ) {}
SDL_PollEvent(&Event);
if(Event.type == SDL_MOUSEBUTTONDOWN)
{
if(Event.button.button == SDL_BUTTON_LEFT)
{
SDL_Surface *imi =SDL_LoadBMP("ad.bmp")
SDL_Flip(tdisplay);
;while(true);
{
SDL_BlitSurface(imi,NULL,tdisplay,&coord)
;SDL_Flip(screen);
}
}
}
return 0;
}
CODE UPDATE
CODE UPDATE2
[edited by - MPG on April 17, 2004 11:31:19 AM]
[edited by - MPG on April 17, 2004 11:15:39 PM]