Graphics elements can be defined in many ways, including display lists, bitmaps, and graphics languages (graphics commands that are mixed in with a well-known computer language).
Since its inception, Flight Simulator has used the graphics language approach to create scenery. A graphics design created using a graphics language is much like a program that is executed sequentially, from the beginning. The following code sample is an example of a small graphics design consisting of two points and a line, as defined by a graphics language.
Point234, 124, 593
Line002, 592, 345to 394, 235, 432
Point495, 211, -234
End
The preceding example includes an opcode followed by arguments; the first instruction specifies that a point be drawn at location x, y, z = 234, 124, 593 (where x,y,z are the 3-D coordinates in the 16-bit 3-D design space). The POINT command is the opcode, and the x, y , z coordinates are the arguments. The concept of graphics programs that consist of graphics opcodes is echoed throughout the Flight Simulator scenery system.
In Flight Simulator, assembly language syntax is used to define graphics command. Using assembly language syntax is effective in that it tells you exactly what bits and bytes are being generated. The POINT command in the preceding example can be expressed in assembly language syntax as follows.
;OPERATION:Render a point (dot).
;BYTES:8
;FORMAT:wordopcode = 0037h
;wordX
;wordY
;wordZ
PNTmacrox,y,z
dw037h
dwx,y,z
endm
;The following command defines a point at x,y,z = 234,124,593
PNT234, 124, 593
In the preceding example, notice that a macro was used to define the POINT command. The macro set the opcode to be a word with the value 0037h.
Typically, the scenery designer sets up a library of macros defining all the graphics commands and uses an include directive to insert the library at the beginning of a file. The graphics program itself consists of a list of graphics commands or entities.
BGL uses a lot of integer data types because operations are usually performed at greater speeds using integers (as opposed to floating-point). Intel 80xx series microprocessors and Pentium processors treat multibyte integers in a least-significant byte first manner; that is, in memory, the byte at the lower address is least significant. This is illustrated in the following example.
addressvalue
0000dw1234h
0002
is equivalent to
addressvalue
0000db34h
0001db12h
0002
The byte-reversed concept is extended to larger integer types as well. The following example shows how a 32-byte value is represented.
addressvalue
0000dd12345678h
0004
is equivalent to
addressvalue
0000dw5678h
0002dw1234h
is equivalent to
addressvalue
0000db78h
0001db56h
0002db34h
0003db12h
Following this natural flow of universal byte-reversing makes many operations easier. Retrieving the middle significant word out of the 32-bit number shown in the preceding example is as simple as reading a word from address 01 and 02—the word ends up in the processor’s register with the least significant byte in the least-significant byte part of the register.
The use of C and C data types changes some type definitions so that they do not follow the flow of universal byte-reversing; this reduces efficiency in many Flight Simulator computations, but allows the use of C in scenery design.
The following table describe the BGL opcodes and their usage.
Opcode | BGL | Words | Description and format |
0000 | EOF | 1 | End of database; same as BGL_RETURN. Format is word/opcode. Macro is as follows:EOFmacro |
0001 | LOGOL | 1 | Switches context to interpret LOGOL. Format is word/opcode. Macro is as follows:LOGOLmacro |
0002 | NOOP | 1 | No action; skip this instruction. Format is word/opcode. Macro is as follows:NOOPmacro |
0003 | CASE | Macro is as follows:CASEmacrovar_addr,case_fall,c0,c1,c2,c3,c4,c5,c6,c7,c8,c9,c10,c11,c12,c13,c14,c15,c16,c17,c18,c19,c20,c21,c22,c23,c24
|
|
0004 | DEBUG | 1 | Break out to an INT 2, from which debugging can be done. Format is byte/opcode. Macro is as follows:DEBUGmacro |
0005 | SURFACE | 1 | Defines the beginning of a convex non-light source, shaded surface (unless overridden by a CONCAVE command). Note: This command is not normally used. Format is byte/opcode. Macro is as follows: SURFACEmacro |
0006 | SPNT | 4 | Starts surface or line definition. Only use this command for line drawing, not surface definition. Format is word/opcode, as follows: word x-coord byte swapped word y-coord byte swapped word z-coord byte swapped Macro is as follows: SPNTmacroxx,yy,zz |
0007 | CPNT | 4 | Continues surface definition or renders line. Format is word/opcode, as follows: word x-coord byte swapped word y-coord byte swapped word z-coord byte swapped Macro is as follows: CPNTmacroxx,yy,zz |
0008 | CLOSURE | 1 | Renders the polygon. Format is as follows: word opcode=0008h Macro is as follows: CLOSUREmacro |
0009 | GSURF | 1 | Starts a gouraud convex, non-light source shaded surface. Note: This command is not normally used. Format is as follows: word opcode=0009h Macro is as follows: GSURFmacro |
000A | GSPNT | 5 | Starts surface definition. Note: This command is not normally used. Format is as follows: word opcode=000Ah wordcolor i.f wordX wordY wordZ Macro is as follows: GSPNTmacroii,xx,yy,zz |
000B | GCPNT | 5 | Continues surface definition. Note: This command is not normally used. Format is as follows: word opcode=000Bh wordcolor i.f wordX wordY wordZ Macro is as follows: GCPNTmacroii,xx,yy,zz |
000C | GCLOSURE | 1 | Renders a gouraud shaded convex polygon. Note: This command is not normally used. Format is as follows: word opcode=000Ch Macro is as follows: GCLOSUREmacro |
000D | JUMP | 2 | Unconditionally continues processing at new address. Format is as follows: word opcode=000Dh word relative jump address Macro is as follows:
|
000E | DEFRES | 5 | Defines a reserve point vertex. Note: This command is not normally used. Format is as follows: word opcode=000Eh wordreserve point number wordX wordY wordZ Macro is as follows: DEFRESmacron,x,y,z |
000F | STRRES | 2 | Starts polygon or line definition at specified vertex index. Note: Use this command for line drawing only, not surface definition. Format is as follows: word opcode=000Fh wordvertex number Macro is as follows: STRRESmacron |
0010 | CNTRES | 2 | Continues polygon definition at specified vertex index or renders line. Note: Use this command for line drawing only, not surface definition. Format is as follows: word opcode=00010h wordvertex number Macro is as follows: CNTRESmacron |
0011 | GDEFRES | 6 | Defines a gouraud shaded reserve point vertex. Note: This command is not normally used. Format is as follows: word opcode=0011h wordreserve point number wordvertex color i.f wordX wordY wordZ Macro is as follows: GDEFRESmacron,i,x,y,z |
0012 | GSTRRES | 2 | Starts gouraud polygon definition at specified vertex. Note: This command is not normally used. Format is as follows: word opcode=0012h wordvertex number Macro is as follows: GSTRRESmacron |
0013 | GCNTRES | 2 | Continues gouraud polygon definition at specified vertex. Note: This command is not normally used. Format is as follows: word opcode=0013h wordvertex number Macro is as follows: GCNTRESmacron
|
0014 | SCOLOR | Macro is as follows: SETCOLORmacrocolor |
|
0015 | ELEVATION MAP | N | Renders a texture-mapped elevation map. Format is as follows: word opcode=0015h wordX grid size wordZ grid size wordX patch size wordZ patch size wordX displacement wordZ displacement wordY min wordY max byteX,Z,altlsb,altmsb;point 0 x,z,alt byteX,Z,altlsb,altmsb;point 1 x,z,alt . . . Macro is as follows: ELEVATION_MAP macrog_x, g_y, p_x, p_y, d_x, d_y, minalt, maxalt
|
0016 | |||
0017 | |||
0018 | TEXTURED SURFACE | 12 | Defines texture-mapped surface. Specifies and loads texture, and the SURFACE command is executed. Format is as follows: %ibp= opcode %ibp+2= internal ID number %ibp+4= X instance value %ibp+6= Y instance value %ibp+8= Z instance value %ibp+10= 14 character ASCIIZ filename for texture Macro is as follows: TEXTUREmacron,ix,iy,iz,name
Details: System attempts a texture load if the texture isn't already available in a texture slot (as indicated by the TEXTURE command's internal ID number) and sets its variables (bounds, inverse matrix, texture_quality, and so on). The entry in the texture slots for this texture is made and/or updated. If texture loading and setup is successful, texture_flag and texture_avail flags are set to 1. If not, they are set to 0. Factors that can cause an unsuccessful load (and thus non-textured polygon override) are as follows:
A SURFACE command is executed, resetting the edge list pointer and setting the vertex count to -1. |
0019 | SET PALETTE | 8 | Sets top 64 colors (texture map palette) to palette specified in the 14-character file in command. The format is as follows: wordopcode = 0019h bytes14-byte ASCIIZ character file name Macro is as follows: PALETTEmacroname
|
001A | RESLIST | 3+(3*n) | Defines a reserve point vertex list. Format is as follows: wordopcode = 001Ah wordstarting index wordvertex count wordX1 wordY1 wordZ1 wordX2 wordY2 wordZ2 . . . Macro is as follows:
|
001B | |||
001C | |||
001D | FACEN | 9+n | Renders a light-source shaded polygon face. Note: This command is useful for self-modifying code; generally, use the FACET command instead. Bytes: 18+2*n Format is as follows: wordopcode=001Dh wordstart index wordnumber of vertices wordNx wordNy wordNz wordPx wordPy wordPz wordp1 wordp2 . . . Macro is as follows: FACE3macropx,py,pz,nx,ny,nz,p1,p2,p3
|
001E | HAZE | 2 | Sets haze_factor to user's value. Has the following effect on polygon generation, depending on the submitted "n" value:
n=0—copy all pixels from source texture to screen.
Macro is as follows: |
001F | HORIZON | 2 | Turns ground plotting on/off. Note: This command is used by sky/ground system. Format is as follows: wordopcode = 001Fh
wordvalue |
0020 | FACET MAP | Renders a bilinear texture-mapped polygon. Note: You can precede this command with a PERSPECTIVE command in the case of FACET3_TMAP and FACET4_TMAP, as a perspective specifier. Format is as follows: wordopcode=0020h wordnumber of points wordA wordB wordC dwordD wordp1 wordp1X wordp1Y wordp2 wordp2X wordp2Y . . . Macro is as follows: FACET3_TMAPmacroa,b,c,d,p1,t1x,t1z,p2,t2x,t2z,p3,t3x,t3z |
|
0021 | SUPER MESH | Depth sorts rectangular mesh. You can nest this command. Bytes: 14+2*x*z Format is as follows: wordopcode = 0021h wordX grid size wordZ grid size wordX patch size wordZ patch size wordX view wordZ view wordpointer to submesh command . . . Macro is as follows: SUPERMESHmacrox_grid,z_grid,x_patch,z_patch,x_disp,z_disp,x_view,z_view
|
|
0022 | BGL REENTER RETURN | 1 | Returns from subroutine. Format is as follows: wordopcode=0022h Macro is as follows: BGL_RETURNmacro |
0023 | BGL CALL | 2 | Calls a subroutine. Format is as follows: wordopcode=0023h wordrelative address of subroutine Macro is as follows: BGL_CALLmacroroutine |
0024 | IF IN ID | 5 | Compares variable with bounds; takes branch if outside bounds. Format is as follows: wordopcode=0024h wordvariable offset wordlow value wordhigh value wordrelative branch address Macro is as follows: IFIN1macro |
0025 | SEPARATION PLANE | 8 | Tests surface for visibility; takes branch if invisible. Format is as follows: wordopcode=0025h wordrelative branch address wordA wordB wordC dwordD Macro is as follows: SEPARATION_PLANEmacrodest,a,b,c,d
|
0026 | SETWORD | 3 | Sets variable to value. Format is as follows: wordopcode=0026h wordvariable address wordvalue Macro is as follows: SETWRDmacrov,n |
0027 | TEXTURED FACET | 7+n | Renders an arbitrary texture-mapped polygon. Format is as follows: wordopcode = 0027h wordnumber of points wordA wordB wordC dwordD wordp1 wordp2 wordp3 . . . Macro is as follows: BGL_TEXTURED_FACET3 macro a,b,c,d,p1,p2,p3 |
0028 | BALL | Macro is as follows:BALLmacrosize,x,y,z |
|
0029 | GOURAUD RESLIST | 3+(6*n) | Defines vertex list with surface normals for gouraud shading. Format is as follows: wordopcode=0029h wordstarting index wordvertex count wordX wordY wordZ wordNX wordNY wordNZ . . . Macro is as follows: GRESLISTmacrostart,number |
002A | GOURAUD SHADED ABCD FACET | Renders a light-source, gouraud shaded surface. Bytes, 14+2*n. Format is as follows: wordopcode = 002Ah wordA wordB wordC dwordD wordnumber of vertices wordvertex 1 wordvertex 2 . . . Macro is as follows: GFACET3macro |
|
002B | |||
002C | SPHERICAL REJECTION | Takes branch if sphere is invisible. Bytes, 12. Format is as follows: wordopcode = 002Ch wordrelative branch address wordX wordY wordZ wordRadius Macro is as follows: REJECTmacro |
|
002D | SCOLOR | Sets 24-bit color of rendered surface. Note: It's recommended that you use the SCOLOR command, instead. Bytes, 6. Format is as follows: wordopcode=002Dh byteRed byteGreen byteBlue byte0 Macro is as follows: SCOLOR24macro |
|
002E | LCOLOR | Sets 24-bit color of lines. Note: It's recommended that you use the LCOLOR command, instead. Format is as follows: wordopcode=002Eh byteRed byteGreen byteBlue byte0
Macro is as follows: |
|
002F | SCALE | Sets design scale and location. Branches if out of viewing range. Bytes, 32. Macro is as follows: SCALE skip,signal,size,scale,lat,lon,alt(radsortable) |
|
0030 | SET BRIGHTNESS | Sets brightness level of non-light source shaded entity used for line drawing. Bytes, 4. Format is as follows: wordopcode=0030h wordbrightness level .ff Macro is as follows: SET_BRIGHTNESS |
|
0031 | Macro is as follows: RESROWmacro |
||
0032 | ADDOBJ | Adds object routine to radsort list. Bytes, 4. Format is as follows: wordopcode=0032h wordrelative address Macro is as follows: ADDOBJmacrodest |
|
0033 | INSTANCE_CALL | Changes the reference frame around the current scale point for a subroutine call. You can nest this command. Bytes, 10. Format is as follows: wordopcode=0033h wordrelative address wordpitch wordbank wordheading Macro is as follows: INSTANCE_CALL |
|
0034 | SUPER_SCALE | Scales selection for gouraud shaded models, down to 1/65536 of a meter. Use POSITION or VPOSITION to position the scale point. Models drawn in this scale must use the full dynamic range of the scale. This command has built-in radius checking. If the radius is exceeded, a jump occurs. As a result, you can vector off to a more appropriate scale if overflow occurs because the specified radius is exceeded. Bytes, 4. Format is as follows: wordopcode=0034h worddesign scale Macro is as follows: SUPER_SCALEmacro
|
|
0035 | PNTROW | Renders a row of points. Bytes, 16. Format is as follows: wordopcode = 0035h wordstart point X wordstart point Y wordstart point Z wordend point X wordend point Y wordend point Z wordnumber of reserve points Macro is as follows: PNTROWmacro |
|
0036 | PNTROWM | Renders a masked row of points. Bytes: 8+2*(int(n/16)+1) Format is as follows: wordopcode=0036h wordstart point X wordstart point Y wordstart point Z wordend point X wordend point Y wordend point Z wordnumber of reserve points wordmask words . . . |
|
0037 | PNT | Renders a point (dot). Bytes, 8. Format is as follows: wordopcode=0037h wordX wordY wordZ Macro is as follows: PNTmacrox,y,z |
|
0038 | CONCAVE | Concave override, for following a FACE/FACET definition. Bytes, 2. Format is as follows: wordopcode = 0038h Macro is as follows: CONCAVE macro |
|
0039 | BGL IFMASK | If (variable & bitmask)==0 goto address. Format is as follows: wordopcode=0039h wordrelative address wordvariable offset wordbitmask Macro is as follows: IFMSKmacro
|
|
003A | BGL VPOSITION | Position of scale point for SUPER_SCALE. Bytes, 4. Format is as follows: wordopcode=003Ah wordvariable address Macro is as follows: VPOSITIONmacro
|
|
003B | VINSTANCE_CALL | Changes reference frame for subroutine call. Bytes, 6. Format is as follows wordopcode=003Bh wordroutine address wordvariable address Macro is as follows: VINSTANCE_CALL |
|
003C | POSITION | Position of scale point for SUPER_SCALE command. Bytes, 20. Format is as follows: wordopcode=003Ch 3wordlatitude 3wordlongitude 3wordaltitude Macro is as follows: POSITIONmacro |
|
003D | SEED | 12 | Renders a scenery-synthesis object. Format is as follows: wordopcode=003Dh dw3dh;opcode ddtype;class and type ddxsize;iiii M ddzsize;iiii M ddrealalt;ii.ff M dwlatgrid;lat seed grid coord south edge dwlongrid;lon seed grid coord west edge
dwnumber;random number |
003E | FACETN | Renders a light-source shaded polygon. Bytes: 14+2*n Format is as follows: wordopcode=003Eh wordvertex count wordA wordB wordC
dwordD |
|
003F | SHADOW CALL | Calls subroutine and projects points on the ground as the object's shadow. Bytes, 4. Format is as follows: wordopcode=003Fh wordrelative address Macro is as follows: SHADOW_CALLmacro |
|
0040 | SHADOW VPOSITION | Positions shadow for object not on ground. This position is used by the SHADOW_VICALL command to position the aircraft's shadow. Bytes, 4. Format is as follows: wordopcode=0040h
wordpointer to lat/lon/alt block |
|
0041 | SHADOW VINSTANCE CALL | Calls subroutine and projects instanced shadow of aircraft on the ground from the SHADOW_VPOSITION. The shadow is only projected if Aircraft Shadow=On and shadow_density=nz. This command is for aircraft projection use only. Bytes, 6. Format is as follows: wordopcode=0041h wordrelative address wordpointer to pbh 32-bit block Macro is as follows: SHADOW_VICALL macro |
|
0042 | POLYGON_RUNWAY | Starts definition of runway. Bytes, 2. Format is as follows: wordopcode=0042h |
|
0043 | - | Ends definition of runway. Bytes, 2. Format is as follows: wordopcode=0043h |
|
0044 | Renders a runway. Format is as follows: wordopcode=0044h Macro is as follows: TEXTURE_RUNWAY macro
|
||
0045 | STROBEROW | Renders a flashing row of dots. Bytes, 16. Format is as follows: wordopcode=0045h
wordstart point X |
|
0046 | POINT VICALL | Changes reference frame around a given point in the design. Bytes, 20. Format is as follows: wordopcode=0046h wordX wordY wordZ wordfixed pitch addition wordpointer to pitch variable or (0) if none wordfixed bank addition wordpointer to bank variable or (0) if none wordfixed heading addition wordpointer to heading variable or (0) if none Macro is as follows: POINT_VICALLmacro |
|
0047 | MAP SCALE | Sets scale from 24–31 for rendering large objects (for example, the earth). Scale point is around the POSITION OR VPOSITION. Bytes, 4. Format is as follows: wordopcode = 0047h wordscale Macro is as follows: MAP_SCALEmacro |
|
0048 | VAR_SEG | Sets new variable segment for commands that use variables. Bytes, 4. Format is as follows: wordopcode=0048h wordsegment address, or 0 for default Macro is as follows: VAR_SEGmacro |
|
0049 | BUILDING | Draws a building from BGL internal library. Bytes, 10. Format is as follows: wordopcode=0049h wordbuilding type wordnumber of stories wordX size in meters wordZ size in meters Macro is as follows: BLDINGmacro |
|
004A | LANDING LIGHTS | Macro is as follows:LANDING_LIGHTS_VICALL macro
|
|
004B | OVERLAY_CALL | Macro is as follows:BGL_OVERLAYmacro |
|
004C | VSCALE | Scales a command from a variable. Bytes, 6. Format is as follows: [word]opcode=4ch [word]skip addrress (relative) [word]to see from radius (in meters, 0 = ignored) [word]object size radius (in scale units, 0 = ignored) [word]radsort entry ptr [dword]scale factor (if negative, no biases present) [word]ptr to LATLONALT Macro is as follows: VSCALEmacro |
|
004D | VAR2LOW64K | Transfers a variable from var_seg to low64k_seg. Bytes, 6. Format is as follows: wordopcode=4dh wordsource wordtarget Macro is as follows: VAR2LOW64Kmacro |
|
004E | LOW64K2VAR | Transfers a variable from low64k_seg to var_seg. Bytes, 6. Format is as follows: wordopcode=4eh wordsource wordtarget Macro is as follows: LOW64K2VARmacro |
|
004F | MOVWRD | Transfers a variable from var_seg to var_seg. Bytes, 6. Format is as follows: wordopcode=4fh wordsource wordtarget Macro is as follows: MOVWRDmacro |
|
0050 | GCOLOR | Sets gouraud light-source shaded surface color. Bytes, 4. Format is as follows: wordopcode=50h wordcolor code Macro is as follows: GCOLORmacrocolor |
|
0051 | LCOLOR | Sets line color. Bytes, 4. Format is as follows: wordopcode=51h wordcolor code Macro is as follows: LCOLORmacrocolor |
|
0052 | SCOLOR | Sets light-source shaded surface color. Bytes, 4. Format is as follows: wordopcode=52h wordcolor code Macro is as follows: SCOLORmacrocolor |
|
0053 | GCOLOR_ABS | Sets gouraud-shaded light source shaded surface color. Use GCOLOR command when specifying existing color ranges. Use this command for special custom colors only. Bytes, 6. Format is as follows: wordopcode=53h wordstarting color i.f wordending color i.f Macro is as follows: GCOLOR_ABSmacro |
|
0054 | AMSCALL | Calls an assembly language subroutine. Use only in internal Flight Simulator databases; for example, use for internal seed generation routines. Bytes, 6. Format is as follows: wordopcode;opcode=54h wordrelative offset wordsegment ;0=low64k seg ;1=current BGL seg ;>1=set seg to this ; (absolute seg) Note: This instruction does add the BGL seg's IBP to the offset value; for example, even if you want to call a routine at low64k:1000h, if the ASMCALL is at bglseg:200h, set relative offset to 0e00h (1000h–200h) and segment to 0. Also, the assembly language subroutine must end with a far return. Macro is as follows: ASMCALLmacro |
|
0055 | SET SURFACE TYPE | Sets scale to any valid unit of measurement. Bytes, 10. Format is as follows: wordopcode=55h wordskip address wordsize of radius in scale units for spherical rejection dwordii.ff units per meter Macro is as follows: SET_SURFACE_TYPE |
|
0056 | SET_WEATHER | Macro is as follows:SET_WEATHERmacro |
|
0057 | WEATHER | Macro is as follows:WEATHERmacro |
|
0058 | TEXTURE BOUNDS | Macro is as follows:TEXTURE_BOUNDS macro |
|
0059 | VAR_SEG_ID | Macro is as follows:VAR_SEG_IDmacro |
|
005A | SEED ADDOBJ COMMAND | Points to BGL code (SCALE, SEED, BGL_RETURN, and so on) that is then executed. (The code may or may not draw items on the screen at this time.) When BGL code is finished running, the radsort_me flag is tested. If the BGL code set this flag, the BGL code pointed to by this command is inserted into the radsort list (usually occurs when mountains or buildings generated by the seed need to be generated at radsort time). Note: The SEED command looks at the radsort_flag to determine what action to take. For example, the CITY SEED command only sets the radsort_me flag if radsort_flag=0, and generates buildings if radsort_flag=1. The macro is as follows: SEED_ADDOBJmacro |
|
005B | INDIRECT CALL | Executes the BGL database pointed to by the specified variable. Format is as follows: dw5bh dwvariable;in BGL's segment assumed Note: Variable contains a single word that is the absolute address in the BGL segment where this BGL database exists. The database must end with a BGL_RETURN. Macro is as follows: INDIRECT_CALL |
|
005C | BGL_FAR_CALL | Macro is as follows:BGL_FAR_CALLmacro |
|
005D | TEXTURE_REPEAT | Macro is as follows:TEXTURE_REPEAT macro |
|
005E | TEXTURE_ROTATE | Macro is as follows:TEXTURE_ROTATE macro |
|
005F | IF APPARENT SIZE | Macro is as follows:IFSIZEV macro |
|
0060 | FACE TMAP | Macro is as follows:FACE3_TMAPmacro |
|
0061 | RESLIST SCALE | Obsolete, don't use. | |
0062 | IFVIS | Macro is as follows:IFVIS4macro |
|
0063 | BGL_LIBRARY | Macro is as follows:BGL_LIBRARYmacro |
|
0064 | SYNTH BUILDINGS | Don't use. | |
0065 | VSCOLOR | Macro is as follows:VSCOLORmacro |
|
0066 | VGCOLOR | Macro is as follows:VGCOLORmacro |
|
0067 | VLCOLOR | Macro is as follows:VLCOLORmacro |
|
0068 | TMAP LIGHT SOURCE SHADE | Macro is as follows:TMAP_LIGHT_SHADE |
|
0069 | ROAD start | Macro is as follows:ROAD_STARTmacro |
|
006A | ROAD continue | Macro is as follows:ROAD_CONTmacro |
|
006B | RIVER start | Macro is as follows:RIVER_STARTmacro |
|
006C | RIVER continue | Macro is as follows:RIVER_CONTmacro |
|
006D | IF APPARENT SIZE | Macro is as follows:IFSIZEHmacro |
|
006E | TAXIWAY START | Macro is as follows:TAXIWAY_START macro |
|
006F | TAXIWAY END | Macro is as follows:TAXIWAY_CONT macro |
|
0070 | AREA SENSE | Macro is as follows:AREA_SENSE4macro |
|
0071 | ALTITUDE SET | Macro is as follows:ALTITUDE_SETmacro |
|
0072 | APPROACH | Macro is as follows:APPROACH_LIGHTS
|
|
0073 | IF PLANE IN BOX | Using this command, the plane's x, y ,z location in scale 16 (1m/unit) is computed as 16-bit pxv, pyv, pzv. The 16-bit pxv,pyv,pzv is compared against the box defined by lowx-highx, lowy-highy, lowz-highz. If it isn't in the box, the branch is taken. Note: These ranges are not design units, but rather scale 16. If a building's center is at 0, 0, 0 in the current scale factor and the building is 20m wide, the lowx - highx should be -10, +10, regardless of scale factor. This command interprets nested rotations, but doesn't interpret translational offsets within a rotation. It uses a rotational heading value that is all the headings of all the instance levels added together. This works as long as all the nesting has been flat (rotations only around the y axis). The x,y,z offset within a VICALL are ignored. The macro is as follows: IFINBOXPmacro |
|
0074 | ADD CATEGORY | 3 | Adds the BGL fragement that is pointed to, to the categories list to be executed at category execute time (after pre-radsort and object projection, but before elements are executed and radsort). You must specify the category number (cat=0–63); this number controls the sequence of projection. Lower categories are executed first (BGL fragments added to category 4 are executed before fragments in category 5). BGL fragments within a single category are executed in the order in which they are submitted by the ADDCAT command (first submitted, first executed). The ADDCAT command saves the bgl_page and file_number when it is executed. As a result, this command must only be executed during object16 projection time (not while in a radsorted object or within other categories). Format is as follows: dw74h ;ADDCAT op dwbgl_frag_ptr ;relative, in this seg dwcat ;category # 0–63 Macro is as follows: ADDCATmacro |
0075 | ADD MOUNTAIN | Adds item that is pointed to, to the mountain radsort list. Much the same as the ADDOBJ command, but specific to the mountain radsort list. Macro is as follows:
|
|
0076 | BGL OP | Switches to BGL execution (if in LOGOL). If no BGL, performs NOOP and triggers the warning "BGL command in middle of BGL" using a TRAP_INT3 if in debug mode. Macro is as follows: BGLmacro |
|
0077 | SCALE AGL | Command includes radius and skip vector. Current ground altitude (seed_ground_alt, 48-bits) is copied into the SCALE command and a bgl_scale command is executed. Note: This command is self-modifying. You can submit 0s as alt, altf and they will be overridden by seed_ground_alt when this command is executed. Macro is as follows: SCALE_AGLmacro |
|
0078 | ROAD CONTW | Macro is as follows:ROAD_CONTWmacro |
|
0079 | RIVER CONTW | Macro is as follows:RIVER_CONTWmacro |
|
007A | GSHADE TMAP FACET | Macro is as follows:GFACET3_TMAPmacro |
|
007B | GSHADE TMAP FACE | Macro is as follows:GFACE4_TMAPmacro |
|
007C | POLY LINE FACET | Macro is as follows:POLYLINE_FACET macro |
|
007D | PERSPECTIVE OVERRIDE | Sets perspective override for next facet_tmap. Sets perspective_flag=1; this causes the next facet_tmap (bilinear interpolated texture map with backside elimination) to be handled by a special processor if it is a 3- or 4-vertex case. Macro is as follows: PERSPECTIVEmacro |
|
007E | SETWORD LOW64K VAR | Macro is as follows:SETWRD_LOW64K |
|
007F | CITY | Macro is as follows:CITYmacro |
|
0080 | RESERVE PNT DRAW | Macro is as follows:RESPNTmacron |
|
0081 | ANTI-ALIAS ON/OFF | Sets the anti-alias value (0 or 1) that is combined with image_smoothing to form anti_alias (a rootvar variable). Anti-aliasing color dithering is performed by the polygon generators and texture mappers when anti_alias is on. One or more BGL commands can be bracketed with an ANTI_ALIAS 1 and ANTI_ALIAS 0 command to indicate that these items should be dithered if image smoothing is set to 1. Macro is as follows:ANTI_ALIASmacro |
|
0082 | SHADOW POSITION | Macro is as follows:SHADOW_POSITION macro |
|
0083 | RESCALE | Using its scale point, rescales from a previous scale command. Macro is as follows:RESCALEmacro |
|
0084 | SURFACE NORMAL | Macro is as follows:SURFACE_NORMAL macro |
|
0085 | ASD NAME | ||
0086 | PAGE FAULT | ||
0087 | FIXED COLORS | Time adjusts only the first "n" colors of the texture map palette; fixes the rest to the original palette value. Macro is as follows:NIGHT_COLOR_RANGE |
|
0088 | FILE NUMBER MARKER | Macro is as follows:FILE_MARKERmacro |