SCASM 2.88

points, dots and lines

  

command index:
 
back to main index
 
Points( )
DefPoint( )
VecPoints( )
AutoPoints( )
MoveToPt( )
DrawToPt( )
StartSurface
EndSurface
MoveTo( )
DrawTo( )
LineColor( )
ShadedColor(
SurfaceColor( )
Brightness( )
Transparency( ) / AlphaColor( )
LoadSurfaceColor( )
LoadShadedColor( )
LoadLineColor( )
Dot( )
DotPt( )
DotLine( )
Ball( ) / BigDot( )

 

FS5 - FS2002
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, 800 in a 32-bit vers.).


TOP 

FS5 - FS2002
Points( g firstnum Lat_1 Lon_1 Alt_1 ... Lat_n Lon_n Alt_n )
 

This is an alternate format of the Points() command which lets you enter the points in a geographic Lat/Lon/Alt format. This command only works if SCASM already has processed a valid reference point with a scale factor. The altitude is expected in meters.

...
Points( g 1
    60:00:1.5   -2:0:3  0
    59:59:59    -2:0:3  0
    59:59:59    -2:0:1  0
    60:00:1     -2:0:1  0
)
...
TOP 

FS5 - FS98 ?
DefPoint( index x z y )
 

Defines a single point in the list of points. Note, points defined with this istruction cannot be used with SCASM's automatic vector calculation feature unless this command is only used for updates.

index  the index number of this point

TOP 

FS5 - FS2000
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 cylindric 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 (-90deg .. +90deg)
hd#  heading angle

TOP 

FS5
AutoPoints( firstnum numcount dx1 dz1 dy1 dx2 dz2 dy2 )
 

This command 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.
Note: In original FS5 sceneries this command was not found with a Numcount value higher than 7. Points defined with this command cannot be used with SCASM's automatic vector calculation feature!


TOP 

FS5 - FS2000
MoveToPt( # )
 

Moves the drawing cursor to the 3D-coordinates given by the point #(number) of a list of 3D points which is previously defined by the Point() command. For lines and surfaces. Points(), VecPoints(), StartSurface, EndSurface, DrawToPt(), ConcavePoly


TOP 

FS5 - FS2000
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.


TOP 

FS5 - FS98
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()


TOP 

FS5 - FS98
EndSurface
 

This indicates the end of an surface drawn with the MoveToPT() and DrawToPt() commands.


TOP 

FS5 - FS2002
MoveTo( x z y )
 

This command moves the drawing cursor to the 3D point which is defined by the given coordinates. For lines only. Do not mix the MoveTo()/DrawTo() type of instructions with the MoveToPt()/DrawToPt() instructions and also do not use it for shadowed objects.
LineColor(), Brightness(), DrawTo()


TOP 

FS5 - FS2002
DrawTo( x z y )
 

A drawing command from the previous point to this point is executed. For lines only.


TOP 

FS5 - FS2002
LineColor( num attr )
 

Sets the color for lines and dotted lines and single dots.


TOP 

FS5 - FS2002
ShadedColor( num attr )
 

The color for shaded polygons is set. It seems this command also sets the surface color.


TOP 

FS5 - FS2002
SurfaceColor( num attr )
 

Sets the color for normal polygons and surfaces defined with
StartSurface - Move..() - Draw..() - Endsurface or - Poly()

num  color code (hex)
attr  color attributes
F0  normal colors, changes with time of day
68  transparent colors
69  direct palette color

TOP 

FS5 - FS2002
Brightness( 1 - 100 )
 

This command sets the brightness for a color. The range is from 0.0 to 100.0 percent. - LineColor(), - Surfacecolor()


TOP 

2.11 | FS98 - FS2002
Transparency( mode )
AlphaColor( mode )
 

Different modes of transparent color effects are set. Use this command with the normal Poly() command if you want a transparent polygon. This is the propeller disk effect in FS98. (alpha blending)
Note, it is very important to switch this mode off after drawing the last Polygon. Otherwise a page fault in the FS98 module HG2D.DLL may happen.

mode (hex number):
transparency mode OFF.
nearly complete transparent
...  
highest density in transparent mode, not longer transparent since the result is always gray.
1x different modes of "funny" color effects

Example:
Area( 5 Lat  Lon  5 )
    PerspectiveCall( :alpha )
    Jump( : )
    ;
:alpha
    Perspective
    RefPoint ( rel :endobj 1 Lat Lon v1= 5000 v2= 100 )
    Points( 0
        -20 0  0
        -20 40 0
         20 40 0
         20 0  0
    )
    AlphaColor( 6 )
    Poly ( a  0 1 2 3 )
    Poly ( ai 0 1 2 3 )
    AlphaColor( 0 )    ; important !!!
:endobj
    Return
    ;
EndA

TOP 

FS5 - FS98
LoadSurfaceColor( FSvar )
 

The surface color code is loaded from a local variable.


TOP 

FS5 - FS98
LoadShadedColor( FSvar )
 

The shaded color code is loaded from a local variable.


TOP 

FS5 - FS98
LoadLineColor( FSvar )
 

The line color code is loaded from a local variable.


TOP 

FS5 - FS2002
Dot( x z y )
 

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


TOP 

FS5 - FS98
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.


TOP 

FS5 - FS98 ?
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()


TOP 

FS5 - FS98 ?
Ball( size x z y )
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.


 

    
TOP © Manfred Moldenhauer