Original Post
Using DX7 DirectDraw
I am trying to blit an image with transparency, and have read up on Colorkeys. I have created an image in photoshop, and my background colour (the one I wanna make transparent) is r126,g126,b126. So, I am using TOTWGPG and I have created my surface 800*600*16 and my image is 24bit bitmap.. I haven''t currently got any debugging features in my code, so I can''t find the pixel format right off.. but I have copied the function in the book to get the pixel format of my backbuffer and adapted to return the converted value.. I pass the function my three values in an RGB struct, and call use the appropriate macro.
Basically, what is my function going to find. I get the pixel format of my backbuffer, is this correct? Then I translate those values into a DWORD and assign them to the high and low value of my colorkey. Then SetColorKey(DDCKEY_SRC,&color_key) Now I call BltFast with DDBLTFAST_WAIT | DDBLTFAST_SRCCOLORKEY
That is correct isn''t it? I don''t know exactly what I am asking other than what am I doing wrong.. if I use the colorkey the program won''t display the image, if I don''t it will.. but obviously with my backdrop. Sorry if this seems like rambling, this is quite new to me.