Skip to content
View in the app

A better way to browse. Learn more.

The AVSIM Community

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

SCASM source.

Featured Replies

If I am creating the source for an LWMDataAreaDrawPolygons and the LWMPoly3 would contain just the four corner points of the area, is there a another macro which is more efficient than LWMPoly3.In other words, how do I specify that the whole area is to contain water?George

>If I am creating the source for an LWMDataAreaDrawPolygons>and the LWMPoly3 would contain just the four corner points of>the area, is there a another macro which is more efficient>than LWMPoly3.>>In other words, how do I specify that the whole area is to>contain water?>>GeorgeHello George,I could not understand your exact problem. In any case I post here the SCASM macros that I use for AreaFill LWM masks.Regards, Luis; *************************************; 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 =2mif( [%1 == 2] ) LWMAreaDrawPoly( 1 2 %2 %3 )melse LWMAreaDrawPoly( 1 3 %2 %3 )mifendmif( [%1 == 1] ) LWMPoly( 4 1 %4 0 0 255 0 255 255 0 255 )melse LWMPoly( 4 0 %4 0 0 255 0 255 255 0 255 )mifend; *************************************; Area02X02Poly.scm macro; used instead of AreaFill 2X2 to avoid crashes (?); %1 = type 0=water 1=land 2=flatten 3=transparent; %2 = column 0 ... 15; %3 = row 0 ... 15; %4 = height if type=0 or =2UVar( $C0 [2 * %2] )UVar( $C1 [2 * %2 + 1] )UVar( $R0 [2 * %3 ] )UVar( $R1 [2 * %3 + 1] )macro( Area01X01Poly.scm %1 [$C0] [$R0] %4 )macro( Area01X01Poly.scm %1 [$C1] [$R0] %4 )macro( Area01X01Poly.scm %1 [$C0] [$R1] %4 )macro( Area01X01Poly.scm %1 [$C1] [$R1] %4 ); *************************************; Area04X04Poly.scm macro; used instead of AreaFill 4X4 to avoid crashes (?); %1 = type 0=water 1=land 2=flatten 3=transparent; %2 = column 0 ... 7; %3 = row 0 ... 7; %4 = height if type=0 or =2UVar( $C00 [2 * %2] )UVar( $C11 [2 * %2 + 1] )UVar( $R00 [2 * %3 ] )UVar( $R11 [2 * %3 + 1] )macro( Area02X02Poly.scm %1 [$C00] [$R00] %4 )macro( Area02X02Poly.scm %1 [$C11] [$R00] %4 )macro( Area02X02Poly.scm %1 [$C00] [$R11] %4 )macro( Area02X02Poly.scm %1 [$C11] [$R11] %4 ); the next ones follow the same rules; *************************************; Area08X08Poly.scm macro; *************************************; Area16X16Poly.scm macro; *************************************; Area32X32Poly.scm macro; finally here is a SCASM source file with one of these macros:Header( 1 -89 90 -179 180 )LWMFileHeader:cell00macro( Area01X01Poly.scm 0 18 7 0 )LWMIndexList( 1 362 142 3 0 0 )LWMEnd

  • Author

Hello Luis,What I would output for a full LOD13 area would be: LWMDataAreaDrawPolygons 1,_Transparent_,1,28,6 LWMPoly3 4, 0, _Water_, 122, 27, 122, 27 LWMPoint3 0, 0, 0 LWMPoint3 255, 0, 0 LWMPoint3 255, 255, 0 LWMPoint3 0, 255, 0I just wondered if there was a more elegant solution.Regards,George

Hi George.You could make an areafill:LWMDataAreaFill1x1 0, _Water_, 1, 28, 6LWMDataAreaHeight 122, 27If I remember correctly, we have a problem with the Map view or GPS, and the areafills. You might need to check that out before using them.Dick

  • Author

Thanks Dick,That is what I was looking for, however, if there might be a problem, perhaps I should stick to using LWMPoly3's.What I have done is written a program to convert the output of Steve Greenwood's FSTFlatten program to LWM format using your kindly supplied code for lat/long conversion and Jim Kier's graphics code and during this realised that there might be some areas which are completely filled, see the rectangular area in the test output below.Georgehttp://www.geo-davison.demon.co.uk/Flatten2LWM.jpg

Hi George.I'm not certain there is a problem, but you might need to do a search of the forum for "LWMDataAreaFill", and see what comes up.I'll look this weekend, as well, and see if I can recreate any problem to verify.Dick

  • Author

Hi Dick,I did the search, but most of the topics were from about two years ago and applied to FS8 and CFS2.As I am about to implement the output code, I think I will carry on using polys.George

  • Author

>Hi George.>>Here's a good thread:>>http://forums.avsim.net/dcboard.php?az=sho...13776&mode=full>>The summary is:>>Don't use LWM areafills...make the polys instead. The crashes>are from the map or GPS gauge use. I remember the problem now.> :(>>DickThanks again Dick. This is very relevant to some other work I'm collaborating on.George

Create an account or sign in to comment

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.