Jump to content
  • Advertisement


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


A problem with SDK DirectDraw exampel 4 - colorkey

This topic is 6697 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

When I opened the exampel for the DirectDraw tutorial 4 in the SDK it run good. But when I tried to copy all the source code to a new progect the colorkey doesn''t work. This is the code: ... ... ... DDSetColorKey(lpDDSOne, RGB(0,0,0)); ... ... ... ... ... ... ddrval = lpDDSBack->BltFast( xpos, ypos[i], lpDDSOne, &rcRect,DDBLTFAST_SRCCOLORKEY ); ... ... ... Do anyone know why? //Clontas

Share this post

Link to post
Share on other sites
instead of:
DDSetColorKey(lpDDSOne, RGB(0,0,0));
Try this:
lpDDSBack->DDSetColorKey(DDCKEY_SRCBLT, RGB(0,0,0));

Second arg. Determines which color key is requested. DDCKEY_SRCBLT if you want the blt to skip the color you specified.

And the "lpDDSback->" because you want the colorkey "on" (linked to or whatever) that specific surface.

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.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!