• Advertisement

Archived

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

A problem with SDK DirectDraw exampel 4 - colorkey

This topic is 6453 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
Advertisement
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