Height of AreaFills when exported as polygons

General discussion about Scenery Design. Questions about SBuilder for Flight Simulator FS2004.
Post Reply
bpahe
Posts: 50
Joined: Fri May 14, 2004 3:55 am
Location: Sweden
Contact:

Height of AreaFills when exported as polygons

Post by bpahe » Wed Dec 08, 2004 4:19 pm

Hi!

To avoid having FS crash when I open the GPS, I have exported my AreaFills as polygons. It works ok, but instead the created polygon has the height 0, instead of -9999. Since all the fills are Landfills, I cannot define a height. Is there a way of doing this in SBuilder, or in the produced SCASM-code, for manual compilation?

/hans

User avatar
Luis Sa
Posts: 1736
Joined: Sun May 18, 2003 11:17 am
Location: Portugal
Contact:

Post by Luis Sa » Thu Dec 09, 2004 2:13 am

Hi Hans,

The answer is in the SCASM macro Area01x01.scm that you find in the Tools folder. Here it is:

; Area01X01Poly.scm macro

; used instead of AreaFill 1X1 to avoid crashes (?)

; %1 = type 0=water 1=land 2=flatten 3=transparent
; %2 = column 0 ... 31
; %3 = row 0 ... 31
; %4 = height if type=0 or =2

mif( [%1 == 2] )
LWMAreaDrawPoly( 1 2 %2 %3 )
melse
LWMAreaDrawPoly( 1 3 %2 %3 )
mifend

mif( [%1 == 1] )
LWMPoly( 4 1 %4 1 1 255 1 255 255 1 255 )
melse
LWMPoly( 4 0 %4 1 1 255 1 255 255 1 255 )
mifend

Just change %4 to -9999 in the 2 LWMPoly lines and then compile again. The first LWMPoly it will look like:

LWMPoly( 4 1 -9999 1 1 255 1 255 255 1 255 )

Attention: do not forget to replace the file when you are ready with this patch.

Regards, Luis,

PS: can you confirm the crashes? Please tell me if you got crashes! I am to release scenery and would like to be sure!

bpahe
Posts: 50
Joined: Fri May 14, 2004 3:55 am
Location: Sweden
Contact:

Post by bpahe » Thu Dec 09, 2004 4:56 am

<blockquote id="quote"><font size="1" face="Verdana, Arial, Helvetica" id="quote">quote:<hr height="1" noshade id="quote"><i>Originally posted by Luis Sá</i>
PS: can you confirm the crashes? Please tell me if you got crashes! I am to release scenery and would like to be sure!
<hr height="1" noshade id="quote"></blockquote id="quote"></font id="quote">

Luis, I´m so grateful! Now the landscape is nice & flat again, but also works in the GPS!

As far as confirming, yes, I had crashes all related to opening the GPS. This have been discussed also at Avsim, as you know. As soon as I changed the setting to "LWM AreaFill as polygon", the problem disappeared. This was also confirmed by a member of FISD.

I will send you my project, so that you can try the different settings for yourself.

Again, thanks!

/hans

Post Reply