A problem with SDK DirectDraw exampel 4 - colorkey

Started by
0 comments, last by Clontas 23 years, 10 months ago
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, lpDDSOne, &rcRect,DDBLTFAST_SRCCOLORKEY ); … … … Do anyone know why? </i> //Clontas
//Clontas
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.

This topic is closed to new replies.

Advertisement