color keys in DX7

Started by
0 comments, last by amish1234 22 years, 10 months ago
I am trying to use color keys for off-screen surfaces in DX7. Could someone give me help on how to use the IDIRECTDRAWSURFACE7::SetColorKey function, or how to set the high and low colorspace values in the DDSURFACEDESC before creating the surface? If you''ve made a game that does this and I can download the source code that would help also. -Amish
___________________________________________________________Where to find the intensity (Updated Dec 28, 2004)Member of UBAAG (Unban aftermath Association of Gamedev)
Advertisement
int Set_ColorKey(LPDIRECTDRAWSURFACE7 surface, COLORREF color){    DDCOLORKEY              DDCK;    DDCK.dwColorSpaceLowValue = color;    DDCK.dwColorSpaceHighValue = DDCK.dwColorSpaceLowValue;    surface->SetColorKey(DDCKEY_SRCBLT, &DDCK);    return 1;} 


use the RGB macro to make a COLORREF like this: RGB(24, 255, 65);
You must include windows.h (but of course you should already have that included since your using DirectX).

This topic is closed to new replies.

Advertisement