Why isen't my second layer transprent?

03-12-2002, 02:48 PM

I'm working on a game, and try to get my map thing to work.... I have 2 layers. 1 with map background and the second with all the objects. But the black stuff on layer 2 dosen't get transprent.... What have I done wrong?

03-13-2002, 03:38 AM
Can you be more specific about what is wrong?

03-13-2002, 07:44 AM
Download the file and run it and you will see that the screen is black. But see in the DrawTiles function you will see that I draw the screen twice and the second time just the objects and the black around the object are supposed to be transparent so you will be able to see what that is on the layer under. I need to know why the tiles is not tranparent.

03-13-2002, 07:50 AM
You need to use the DDBLTFAST_SRCCOLORKEY flag for the second layer:

msurfBack.BltFast intX, intY, msurfObjects, rectTile, DDBLTFAST_WAIT Or DDBLTFAST_SRCCOLORKEY

03-13-2002, 07:53 AM
Or you can download the BETA version of the map editor for this game and see what I meen with the layers.

03-13-2002, 07:55 AM
Thanks Squirm! It worked like a dream.

EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum