Go Back  Xtreme Visual Basic Talk > Legacy Visual Basic (VB 4/5/6) > Game Programming > DirectX > Why isen't my second layer transprent?


Reply
 
Thread Tools Display Modes
  #1  
Old 03-12-2002, 02:48 PM
KiS
Guest
 
Posts: n/a
Default Why isen't my second layer transprent?


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?
Attached Files
File Type: zip bluealert.zip (28.3 KB, 9 views)
Reply With Quote
  #2  
Old 03-13-2002, 03:38 AM
AndreRyan AndreRyan is offline
Contributor
 
Join Date: Jan 2002
Posts: 489
Default

Can you be more specific about what is wrong?
Reply With Quote
  #3  
Old 03-13-2002, 07:44 AM
KiS
Guest
 
Posts: n/a
Default

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.
Reply With Quote
  #4  
Old 03-13-2002, 07:50 AM
Squirm's Avatar
Squirm Squirm is offline
Political Coder

Retired Moderator
* Guru *
 
Join Date: Mar 2001
Location: London, England
Posts: 8,037
Default

You need to use the DDBLTFAST_SRCCOLORKEY flag for the second layer:

Code:
msurfBack.BltFast intX, intY, msurfObjects, rectTile, DDBLTFAST_WAIT Or DDBLTFAST_SRCCOLORKEY
__________________
Search the forums | Use [vb][/vb] tags | Still IRCing
Reply With Quote
  #5  
Old 03-13-2002, 07:53 AM
KiS
Guest
 
Posts: n/a
Default

Or you can download the BETA version of the map editor for this game and see what I meen with the layers.
Attached Files
File Type: zip bluealertmapeditorbeta.zip (29.7 KB, 5 views)
Reply With Quote
  #6  
Old 03-13-2002, 07:55 AM
KiS
Guest
 
Posts: n/a
Default

Thanks Squirm! It worked like a dream.
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Forum Jump

Advertisement:





Free Publications
The ASP.NET 2.0 Anthology
101 Essential Tips, Tricks & Hacks - Free 156 Page Preview. Learn the most practical features and best approaches for ASP.NET.
subscribe
Programmers Heaven C# School Book -Free 338 Page eBook
The Programmers Heaven C# School book covers the .NET framework and the C# language.
subscribe
Build Your Own ASP.NET 3.5 Web Site Using C# & VB, 3rd Edition - Free 219 Page Preview!
This comprehensive step-by-step guide will help get your database-driven ASP.NET web site up and running in no time..
subscribe
 
 
-->