Jump to content
  • Advertisement

Archived

This topic is now archived and is closed to further replies.

Aram

DDSetColorKey

This topic is 6003 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Sorry to bother yuo all with this question but I have a small problem with DDSetColorKey. I have set the trasparent color to RGB(0,0,0) for an image but the black box around the image still shows up. Anyone know what the problem could be?

Share this post


Link to post
Share on other sites
Advertisement
Are you checking that your call to SetColorKey succeeds? That would be my first suggestion. If that works, then i would check that the "black" on your image is actually (0,0,0) and not, say, (10,10,10) or something else. There is a wide color range that will appear black on most monitors even when it''s not (0,0,0).

~don

"They that can give up essential liberty to obtain temporary safety deserve neither liberty nor safety."
- Benjamin Franklin

Share this post


Link to post
Share on other sites
Yeah I have checked them both and it still doesnt work... =(
I''m using 24-bits bmp file.
Do I then have to use something else than just RGB(0,0,0)?

Share this post


Link to post
Share on other sites
Have you set the colors to be transparent?


DDCOLORKEY key;

/**************\
key.dwColorSpaceLowValue = RGB(0,0,0);
key.dwColorSpaceHighValue = RGB(0,0,0);
/**************\

lpDDSbmp->SetColorKey(DDCKEY_SRCBLT, &key);
// lpDDSbmp is the surface that the sprite is on





Make games, it''s fun

Share this post


Link to post
Share on other sites
I tryed your code but it still seem''s not to work. =(
My other sprites works just fine but this..
I think I''ll try making a new image. That maybe will help, cause
you can never be to sure.

By the way thanks for the reply''s. =) My first post here...


Share this post


Link to post
Share on other sites

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!