Why isen't my second layer transprent?

KiS
03-12-2002, 01:48 PM
HI!

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?

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

KiS
03-13-2002, 06: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.

Squirm
03-13-2002, 06: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

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

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

EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum