Jump to content
Sign in to follow this  
arno

Creating VTP Bridges

Recommended Posts

Hi all.In another thread, our good friend, Dr. Falko Dienstbach ( Falko ) shared some source code that will allow users of SCASM's new VTP code to create bridges.I had been puzzled, as I had earlier experimented with VTP bridges, and come up with artifacts ( oddly placed partial bridges ).The key to getting it to work, is that these VTP lines have no width!Here's some interesting code:include TDFMacros.incinclude TDFHeaders.incBGLHeader 43, 41, -87, -90, TerrainHeaderStart, VTPHeaderVTPHeader label word VTPFileHeader 256, VTPIndexStart, TextureStart, VTPEndVTPStart label word datamark_v0 label word VTPDataArea 1, 1, 0, 0 VTPLayer 32, 0 VTPNumTexturesInLayer 1, 0 VTPTextureId 0, 0 VTPPolyCount 1, 0 VTPPolyMethod2 2, 1, 0 VTPWidePoint 12182, 0, 10240, 0 VTPWidePoint 12334, 0, 10500, 0 datamark_v1 label word VTPDataArea 1, 1, 0, 0 VTPLayer 32, 0 VTPNumTexturesInLayer 1, 0 VTPTextureId 1, 0 VTPPolyCount 1, 0 VTPPolyMethod2 2, 1, 0 VTPWidePoint 4274, 0, 10337, 0 VTPWidePoint 4269, 0, 10331, 0 datamark_v2 label word;----------------------------------------------Cellv_194_134 EQU VTPCellID 0, 194, 134Cellv_195_134 EQU VTPCellID 0, 195, 134;---------------------------------------------- VTPIndexStart label word VTPIndexHeader 2, VTPIndexData, VTPStart VTPIndexData label word VTPIndexEntry Cellv_194_134, VTPStart, datamark_v0, datamark_v1 VTPIndexEntry Cellv_195_134, VTPStart, datamark_v1, datamark_v2;-----------------------------TextureStart label word VTPTextureListHeader 2, TextureIndexStart, TextureDataStart, TextureDataEndTextureIndexStart label word VTPTextureListEntry TextureDataStart, texturemark_0, texturemark_1 VTPTextureListEntry TextureDataStart, texturemark_1, texturemark_2TextureDataStart label word texturemark_0 label word VTPTextureName "1222" VTPTextureType 3, 0, 0, 4 texturemark_1 label word VTPTextureName "1243" VTPTextureType 3, 0, 0, 4 texturemark_2 label wordTextureDataEnd label word; ------------------------------VTPEnd label wordThe widepoints defining the bridges have no width, and certainly no repeating points, as some of our road code might have... just 2 points.Also note this: VTPPolyMethod2 2, 1, 0 VTPWidePoint 12182, 0, 10240, 0 VTPWidePoint 12334, 0, 10500, 0That number exceeds the 12240 cell boundry and spills into an adjacent cell. The SDK allows this as the true limits of a line are 0-16320... with the excess over 4080-12240 not displayed. But for bridges... they are displayed.Many thanks to you, Falko. :)http://forums.avsim.net/user_files/34338.jpgDick

Share this post


Link to post
Share on other sites

That's good to know. I have done some tests with bridges in Ground2k and I indeed also noticed the problems Dick mentioned sometimes.


Arno

If the world should blow itself up, the last audible voice would be that of an expert saying it can't be done.

FSDeveloper.com | Former Microsoft FS MVP | Blog

Share this post


Link to post
Share on other sites
Guest JR Morgan

At last, with much thanks to Falko, A glimmer of hope...'Soon as I saw his post about SCASM 2.89c, I raced over to .de land and downloaded the new version 2.90. Since then, with limited time, I've been looking at the help file regarding this. It's clear that I have no understanding of VTP lines progaramming, ie, how does one define a world location to start/end such a VTP line? --- and what's the process for compiling such a macro (typical SCASM DOS compile?).Thanks; J.R

Share this post


Link to post
Share on other sites

Compiling is just like any other SCASM file, so that should not be the problem.For defining the position I would advise you to look at the VTP SDK from MS. The principles are explained there.


Arno

If the world should blow itself up, the last audible voice would be that of an expert saying it can't be done.

FSDeveloper.com | Former Microsoft FS MVP | Blog

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

  • Tom Allensworth,
    Founder of AVSIM Online


  • Flight Simulation's Premier Resource!

    AVSIM is a free service to the flight simulation community. AVSIM is staffed completely by volunteers and all funds donated to AVSIM go directly back to supporting the community. Your donation here helps to pay our bandwidth costs, emergency funding, and other general costs that crop up from time to time. Thank you for your support!

    Click here for more information and to see all donations year to date.
×
×
  • Create New...