------------------
Visit the homepage of my (soon to be 'net multiplayer) Tank Game at http://members.home.net/chris-man
🎉 Celebrating 25 Years of GameDev.net! 🎉
Not many can claim 25 years on the Internet! Join us in celebrating this milestone. Learn more about our history, and thank you for being a part of our community!
DirectDraw Transparencies
Did you make sure to use SetColorKey() on the source surface?
Yes, here is the complete blt code snippet
ClearBuffer(destination);
ddck.dwColorSpaceLowValue = 0;
ddck.dwColorSpaceHighValue = 0;
hres = destination->SetColorKey(DDCKEY_SRCBLT,&ddck);
if(hres != DD_OK)
//error setting colorkey for surface
hres = destination->Blt(NULL,source, NULL, DDBLT_KEYSRC | DDBLT_WAIT, NULL);
if(hres != DD_OK)
hres = destination->BltFast(0,0,source,NULL, DDBLTFAST_SRCCOLORKEY | DDBLTFAST_WAIT );
if(hres != DD_OK)
//error
Does anyone know what would cause the blt and bltfast functions to return a DDERR_INVALIDPARAMS while trying to use DDBLT_KEYSRC or DDBLTFAST_SRCCOLORKEY. I've looked at some older programs, and other samples and they have the same code. Here's the line:
lpddsback->blt(NULL,source,NULL, DDBLT_KEYSRC | DDBLT_WAIT, NULL);
Thanks in advance,
Doug
ah ok. I think everything is working now. I misread the entry. I was setting the Colorkey on the wrong surface. Thank you so very much
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement