Values for color in SDL_MapRGB()

Hey,

I’m trying to set the transparent color for use in my RPG, but I wasn’t sure what the values for RGB were in the SDL_MapRGB().
Right now, my code looks like this:

TransparentColor = SDL_MapRGB( guy->format, 255, 0, 255 );
SDL_SetColorKey( guy, SDL_SRCCOLORKEY, TransparentColor );

This isn’t appearing to work (nothings transparent), so I was wondering if someone could tell me where I’m going wrong (I’m
assuming that it’s with the RGB values?

thanks,
Cameron matheson

Wow, I’m a little slow. I forgot to call the function that I had this code in. stupid me.

Sorry,
Cam Matheson----- Original Message -----
From: Cameron Matheson
To: sdl at lokigames.com
Sent: Sunday, December 31, 2000 7:29 PM
Subject: [SDL] Values for color in SDL_MapRGB()

Hey,

I’m trying to set the transparent color for use in my RPG, but I wasn’t sure what the values for RGB were in the SDL_MapRGB().
Right now, my code looks like this:

TransparentColor = SDL_MapRGB( guy->format, 255, 0, 255 );
SDL_SetColorKey( guy, SDL_SRCCOLORKEY, TransparentColor );

This isn’t appearing to work (nothings transparent), so I was wondering if someone could tell me where I’m going wrong (I’m
assuming that it’s with the RGB values?

thanks,
Cameron matheson