I'm using a 32x32 bmp of a little ship with a the background color 255, 0 ,255 or thats atleast what the graphics program says
#include "SDL.h"
int main(int argc, char *argv[])
{
SDL_Surface *screen , *ship;
SDL_Rect shipRect;
shipRect.x = 0 ;
shipRect.y = 0 ;
atexit(SDL_Quit);
if( SDL_Init(SDL_INIT_VIDEO) < 0 ) exit(1);
SDL_WM_SetCaption("Fryday", NULL);
screen = SDL_SetVideoMode( 256 , 224 , 32 , SDL_DOUBLEBUF|SDL_HWSURFACE|SDL_ANYFORMAT);
SDL_FillRect(screen , NULL , 0x221122);
ship = SDL_LoadBMP("./ship.bmp");
SDL_BlitSurface( ship , NULL , screen , &shipRect );
SDL_SetColorKey( ship, SDL_SRCCOLORKEY, SDL_MapRGB(ship->format, 255, 0, 255) );
SDL_Flip(screen);
SDL_Delay( 8000 );
return 0;
}







