Command Reference for SCASM.EXE vers. 1.45
------------------------------------------

Introduction:
-------------
SCASM is a simple programm for generating FS5 BGL-files. I call it an
assembler because it generates one data record for each command. It has still
some limitations. One of this limitations is that it can handle only one
Latitude_range_record and this record is the same for NAVaids and visual
scenery (section 9).
To solve this problem I created SCLINK, an BGL file linker.

Sorry, there is no tutorial available now. Please study the example files to
get a feeling for the useage of the instructions.

Every scenery you are creating with this programm has to start with the
Header command followed by the LatRange command. Now you can enter any
command in any sequence with one exception. Visual scenery commands have
to appear only within area blocks, and in area blocks no other commands are
allowed.

Credits:
--------
	see ScReadMe.TXT

Start the scenery assembler with:
---------------------------------
	scasm <input_file> <output_file>

	In case of error the return code is 1 otherwise 0 (for batch files).
	For the input file any extension is accepted, but it must be a pure
	ASCII file. You must also enter the .BGL extension for the output
	file.


example:
--------
	scasm example.txt example.bgl


Installing your scenery:
------------------------
	See the file SC_HINTS.TXT


Conventions:
------------
Lat     Geographic Latitude. Positive values are North, negative values
	are South.
Lon     Longitude. Positive values are east, negative values are west.
	The values of Lat/Lon are assumed to be
	degrees(0..180) : minutes(0..60) : seconds(0..60) . decimal_seconds
	Letters N/S, E/W, +/- are accepted.
	not used positions can be omitted.

	Example:        53:30:30.0
		       N53:30.5
		       +53.50833        are the same and OK.


x       distance in east - west direction (integer)
y       distance in north - south direction (integer)
z       altitude, elevation (integer)

:Label  Name for a jump destination (up to 15 chars.). You cannot exit a
	block with any jump, so :Labels are only valid in a block. You
	must enter the ':' character but the name can be omitted. In this
	case the jump is directed to the end of the block (->EndA).
	A :Label as a definition of a jump destination should be entered
	in a single line and should start in the first column.
	Label names are case sensitive.
	The number of Labels per block is limited to 100. Also the number
	of label references is limited to 100.

vx      X component of an vector.
vy      Y component of an vector.
vz      Z component of an vector.
	A vector consists of these 3 components. The geometrical (3D) sum
	of these three components is normalized to 32767 (highest positive
	integer value). Vectors are used to define a direction in the 3D
	world i.e. to indicate from which side a surface of an object can
	be seen.

len	This is a length or distance in RefPoint units. If the scale factor of
	the reference point is one, RefPoint units are given in meters.
	When used with vectors this factor can be seen as the vector length.
	You can handle 'len' as a floating point value.

vattr   Vector Attributes for automatic vector calculation.
	In FS5 vectors are used to indicate a direction in the 3D world.
	In many cases it is possible for the programm to calculate these
	vectors. The 'vattr' parameter is used to control these
	calculation.
	It is asumed that the RefPoint is in the middle of the object you
	want to construct, so the programm can get an idea of the vector
	direction. If you want to design a house and the RefPoint is outside
	or at one corner you cannot use any automatic calculation. 
	m       manual, you have to calculate the vector components by
		yourself (default).
	a       automatic. All components ( vx, vz, vy and len, if needed )
		are calculated by the programm.
	z       vector has only a z component. (points straight up in the air)
		No vector calculation is done but len is calculated.
	xy      only the x-y component is calculated. z is always 0.
	xz      only x-z component
	yz      only y-z component
		These 3 vattr are usefull for VectorPoints() in regular shaped
		(round) objects in conjunction with ShadedPoly().
	au      automatic, but the vector is always pointing up. That means
		if the z-component is negative, the vector is reversed.
	ad      automatic, but the vector is always pointing down. If the
		z-component is positive, the vector is reversed.
	ai      usefull for drawing the inner walls of houses and hangars.
		The vector will always be reversed.
	p       using polar coordinates for the following vector.
		(angle of elevation, heading, [length]). The programm
		converts this into BGL vector format.

( )     If a command requires parameters they MUST be entered in parentheses.
	There MUST be at least one space between the parenthesis and the
	first/last parameter. 

{ }	The current version of SCASM cannot handle nested brackets. Since
	some users wants to include them into the name strings of navaids or
	in ATIS messages converts the curly brackets {} to normal brackets ().

[ ]	If you find parameter names within these brackets in an command
	description the parameter can be omitted.

;       Indicates the following text is a comment. Be very carefull when
	using this within parameter brackets because the whole rest of the
	line is skiped. Use the next line for more parameters and for the
	closing bracket to avoid confusion of the scenery assembler.

_       Underscores are converted to spaces ' ' only in name strings of
	navaids and in ATIS messages.

#       This character represents a counting number in some parameter names.
	E.g. OBI# can be replaced by OBI1 or OBI2.

hex     Some parameters are required as a hex value. Since SCASM expects this
	format you must not enter any additional caracters to indicate this.
	So simply enter C1 (not 0xC1 or C1h).

@       Special character for generating unambiguous labels in macros.
	see -> macro()

Capital characters
	Capital characters are used in this document only for best overview.
	The scenery assembler itself is NOT case sensitive.


	-------------------------------------------------------------


Header( type  [*]  MaxNorth  MinNorth  MaxEast  MinEast )
	-
	This command MUST be the first in your (main) scenery input file.
	It generates the BGL-file header which defines the boundaries of
	the area covered by your scenery file.
	-
	Lat/Lon values in the format DD:MM:SS.SSSS
	type    1...4, this number has something to do with your *.VIS files.
		The following numbers are associated with:
		1       visual scenery (sect 9), synth blocks (sect 1 ... 6)
		2       crop duster world, do not use it
		3       navaids as VOR, ILS, NDB, Markers
		4       airport menu, ATIS
	It seems these numbers shows FS5 how important the information in
	this file is and how often to scan this file for scenery updating.
	So you should put all visible things into type 1 and less important
	things such as menu and land-me data into type 4 files. But if you
	are only designing a small scenery you can put all into one file.
	*	If the '*' character is entered here the correct order of
		MaxEast and MinEast is not tested. You will need this option
		only if your scenery is crossing the date line!
		Normaly not used!

LatRange( MinNorth MaxNorth )
	-
	This command has to follow the Header command.
	In this program version only one LatRange record is allowed.
	In this version the LatRange record is valid for all BGL-sections.
	Atention:
	-
	The format of this command may be changed in future versions to
	allow to divide the file into several latitude stripes.

Menu( Scenery Title String )
	-
	If you want to define some start positions which can be chosen from
	the Airport menu use this command. Length is limited to 20 characters
	now. Use the '{' brackets instead of '(' if part of Title String.
	Only one Menue() command allowed in this version. Future versions
	will not have this limitation.

MenuEntry( Lat Lon  alt  hdg  COMfrq  NAV1frq  OBI1  NAV2frq  OBI2
	Text Info String, max 40 characters )
	-
	Data for a startsituation. There MUST be a Menu( .. ) command
	in the file BEFORE you enter a MenuEntry(..) command, otherwise
	you got an sequence error from SCASM. The info string is limited to
	40 characters.
	-
	Lat     Latitude
	Lon     Longitude
	alt     Altitude in meter. If set to 0 FS5 will automatically adjust
		to ground level. Floating point numbers accepted.
	hdg     Heading in degrees -> 23.33
	COMfrq  Frequecny of the COM radio -> 123.40 (first digit ignored)
	NAV#frq Frequency of the NAV# radio. -> 116.30
	OBI#    OBI# settings in degrees (integer) -> 271

NDB(    Freq    Rng     ID      Mame    Lat     Lon     Elev )
	-
	This command defines an NDB.
	-
	Freq    frequency in kc, range 200.0 ... 526.5
	Rng     Range in nm (integer)
	ID      5 char NDB id string
	Name    24 char Name string, if you want to include space
		characters use '_' instead.
	Lat     latitude of the position
	Lon     longitude of the position
	Elev    elevation (MSL) in meters (integer)

VOR(    Frq     Rng     Flags   Magvar  ID      Name
	Lat     Lon     Elev    Hdg
    )
	-
	Defines an VOR. For details see -> ILS.

ILS(    Frq     Rng     Flags   Magvar  ID      Name
	Lat     Lon     Elev    Hdg                     ; localizer
	Lat     Lon     Elev    Slope                   ; GP
    )
	-
	Defines an ILS.
	-
	Frq     frequency in mc -> 113.45
		freq. range VOR 108.0 ... 117.975 mc
		freq. range ILS 108.0 ... 111.975 mc
	Rng     range in nm (integer)
	Flags   any 2 digit hex value is accepted
		80 localizer on ON bit
		40 glideslope transmitter ON bit
		10 DME at glideslope transmitter position bit
		01 DME bit
		02 often found, unknown
		08 VOR OFF bit (-> 09 is DME without VOR)
	Magvar  magnetic variation (eg.-3.7). Only for VOR. Normally 0 for ILS.
		If 0 the VOR/ILS is aligned with true north. To get a
		nav receiver readout which corresponds to your compass you
		should enter the magnetic variation. This gives the VOR the
		same error than your compass.
	ID      ID string, up to 5 characters
	Name    Name string, up to 24 characters. Use '_' in place of ' '.
	Lat     latitude
	Lon     longitude
	Elev    elevation in meters (MSL, integer)
	Hdg     heading in degrees (ILS only, always 0 for VOR) -> 144.1
	Slope   slope angle of GP transmitter -> 3.0
		Note: There is a known problem with the slope in the southern
		hemisphere. It seems FS5.0 and FS5a cannot handle this
		correctly. This problem is solved with FS5.1


IM(     Lat     Long    Elev    )
MM(     Lat     Long    Elev    )
OM(     Lat     Long    Elev    )
	-
	Marker bacons:
	IM      inner marker
	MM      middle marker
	OM      outer marker
	Lat     Latitude
	Lon     Longitude
	Elev    elevation in meters (MSL, integer)

ATIS(   Rng     Lat     Lon     Frq     RW1 RW2 RW3 RW4 Text    )
	-
	Rng     range in km (int)
	LAT/Lon ATIS position
	Frq     frequency in mc like 123.45
		freq. range COM 118.0 ... 137.0 mc
	RW1     runway to use for wind directions   0...89
	RW2     runway to use for wind directions  90...179
	RW3     runway to use for wind directions 180...269
	RW4     runway to use for wind directions 270...359
	Text    Any ATIS text you want. The following special text
		characters triggers FS5 to send the following strings:
		%A   " weather -",
		%B   " observation",
		%C   " ##:## zulu",
		%D   ---
		%E   " Temperature ## F -",
		%F   " Information ",
		%G   " Landing and departing runway # -",
		%H   " Advise controler",
		%I   " Altimeter ##.## -",
		%J   " Visibility ## -",
		%K   " winds $$$$ -",
		%L   " Measured ceiling ##### $$$$,",
		%M   " on initial contact ",
	Note: If you have very long messages you can split them up into
	several lines. All <CR/LF> sequences within the opening and closing
	brackets of this instruction are converted into a single space
	character. The input line buffer size is about 4000 characters but
	it seems the current version of FS5.0 can only handle 255 characters.
	If you need the '(' & ')' replace them by '{' & '}'. Also the
	underscores '_' are converted to spaces now.

LandMe( Lat1    Long1   Elev1   ID1
	Lat2    Long2   Elev2   ID2
	Airport name Rwy
    )
	-
	This is the data record needed for the 'Land Me' option in FS5. This
	option is only available with the default Cessna.
	-
	Lat#/Lon#	Defines the positions of the touchdown points for
			each end of a runway.
	Elev    	elevation of the touchdown points in meters (MSL).
			-> 17.3
	ID#     	runway ID of this touchdown point

include( filname.ext )
	-
	Includes this text file. The file is simply copied into your
	'main' source file. The included text file may not include an other
	include file. Any correct filename is accepted.
	The call of a macro file is allowed.
	This makes it possible to make a 'main' file like
		Header( ... )
		LatRange( ... )
		Include( ... )
		...
		Include( ... )
	with all the other commands in the Include() files.

macro( filename.scm p1 ... pn )
	-
	This is a visual scenery macro call. It calls the macro with up to
	30 text-parameters (let me know if you need more).
	p1 to pn are any text with a length of up to 14 characters. No
	spaces, ')' or '%' are allowed here.
	A macro cannot call any other macro or an include file.

	The Macro-file may contain any VISUAL scenery command. Every time
	when the string '%#' is found, it is replaced by the #nth parameter
	of the macro call. Parameter count starts with 1.
	example:
	macro call:     macro( example.scm param1 param2 )

	macro file:     Area( 5 %1 %2 20 )
			-> %1 is replaced by param1
			-> %2 is replaced by param2

	conditional macro translation (MacroIf, pseudo commands):
	mif( %# )       The macro parameter # is tested. If it's value
			is NOT 0 (=TRUE) the following commands are translated.
			Nested mif() statements arte not supported.
			In this version only zerotests are supported.
	melse           Optional. If the 'mif( %# )' condition is FALSE
			this section is translated by the assembler.
	mifend          Marks the end of the conditional translation.

	Note: In most cases macros will contain a whole Area() block. But if
	you are using the macro feature to generate some code within an area
	and you are using the same macro more than onece and if the macro
	contains label definitions you will get an 'duplicated label error'.
	To avoid this you can include the special '@' character in the label
	name. This character causes SCASM to include the internal macro
	counter in the Label name during macro expansion. Since the internal
	macro counter is a 3 digit code the name is limited to 12 characters.
	example:
	:Label@ is expanded to :Label095 during the expansion of the 95th
		macro.


CopyRight( any text with up to 80 characters )
	-
	This text is added at the end of the file. No underscores '_' are
	needed.


GenIncl or
GenExcl( name.BGL   mask
		Latmax1 Latmin1 Lonmax1 Longmin1
		Latmax2 Latmin2 Lonmax2 Longmin2
	)
	-
	for FS5.1 and later !
	-
	name	name of the generated *.BGL file (ie. MY_INCL.BGL)
	L***1	Lat/Lon boundaries for the BGL file header; same as -> header()
	L***2	Lat/Lon boundaries for the scenery (usually equal to L**1)
	mask	16 bit hex value to indicate the CD data to be suppressed.
		any combination of the below bits allowed.
		01  no visual scenery, runways
		02  no VOR, ILS
		04  no NDB ?
		08  no ATIS
		other bits not found yet
		to exclude all foreign scenery simply enter F for the mask.
		It seems not all possible combinations are allowed.
	-
	generates an ****INCL.BGL file for suppressing specified FS5.1 CD
	default areas. It seems theese files have effects to all other files
	not in the same scenery directory than this file.
	You can define more than one *INCL.BGL file for the
	same scenerie but be verry carefull when defining the boundaries.
	Move these file(s) to the same subdirectory as your other BGL files.
	Note: you cannot disable synthetic mountains with these file(s).


The following commands are for synthetic scenery (section 1 to 6). In this
version I am using exactly the same syntax as Enno Borgsteede in his BGLGEN.
This may be changed in future versions because this are the only commands which
have parameters but no parentheses. You can place these commands everywere
in your source text except within an Area-Block. I do not work much with
synth blocks. I use them only for giving my scenery the correct base altitude
with blocks like -> block  177  0  0  1111 5.3
This is a blue (sea) block at 5.3 meters altitude where I can put my scenery
on.
The best description for these blocks I have seen comes with Enno Borgsteede's
BGLGEN. There you will find also a program (POS.COM) for calculating the row
and collumn number of the blocks. You will also find a similar programm
(POSPLUS) in the AIRPORT pack, a front end to SCASM.

Synth   sect row
	-
	sect    section number (1...6) for scenery synth blocks. This section
		is used for all following Block commands until the next Synth
		command is entered.
	row     row number for scenery synth blocks. This row is
		used for all following Block commands until the next Synth
		command is entered.

Block   collunm  sel1  sel2  object  alt
	-
	collumn collumn (position) of this block (decimal)
	sel1	selector 1, 8 bit hex number
	sel2	selector 2, 8 bit hex number
	object  pattern to select an object type, (16 bit hex)
	alt     altitude in meters above MSL


The following commands are for the visual section (section 9). Before you can
use one of these commands, you have to define an Area block. No other
commands are allowed in such block.

Area(   typ     Lat     Lon     Rng     )
	-
	This marks the begin of an block of visual scenery commands.
	typ     5, 8, B
		This is simply the first byte of the generated hex code.
		It is said there is a difference in the range of visibility.
		5 up to 22km
		8 up to 69km
		B more than 69km
		I obseved this range can be influenced by the scaling factor
		of the RefPoint() command. Also I could not get all commands
		to work as expected with Area type 8. It seems type 8 cannot
		be used with 3D objects.
	Lat/Lon location of this block
	Rng     range in nm or 2km units. I do not know which is correct.
		(1nm -> 1.852km; integer)

EndA
	End_of_Area
	This marks the end of an Area block. No code is generated. You can
	see this command as a special jump destination. All unresolved
	Jump()s and all 'empty' labels (-> only ':') are directed to here.

RefPoint( type :Label scale Lat Lon [...] )
	-
	type    type of the RefPoint (2 or 7)
		2       normal type, use it with the E= parameter
			(elevation/altitude) to set the abolute elevation.
			(abolute referencepoint/MSL)
		7       The E= parameter is ignored, if any. The altitude
			is adjusted to the same value as defined in the
			Synth Block you are standing on. Usually 0 if there
			is no one in your or any other active BGL file.
			(relative referencepoint/always 0 AGL)
	:Label  name of a jump destination
	scale   scaling factor, if '1' all distances are in meters.
		Floating point values accepted.
	Lat/Lon Position
	E= ###  elevation of this point in meters (MSL), not for type 7.
		(old H= is also available)

	This command defines a reference point for further actions.
	All distances entered now are relative to this point. If FS5
	decides the viewer is too far away, a jump to :Label is performed
	and the following commands are not executed. For the Refpoint type
	selector I simply chose the first digit of the generated hex code.
	Experts: There are two fields in the RefPoint() record to influence
		the visibility. Since I do not know the exact meaning of
		these fields I simply call them v1 and v2.
		It seems v1= gives the total visibility range if this
		value is not zero.
		Default values are v1= 0 and v2= 0. You can change them by
		simply typing "v1= 123". Note the space between the equal
		sign and the number.

MoveTo( x z y )
	-
	This command moves the drawing cursor to the given point.
	For lines only.
	-> LineColor(), -> Brightness(), -> DrawTo()

DrawTo( x z y )
	-
	A drawing command from the previous point to this point is
	executed. For lines only.
	-> LineColor(), -> Brightness(), -> MoveTo()

MoveToPt( # )
	-
	Moves the drawing cursor to the point # of a list of 3D points.
	For lines and surfaces.
	-> Points(), ->VecPoints(), -> StartSurface, -> EndSurface,
	-> DrawToPt(), ConcavePoly

DrawToPt( # [#...#] )
	-
	A drawing command from the previous point to this point# is
	executed. The points has to be defined in an 3D point list.
	This command is repeated for every # in the brackets.

StartSurface
	-
	If this command is entered, you can use the above commands to
	define a surface (covered with color or bitmap).
	-> EndSurface, -> SurfaceColor(), -> ConcavePoly, -> Bitmap()

EndSurface
	-
	This indicates the end of an surface drawn with the Move..() and
	Draw..() commands.

LineColor( num attr )
	-
	Sets the color for lines and dotted lines and single dots.

ShadedColor( num attr )
	-
	The color for shaded polygons is set. It seems this command also
	sets the surface color.

SurfaceColor( num attr )
	-
	num     color code (hex)
	attr    color attributes
		F0	normal colors
		68	transparent colors
		69	direct palette color
	-
	Sets the color for normal polygons and surfaces defined with
	-> StartSurface - Move..() - Draw..() - Endsurface or
	-> Poly()

Bitmap( name.ext  x  dx  dz  dy )
	-
	Load a bitmap (texture) file from the active TEXTURE directory.
	in FS5.0 this is usually:
		C:\FLTSIM5\TEXTURE
	in FS5.1 this is cold be:
		C:\FLTSIM5\TEXTURE             _OR_
		C:\FLTSIM5\MY_SCEN\TEXTURE     the active scenery directory
	-
	Bitmap files often have extensions '.R8' but there are also bitmaps
	with other extensions.
	name.ext        The name of the bitmap file. You cannot specify any
			drive or path name in this instruction (limit in
			BGL file format).
	dx              x offset in RefPoint units
	dy              y offset
	dz              z offset, normaly 0
	x               unknown (decimal).
			Often found values: 0, 1, 8
	Note:
	The bitmaps for FS5 are a simple 256 x 256 pixel arrays using 1 byte
	per pixel. Note the following x, y pixel adress:
		top left	  0   0
		top right	255   0
		bottom left	  0 255
		bottom right	255 255
	For some reasons bitmaps drawn with
	Bitmap() - StartSurface - MovetoPt() - ... - Endsurface
	are drawn top down !
	The standard color palette is stored in FS5.PAL (in FLTSIM5\TEXTURE
	dir). You cannot view/edit these bitmaps with normal drawing
	programms.

RepeatBitmap( dx  dz  dy )
	-
	Repeat/reactivate a still loaded bitmap. Parameters are the same as
	in Bitmap(). Probably this command can reduce HD access (?).

BitmapMode( first_color )
	-
	preliminary, name may be changed in next versions
	(Bitmap copy mode)
	It seems this command controls the handling of the pixels in a bitmap.
	This command sets the first color index number which is copied ito
	your scenery.
	Use this instruction with TexPoly() [and Poly() FS5.1 and later?]
	It seems if this is used with TexWindow() or
	StartSurface - MoveToPt - DrawToPt - EndSurface this value is added
	to the bitmap colorindex.
	-
	first_color     Decimal value. This is the first color number to be
			copied. Do not forget to change back to 0 (normal).
			All colors from 0 to this value appearing to be
			transparent.

Inst_81( state )	; old
Smoothing( state )
	-
	This instruction is found very often just following the Bitmap()
	instruction. It seems this instruction controls the image smoothing
	for ground textures. It comes into effect when the option image
	smoothing is set in the preferences display option menu.
	-> TexWindow(), -> ShadedTexPoly()
	-
	state   0       off
		1       on

MoveTexture( x1 y1 x2 y2 )
	-
	Name maybe changed in future versions.

Palette( name.ext )
	-
	The color palette file 'name.ext' is loaded. You cannot specify a
	drive or path name.
	You do not need this instruction if you are using the FS5 default
	color palette for your bitmap/texture files.
	Note, if you are using FS5.1 you will also need a corresponding
	*.HAZ file otherwise you cannot use the haze option with your scenery.

Brightness( 1 - 100 )
	-
	This command sets the brightness for a color. The range is from
	1.0 to 100.0 percent.
	-> LineColor(), -> Surfacecolor() & Startsurface .. Endsurface


DotLine( x1 z1 y1   x2 z2 y2   num )
	-
	A dotted line from point(x1 z1 y1) to point( x2 z2 y2 ) is drawn.
	The number of dotts is num. The color of the dot is selected with
	-> LineColor()

Dot( x z y )
	-
	A single dot is drawn at the point(x z y ). The color of the dot
	is selected with
	-> LineColor()

DotPt( # )
	-
	A single dot is drawn at the point with the number # of a
	predefined list of points. The command is repeated as many times
	as there are dot numbers in the brackets.
	-> LineColor(), -> Points()

BigDot( size x z y )
	-
	A big dot is drawn at the position defined by the x- y- and z-
	coordinates. This command is used for some interesting light effects.
	Set the color with LineColor() AND SurfceColor().
	The function of the size parameter is not absolutely clear now.
	Recommended value for size is 512.
	Format of the size parameter may be changed in future versions.

Points( firstnum        x1 z1 y1  ...  xn zn yn )
	-
	This command builds a table of 3D points. Normaly firstnum should be
	set to 0. Other values are used to change or expand an existing
	list. The number of points per area block is limited to 400
	(200 in older versions).

DefPoint( index  x  z  y )
	-
	Defines a single point in the list of points.
	index	the index number of this point

VecPoints( m     firstnum  x1 z1 y1  vx1 vz1 vy1 ... xn zn yn  vxn vzn vyn )
VecPoints( p     firstnum  x1 z1 y1  el1 hd1     ... xn zn yn  eln hdn )
VecPoints( vattr firstnum  x1 z1 y1 ... xn zn yn )
	-
	This command builds a table of vector points. The vectors are used
	for color shading with -> ShadedPoly(). If you have unregular
	shaped objects it may be better to calculate the vectors manually.
	In automatic mode the number of points are limited to 400 in this
	version. The automatic function gives the vector the direction
	from the RefPoint TO this point, but remember this is correct only for
	regular shaped objects. It is possible to suppress ONE 	vector
	component by using xy xz yz vattr. Other values may confuse the
	assembler. For example you may use xy-flags for a cylindrical gas
	tank.
	-
	x#  z#  y#      coordinates of a point (integer)
	vx# vz# vy#     components of a vector
	firstnum        number of first point (usually 0).
	vattr           vector calculation attributes, see above.
			(a, xy, xz, yz, p)
	el#             elevation angle in degrees (-90 .. +90)
	hd#             heading angle

AutoPoints( firstnum numcount   dx1 dz1 dy1   dx2 dz2 dy2 )
	-
	This command draws nothing. It only calculates and fills a table
	of points. Numcount points are generated, where firstnum is the
	first one. You can think of this being a command to calculate the
	coordinates for a dotted line from P1 to P2 and than fills the
	point list.

ConcavePoly
	-
	Indicate to the drawing system that a concave polygon follows.
	Does not work with bitmaps in FS5.0.
	-> Poly(), -> StartSurface - Move..() - Draw..() EndSurface

Poly( vattr  [vx vz vy   len]   pnum1 ... pnumn )
Poly( m       vx vz vy   len    pnum1 ... pnumn )
Poly( a                         pnum1 ... pnumn )
	-
	A polygon is drawn with the points pnum1 to pnumn of the actual
	point list and with the actual surface color.
	Note: All polygons are only visible only from one side. The vector
	parameters indicate the direction from where the polygon can be seen.
	The brightness of the used color varies with the angle of the light
	source (the sun, day of time).
	-> SurfaceColor(), -> Points()

ShadedPoly( vattr [vx vz vy  len]   pnum1 ... pnumn )
ShadedPoly( m      vx vz vy  len    pnum1 ... pnumn )
ShadedPoly( a                       pnum1 ... pnumn )
	-
	A shaded polygon is drawn. The shading requires 3D points defined
	with the VecPoints() statement and ShadedColor(). The shading is used
	to get a smoth change of the brightness from one polygon to the next.
	This can make an octagonal object looking perfectly round.
	-> ShadedColor(), -> VecPoints()

TexWindow( vattr [vx vz vy  len]   pnum1 ... pnumn )
TexWindow( m      vx vz vy  len    pnum1 ... pnumn )
TexWindow( a                       pnum1 ... pnumn )
	-
	pnum#   number (index) of a point from the point list
	-
	Defines a window through which a bitmap is shown.
	The window should not be concave.


TexPoly( vattr [vx vz vy  len]   pnum1 bx1 by1 ... pnumn bxn byn )
TexPoly( m      vx vz vy  len    pnum1 bx1 by1 ... pnumn bxn byn )
TexPoly( a                       pnum1 bx1 by1 ... pnumn bxn byn )
	-
	Draws a polygon covered with a texture bitmap. The points has to
	be defined with the Point() command. The polygon is always drawn with
	the same brightness, regardless to the location of the sun. The
	brightness can be changed using TexPolyShading() if the bitmap is
	prepared for that (see -> TexPolyShading() ).
	The bitmap-point bx1-by1 is tied to ptnum1 and so on.
	Image smoothing does not work with this command. Color shading can
	be done with TexPolyShading() and a special prepared bitmap.
	-> Bitmap(), -> Points(), -> TexPolyShading()
	-
	pnum#   number (index) of a point from the point list
	bx#     bitmap x coordinate (0...255)
	by#     bitmap y coordinate (0...255)

TexPolyShading( vx  vz  vy )
TexPolyShading( p   el  hd )
	-
	This instruction sets the shading intensity of building bitmaps
	(side#.R8) in conjunction with textured polygons (->TexPoly() ). This
	shading requires a special prepared bitmap file with 8 areas. (one for
	each of the 8 intensity steps)
	-
	vx      x-vector component
	vz      z-vector component
	vy      y-vector component
	p       format flag -> polar coordinates, vector will be converted
		to FS5 format by SCASM.
	el      angle of elevation
	hd      angle of heading

ShadedTexPoly( vattr [vx vz vy  len]  pnum1 bx1 by1 ... pnumn bxn byn )
ShadedTexPoly( m      vx vz vy  len   pnum1 bx1 by1 ... pnumn bxn byn )
ShadedTexPoly( a                      pnum1 bx1 by1 ... pnumn bxn byn )
	-
	Draws a shaded polygon covered with a texture bitmap. The points
	has to be defined with the VecPoints() command.
	The bitmap-point bx1-by1 is tied to ptnum1 and so on.
	The shading is done similar to ShadedPoly().
	Bitmap colors above 127 are shown as black!
	->VecPoints(), ->Bitmap()
	-
	parameters see -> TexPoly() command.

VecPoly( vattr  [dx  dz  dy   vx  vz  vy]   pnum1 ... pnumn  )
VecPoly( m       dx  dz  dy   vx  vz  vy    pnum1 ... pnumn  )
VecPoly( a                                  pnum1 ... pnumn  )
	-
	A polygon is drawn with the point pnum1 ... pnumn of the actual
	point list and with the actual surface color.
	This polygon command is very similar to the normal Poly(...)
	command. It seems the only difference is the origin of the visibility
	vector. In auto mode SCASM copies the coordinates of the first point
	(pnum1 -> dx,dz,dy) as the origin point of the vector and then
	calculates the vector components (vx,vz,vy) as usual

Jump( :Label )
	-
	Execution is continued at :Label
	The jumptable is deleted everytime a new Area() is started, so you
	can use the same name in different areas. This also means you cannot
	jump out af an Area()-block.

VectorJump( :Label m  vx vz vy len )
VectorJump( :Label a  pnum1 pnum2 pnum3 ... )
VectorJump( :Label p  elev_angle  heading  len )
	-
	The elements vx, vz and vy are representing a vector standing
	rectangular on a virtual plane (surface). Len is a
	distance in RefPoint-units. The following commands are executed
	if the distance between the viewer (aircraft) and the virtual
	plane measured in the vectors direction is greater than 'dist'.
	Otherwise execution is continued at :Label (Jump to :Label).
	In some cases the plane is identical with one of the surfaces of
	an object you have just constructed. If so you can use the
	auto-vector feature to calculate the vector and the distance.
	You have to enter only 3 point numbers of the object
	surface (polygon). If there are more, the others will be ignored.
	-
	Note: This instruction has the same function as the GLUE Template in
	the new FSFS aircraft factory.

IfVarRange( :Label      Var minval maxval )
	-
	The contents of the FS5 variable Var is tested. If the value is
	within the range of minval and maxval the execution is continued
	with the next command. Otherwise a jump to :Label is performed.
	-
	Var     FS5 variable number in HEX.
	minval  minimal allowed value (decimal/or 0x. hex)
	maxval  maximum allowed value (decimal/or 0x. hex)


IfVarRange2( :Label	Var1 MinVal1 MaxVAl1
			Var2 MinVal2 MaxVal2
	)
	-
	5.1 only, conditions ANDed

IfVarRange3( :Label	Var1 MinVal1 MaxVAl1
			Var2 MinVal2 MaxVal2
			Var3 MinVal3 MaxVal3
	)
	-
	5.1 only, conditions ANDed


IfVarAnd( :Label Var Mask )
	-
	The contents of the FS5 variable Var is AND_ed with the value of
	Mask. If the result of this operation is TRUE execution is
	continued with the next command. Otherwise execution is continued
	at :Label.
	-
	Var     FS5 variable number in HEX
	Mask    Bitmask, any 16 bit HEX value

SetVar( var val )
	-
	var     FS5 variable number in HEX
	val     new value in decimal (or hex if started with 0x## )

SetVar7E( Var val )
	-
	another SetVar instruction. Only found in some add-on sceneries.
	The difference to normal SetVar() is unknown.

Call( :Label )
	-
	Calls a subroutine at :Label. After the Return from the subroutine
	execution continues with the next command.
	-> Return

Return
	Returns the control to the next instruction after the ..Call() command.
	(Return from subroutine). Every subroutine MUST end with a Return
	command. All parts entered with a ..Call.. command should be
	considered as a subroutine.
	Most 'database error' mesages are caused by forgoten Returns or
	misplaced Jump instructions.
	-> Call(), -> ..Call()


PerspectiveCall( :Label )
	-
	For hidden Surfaces. Use it for drawing 3 dimensional objects.
	This instruction causes FS5 to determine which objects are hidden
	and which not. There is no need to draw flat ground surfaces
	(color or bitmap) with this instruction.
	Typical sequence:
	;
	Area( ... )
	    PerspectiveCall( :House )
	    Jump( : )

	:House
	    Perspective
	    RefPoint( :H_end ... )
	    SurfaceColor(...)
	    Poly( ... )
	    ...
	:H_end
	    Return

	...
	EndA

Perspective
	-
	This should be the first command in a subroutine called
	with PerspectiveCall(). If you forget this command you will
	see nothing or even crash !

ShadowCall( :Label )
	-
	The shadow of the objects at :Label is drawn.
	Should be used only after PerspectiveCall().
	-> Return, -> see Building(...) example

RotatedCall( :Label xdeg ydeg zdeg )
	-
	The subroutine at :Label is called with rotated coordinates. The
	pivot point is the active RefPoint().
	-> Return

TransformCall( :Label  delta_x  delta_z  delta_y
		x_deg  xvar	y_deg  yvar	z_deg  zvar  )
	-
	This is an expansion of the RotatedCall().
	A subroutine is called with transformed coordinates. That means
	you can asume the new temporary reference point is at the given
	delta_# distances from the original point. Also the coordinate
	system is rotated around this point according the #_deg values.
	-> Return
	-
	:Label	Address of the subroutine which is called with a transformed
		coordinate system.
	delta_#	linear displacement of the object (integer)
	#_deg	rotation in degrees (floating point, i.e. -22.5)
	#_var	variable (hex), 0 if not used !

CallAsm( :Label x )
	-
	Calls an 8086 assembly language programm at :Label
	I have no information about the 2nd (x) parameter. Set it to 1.
	The assembly language instructions can only be entered using the
	Dbx(...) binary instructions family.

RoadMoveTo(     width   delta_x  delta_z  delta_y )
RoadMoveTo2(    width   delta_x  delta_z  delta_y )
TaxiMoveTo(     width   delta_x  delta_z  delta_y )
RoadLineTo(             delta_x  delta_z  delta_y ... )
RoadLineTo2(            delta_x  delta_z  delta_y ... )
TaxiLineTo(             delta_x  delta_z  delta_y ... )
	-
	Every ..Move.. instruction sets the starting point of a road or
	taxiway relative to the active reference point. The ..Line..
	instruction draws a road or taxiway from the previous point to the
	point defined in this instruction and stores his coordinates as a
	starting point for an following ..Line.. instruction. During dusk and
	nights roads have orange lights and taxiways have blue lights.
	The color can be chosen by -> SurfaceColor().
	width   1/2 width in refpoint units
	-
	delta_x distance in east-west direction from reference point or
		from the previous point (integer).
	delta_z height difference, usually 0 (int)
	delta_y distance in north-south direction from reference point
		or from the previous point (integer).

	Note!   The ..LineTo() commands are repeated as many times as there
		are coordinate triples in the brackets.

	The difference between Road..To()  and  Road..To2() is unknown to
	me.

Runway related commands:
------------------------

RunwayCall( :Label [layer] )
LayerCall(  :Label layer )
	-
	This calls one or more RunwayData records -> see example.
	Note: this command do not exactly produce the same code sequence
	as other scenery compilers. This difference enables you to produce
	multi runway blocks.
	If this layer parameter is omitted SCASM sets it to 24 (default
	for runways).
	You can still enter hex values in the form 0x##. This parameter
	probably defines a ground surface layer number for the drawing order.
	The polygon (or runway) with the higher number is drawn last and is
	therefore always to be seen.

RunwayData( Lat Lon  <List_of_parameters_in_any_sequence> )
	-
	Runway data record. the Lat Lon parameters must be the first one
	(without any keyword). All other parameters are entered in any
	sequence and are identified by the keyword. There must be a space
	character between the keyword and the data. The capital letters
	N and F are representing the Near/Far end data. The near end of the
	runway is that one nearest to you when landing on that end which
	corresponds with HEADing. Default value for all omitted fields is 0.
	Runway data are usually embedded in type 5 Area() blocks.
	Some runway features are not shown by FS5.0 and some more (not all)
	features are shown by FS5.0 after instaling MS-Japan/MS-Caribbean
	scenery.
	-
	ALTitude        runway altitude in meters (floating point values
			accepted).
			Please note, you are only drawing a picture of the
			runway at this altitude. You can fly through this
			picture if this value does not match with the ground
			level. Use Synth blocks to adjust the ground level !
	HEADing         heading in degrees (float)
	LENgth          runway length in ft (integer)
	WIDth           runway width in ft (integer)
	ID              runway ID number, additional characters [L|R|C] are
			allowed. ID numbers are drawn if the ID-bit
			in parameter Markers is set!
	SURFace         number of surface type
			0       mud,
			1       concrete,
			2       asphalt,
			3       grass

	Markers         Two digit hex value. Add the corresponding values of
			the required feature.
		01      white border line at the left and right side
			(no effect on FS5.0 without update)
		02      treshold marker bit
		04      touchdown markers
		08      distance marker
		10      center line
		20      ID number
		40      distance markers
		80      ??
			Note: some people reportet some trouble when using
			0x40 AND 0x08 distance markers together.

	Lights          One digit hex value, controls the ligths at the sides
			of the runway.
		00      off
		01      low intensity light
		03      high intensity light
		04      centerline lightning on

	ThrLightsN ThrLightsF   Hex value
				01 enables the green/red treshold lights
				04 enables REIL (ignored by some versions).
				You MUST switch on the threshold light if
				you want aproach lights or VASI.
	StrobesN   StrobesF     number of strobes (dec)
	VasiSlopeN VasiSlopeF   VASI slope in degrees
	VasiSideN  VasiSideF    VASI distance from the center line in ft (int)
				To indicate the side you can use the
				characters R or L instead of a -/+ sign
				(i.e. VasiSideN L120 ). If there is no L/R
				SCASM asumes the VASI on the left side.
				The side is always indicated from the pilot.
	VasiDistN  VasiDistF    VASI distance from the middle of the rwy
				in ft. No sign is needed !! A '-' sign will
				reverse the direction.
	VasiSpaceN VasiSpaceF   Spacing between the VASI elements in ft.
	VasiBarsN  VasiBarsF    Number of VASI bars - 1 (0|1|2).
				0       no VASI
				1       2 bars
				2       3 bars

	AprLN      AprLF        Aproach lights type(decimal). Be sure you
				have threshold lights enabled.
				0       none
				1       syncronous flashing strobes
				2       MALSF
				3       MALSR
				6       ALSF-1
				7       ALSF-2
				8       running strobes
				9       similar to 10, without the red lights
					crash (FS5.0 german version w/o update)
				10      ICAO III
					(ignored by FS5.0 w/o update)
	ThrOffN    ThrOffF      Offset distance for displaced thresholds.
				The offset part is painted with white arrows.
				Ignored by older versions.
	ExtN       ExtF         Runway extension. This pre-threshold area is
				painted with a yellow chevron marking pointing
				to the threshold. This length is added to the
				runway. This area is not available
				for taxing and landing.


	This is a typical sequence for a runway block:
	;
	Area( 5  N54:11:13  E07:55:00  15 )
	    RunwayCall( :runways )
	    ;
	    Jump( : )
	    ; note! the Label is omitted, this is a Jump to the end of block

	:runways
	    ;
	    ; first runway record
	    ;
	    RunwayData( 54:11:17.0493 07:54:57.7855
		  altitude 3.5          heading 57.2    lenth 846
		  width    40           surface 1 )
	    ;
	    ;  next runway record
	    ;
	    RunwayData( 54:11:16.2394 07:55:00
		alt        3.5  heading    27.2 id      3
		lenth      4788 width      98
		surface    2    lights     13   markers 36
		THRLightsF 1    THRLightsN 1
		VASIBarsF  1    VASISpaceF 330  VASIdistF 1115
		VASIsideF  r120 VASIslopeF 3.0
		VASIBarsN  1    VASISpaceN 330  VASIdistN 1115
		VASIsideN  L120 VASIslopeN 3
		ThrOffN    740  ThrOffF    740
	    )
	    ;
	    ;  last runway record
	    ;
	    RunwayData( 54:11:10.4085 07:54:58.0623
		alt     3.5     head 327.2      len 1312
		wid     98      surf 1          id 33
		markers 32
	    )
	    Return
	    ;
	    ; Do NOT FORGET this Return !!!
	    ; =============================
	    ;
	EndA    ; this marks the end of the Area block


RunwayLights( <list_of_parameters_and_values> )
	-
	This command is very similar to RunwayData() but is more elementary.
	When working with bitmaps you may already have a photo of a runway
	so you probably do not want to create a second one. This command
	enables you to iluminate your bitmap runway. Usually you will need
	one of this commands for each runway end. If you are using 2 of this
	records for the same runway only one of them should contain a
	'Lights' parameter. Also you must set the 'ThrLights' parameter to
	enable the other lights.
	To make this command compatible with the RunwayData command you should
	use a special scaling factor (0.3048). The altitude setting must be
	done in the RefPoint( 2 ... ).
	-
	HEADing         heading in degrees
	LENgth          runway length, depends on the scaling factor
	WIDth           runway width, depends on the scaling factor
	Lights          see RunwayData()
	ThrLights       see -> ThrLights#
	Strobes         number of strobes
	VasiBars        see -> VasiBars#
	VasiSlope       see -> VasiSlope#
	VasiSide        see -> VasiSide#
	VasiDist        see -> VasiDist#
	VasiSpace       see -> VasiSpace#
	AprL            see -> AprL#

Building( delta_x  delta_z  delta_y  height  x  y  type  wallflags )
	-
	This command draws one of the FS5 internal standard buildings.
	Normaly you should use an own RefPoint() for each building. You can
	rotate a building with RotatedCall().
	-
	delta_? delta coordinates from the active Reference point, usually 0
		(int). Caution, if you are using large Delta_? values
		you may notice some strange visibility effects with other
		buildings nearby! For beginners I strongly recommend to use
		zerovalues. Also each building should have its own Reference
		point and its own PerspectiveCall() instruction as in the
		example.
	height  the height of the building. It seems this is measured in
		number of floors where each floor is 4 refpoint units.
	x, y    X/Y (east-west/north-south) dimensions (int) of the building.
	type    hex value, the lower 3 bits are coresponding to
		the SIDEx.R8 bitmaps files. To get the desired type add one
		value from each group.
		  00    beige with vertical stripes
		  01    white with vertical stripes
		  02    dark gray with vertical stripes
		  03    gray with vertical stripes
		  04    white with dark vertical stripes
		  05    white with horizontal stripes
		  06    beige with horizontal stripes
		  07    light gray with vertical stripes

		The bits 3 and 4 defines the shape of the building.
		  00    normal building.
		  08    inclined roof, roof pointing to the north.
		  10    inclined walls, like a pyramid.
		  18    octogonal building, -> additional wallbits needed.

		8000    Instead the predefined SIDE#.R8 bitmaps a user
			defined bitmap is used. ->bitmap()
			Use the Bitmap() command just before the Building().
			Note, the bitmap must have a special design.

		other bits unknown

	wallflags       hex value. There is a bit for every wall and the
			roof. Normaly set to FFFF, 1FF or 1F.
			0001    roof
			0002    west
			0004    east
			0008    south
			0010    north
			0020    south-east (needed for octogonal Buildings)
			0040    south-west ( -"- )
			0080    north-east ( -"- )
			0100    north-west ( -"- )

	; example for the use of a rotated building with shadow
	;
	Area( 5 54:55:25.6584  8:20:19.7976 8 )
	    PerspectiveCall( :SubRoutine1 )
	    ShadowCall( :SubRoutine1a )
	    Jump( : )

	:SubRoutine1
	    Perspective
	:SubRoutine1a
	    RefPoint( 7 :no_building  1  54:55:25.6584  8:20:19.7976 )
	    ;  Note, since this refpoint lays in a subroutine the label
	    ;  must NOT point to the end of the block but to a Return command!
	    ;
	    RotatedCall( :SubRoutine2 0 0 -3.5 )
	:no_building
	    Return
	    ;
	:SubRoutine2
	    Building( 0 0 0  5 35 50  0 1F )
	    Return

	EndA


City
	-
	This command generates a standard city.
	;
	; Example:
	Area( 5 53:42:30  07:49:20  80 )
	    PerspectiveCall( :A )
	    Jump( : )
	:A
	    Perspective
	    RefPoint( 7 :B  16  53:42:30  7:49:20  v1= 10000 )
	    City
	:B
	    Return
	EndA


Monitor3D( :Label  xmin xmax  zmin zmax  ymin ymax )
	-
	The 3D area is monitored. If the aircraft is NOT in the specified
	area a jump to :Label is performed.
	The values are always in meters. It seems you cannot rotate this.

SenseBorder( :Label  ptx0 pty0  ...  ptxn ptyn )
	-
	The following instruction block is executed if we are within the
	polygon defined by the list of point coordinates.
	Oterwise execution is continued at -> Label.
	Scale depends on the RefPoint command.???
	I think concave polygones are not allowed and the points should be
	entered in a clockwise order !

SensePt( :Label  ptnum0 ...  ptnumX )	<- 1.4, do not longer use this name
MonitorPt( :Label ptnum0 ... ptnumX )
	-
	This is a 3D monitoring instruction using point numbers for defining
	the 3D area. 
	The following istruction block is executed if we are within the
	polygon defined by the list of point coordinates.
	Oterwise execution is continued at -> Label.
	Points has to be defined with the Points() command before.
	I think concave polygones are not allowed.

MonitorTr( ... )	comming soon

SurfaceType( type  width_x  width_y  alt )
	-
	This instruction lets you define the surface properties of a given
	rectangular area. Note, you cannot 'harden' an elevated surface with
	this command! Use aditional section 16 commands for this.
	-
	type            0: smooth surface, runnway, taxiway
			1: rough surface
			2: water surface, causes splash / crash
	width_x
	width_y         N-E / N-S deviation, depends on the scale factors
			in the RefPoint() command. The width is measured from
			the left (or upper) side to the right (or lower) side.
			(integer)
	alt             Altitude of the surface measured in
			meters (integer).


The following instructions are often found in original *.BGL files. Many
scenery designers are using binary/hex commands to use them. I included
these instructions with dummy names to make it easier to correct old source
files when the final names are found.

Inst_7D
	This instruction is used very often just before TexPoly() and
	ShadedTexPoly(). It seems this instruction prevents the bend up
	effect of the bitmaps when getting close to it.
	Sorry, no other information available.
	-
	Please let me know if you found a better name.


Some commands to produce any hex-value in the visual scenery area. These
are included to give experts a tool for trying new scenery commands.

Dlx( hhhhhhhh )         DefineLongHex. A 32 bit hex value is inserted.
Dld( dddddddd )         DefineLongDecimal. A decimal value is converted in
			32 bit hex format and inserted.
Dwx( hhhh .. hhhh )     DefineWordHex. All hex values in the brackets are
			copied into the file.
Dwd( ddddd .. ddddd )   DefineWordDecimal. All decimal values in the brackets
			are copied into the file.
Dbx( hh .. hh )         DefineByteHex.
Dbd( dd .. dd )         DefineByteDecimal
Dba( AbCdE )            DefineByteASCII


Section 16 commands:
--------------------
Besides other records this section contains data structures similar to
section 9. With the following instructions you can define elevated surfaces
above the ground level defined with Synth 1 ... Synth 6.


Area16( Latmax Latmin Longmax Longmin )
	-
	Defines an rectangular area around your elevated surface.
	Atention: Due to the binary format of this command the total length
	of one Area16()...End16 is limited to 256 Bytes. SCASM does not test
	this limit!

End16
	-
	defines the end of this area16 instruction block.

SetElevation( elev )
	-
	defines an elevated hard surface i.e. for a runway on a mountain
	This instruction was found only in section 16 !
	elev	elevation (MSL) in meters (integer).

SenseBorder( :Label  ptx0 pty0  ...  ptxn ptyn )
	-
	the same as in section 9

RefPoint( 2 ... E= 0 )
	-
	the same as in section 9. Do not use other RefPoint types. Sometimes
	it is usefull to set parameter V1 on large elevated surfaces.

RotatedCall( ... )
	-
	the same as in section 9,
	Found in some original files but it seems this does not work in
	section 16!

Return
	-
	the same as in section 9

Jump( :Label )
	-
	the same as in section 9

IfVarRange( :Label  var minval maxval )
	-
	the same as in section 9

dbx, dwx, dlx, dbd, dwd, dld
	-
	the same as in section 9

other commands are simply ignored, no error message !

Example for an elevated surface:
	;
	; This defines the hard surface of the platform in the joke.stn in my
	; GERISNS scenery.
	;
	Area16( 54:43  54:41:30   7:12  7:07 )
	   Refpoint( 2 :  1  54:42:06  07:10:00  )
	   SenseBorder( :
	       -40      40	; top left
		40      40	; top right
		40     -40	; bottom right
	       -40     -40	; bottom left
	   )
	   ; remember to enter the points in clockwise order
	   ;
	   SetElevation( 30 )
	End16


---------------- Appendix ----------------

Some color codes to use with the ..Color() commands (hex values).
These color codes differ from the numbers you find in the bitmap files.

Colors of variable brightness, depending of the time of day (F0 colors)
	00      black
	01      dark gray
	02      gray
	03      light gray
	04      white
	05      red
	06      green
	07      blue
	08      orange
	09      yellow
	0A      brown
	0B      beige
	0C      orange/brown
	0D      green/gray
	0E      blue/marine

constant colors, use it for ilumination.
	0F      red
	10      green
	11      blue
	12      dark green/blue
	13      orange
	14      yellow
	15      white (high intensity)
	16      white/light gray (low intensity)

other colors
	21      dark green, replacement color for some bitmaps ?
	2F      brown


---------------- some often used variables (hex) ---------------
Most of this variables should not be modified by the user !
	-
	282     running bit timer. There is one bit running from
		0000.0000.0000.0001 to 1000.0000.0000.0000 in about 6 seconds.
		Used for flashlights.
	284     crash code
		2       mountain crash
		4       crash
		8       splash
		E       building crash
		10      crash with other aircraft
	288     Aircraft is in fuelbox flag. Set it to 1 and your fuel tanks
		are filled. Aircraft speed must be nearly zero, otherwise it
		seems FS5 ignores this flag.
	28C     Time of day code
		1       day
		2       dusk/dawn
		4       night
	37E     Aircraft delta X(east) coordinate from Refpoint
	386     Aircraft delta Y(north) coordinate from RefPoint
	382     Aircraft delta Z(alt) coordinate from RefPoint
	346     scenery density code
		0       very sparse
		1       sparse
		2       normal
		3       dense
		4       very dense
	340	textured ground flag
	342	textured buildings flag
	390	textured water flag (FS5.1 only?)


--- ILS / VOR examples for flags -------------------------------------
	-
	flag bits for ILS / VOR
	-----------------------
	VOR      00   VOR, no DME
	VOR/DME  01
	VORTAC   03   ?(not approved)
	DME      09   only DME readout, without VOR !

	flag bits for ILS
	-----------------
	LLZ      82   localizer only, no GP, no DME
	LLZ/DME  83
	ILS      C2   normal ILS, no DME
	ILS/DME  C3   ILS, DME at Loc pos.
	ILS/DME  D3   ILS, DME at GP pos.


---------------- Hex calculation ----------------
For some parameters I chose hex values as input. The reason for this is
to give you full access to the data records.
Unfortunately hex calculation is not as easy as normal calculation, but I
will try to give some help.

	Hex conversion table:
	decimal hex
	0       0
	1       1
	2       2
	3       3
	4       4
	5       5
	6       6
	7       7
	8       8
	9       9
	10      A
	11      B
	12      C
	13      D
	14      E
	15      F

Example:
	We want to calculate the flag parameter for an ILS. We have to add
	the following values:
	80      for the localizer
	40      for the glidepath transmitter
	01      for the DME (if wanted)
		As the '8' and '4' are the same in both number systems we
		simply add them in the decimal system. This yields 12. The
		conversion Table gives you the letter 'C' as hex digit.
	---     With this we get the result:
	C1
	===
