While designing scenery, it's inevitable that you'll want to replace existing geographic features and objects with scenery that you've designed. The Flight Simulator scenery system includes a built-in strategy to handle this scenario, exception entities. This topic details the different methods you can use to make this strategy work for your particular scenery design. The different methods are based on either seed or object priorities.
In Flight Simulator, overlapping seeds from different BGL databases are assigned priority based on design layer, the seed priority system, seed level (8–13), and seed altitude. For seed priority details, see the topic Seed Priority Rules and Guidelines.
You can manipulate object priorities by using the following:
The following example illustrates one method of excluding an object, object exception.
EX_OBJ macro nhi,nlo,ehi,elo,near_far,cnt1,[cnt2],[cnt3]
db4;;00 opcode Exclude OBJ
dwnlo;;01 latitude iiii M units
dwnhi
dwelo;;05 longitude 32-bit pseudo
dwehi
dbnear_far;;09 xxxxxxx1=exclude near object
xxxxxx1x = exclude far object
xxxxx1xx = exclude near/far object
dbcnt1;;10 byte count lsbyte for 1st obj type
dbcnt2;;11 byte count lsbyte for 2nd obj type
dbcnt3;;12 byte count lsbyte for 3rd obj type
endm
Another method you can use to block existing scenery is range inclusion. You can include a one range inclusion command per BGL file. Only one range inclusion command per BGL file is allowed, and the command must be the first item in the exceptions database. The command specifies a rectangular (north, south, east, west) range that the design area covers.
When the file list is built by the front-end processor, both the inclusion range and scenery layer of the BGL file are included in the file list. When objects are retrieved from the database, the inclusion range and scenery layer are used to filter all objects extracted from the database. If an object is at a higher layer and is within the inclusion bounds, it isn't passed to the BGL system. You can set the inclusion type mask to specify the type of filtering you want. The filters are as follows:
incl_mask_object=0000000000000001b
incl_mask_vor=0000000000000010b
incl_mask_adf=0000000000000100b
incl_mask_com=0000000000001000b
These filters are useful when you want to eliminate an area's visual designs (objects) and replace them with your own designs, while keeping all the navigation aids from the default database intact. The following example shows an inclusion range and type storage in a file list.
;VIRTUAL MEMORY FILE LIST BUFFER STRUCTURE ********************************
FILE_LIST2_ENTRYstruc
file_name_fielddw0,0,0,0;000
file_bounds_fielddw0,0,0,0,0,0,0,0;008
file_vor_ptrdw0,0;024
file_vor_lodw0;028
file_vor_hidw0;030
file_seed_level_8dw14 dup(0);032
file_seed_level_15dw0,0;060
file_object_ptrdw0,0;064
file_library_ptrdw0,0;068
file_facilities_ptrdw0,0;072
file_anchor_ptrdw0,0;076
file_com_ptrdw0,0;080
file_adf_ptrdw0,0;084
file_dyn_path_ptrdw0,0;088
file_library_mindw0,0,0,0;092
file_library_maxdw0,0,0,0;100
file_misc_data_ptrdw0,0;108
file_title_descriptiondw0,0;112
file_magvar_ptrdw0,0;116
file_exceptions_ptrdw0,0;120
file_extdb3 dup(0);124
file_pathdb61 dup(0);127 \scenery assumed. not included
file_layerdw0;188 layer
file_inclusion_typedw0;190 inclusion type (0 if none)
file_inclusion_northdw0,0;192 inclusion bound N
file_inclusion_southdw0,0;196 inclusion bound S
file_inclusion_eastdw0,0;200 inclusion bound E
file_inclusion_westdw0,0;204 inclusion bound W
file_list_sparesdb48 dup(0);208
file_list_struc_sizedw0;256
FILE_LIST2_ENTRYends
The following example shows the database specification of an inclusion item.
;DATABASE HEADER ********************************************************
dw0001;00 world set number (not saved to file list)
dd0004c4eabh;02 N bound 43 degrees meter units
dd000400000h;06 S bound
dd0cf000000h;10 E bound 85 degrees 32-bit pseudo
dd0bf000000h;14 W bound
dd0;18 VOR_DATA
.
.
.
ddEXCEPTIONS_DATA;114 EXCEPTION LIST PTR (points at exception list)
.
;Inclusion Entity Definition
inclusion_opcode=3
incl_mask_object=0000000000000001b
incl_mask_vor=0000000000000010b
incl_mask_adf=0000000000000100b
incl_mask_com=0000000000001000b
INCLUSION_ITEMstruc
inclusion_opdb0
inclusion_maskdw0
inclusion_northdw0,0
inclusion_southdw0,0
inclusion_eastdw0,0
inclusion_westdw0,0
inclusion_item_sizedw0
INCLUSION_ITEMends
;INCLUSION ENTITY OPCODE DEFINITION
INCLUSION_RANGE macro nhi,nlo,shi,slo,ehi,elo,whi,wlo,mask
db3;;00 op
dwmask
dwnlo,nhi;;n,s items are 512m/unit
dwslo,shi
dwelo,ehi;;e,w items are 16-bit pseudodeg.
dwwlo,whi
endm
EXCEPTIONS_DATA:
rel_base=EXCEPTIONS_DATA
INCLUSION_RANGE46h,0fc00h,46h,0fb00h,0c1c3h,0af40h,0c1c3h,0af00h,0003h
EOL
The following is an example of a range inclusion opcode that masks objects on lower layers within the defined area.
INCLUSION macro north,south,east,west,mask
db3;;00 opcode Exclude OBJ
dwmask;;01 inclusion type mask
;; ...............1=objects
;; ..............1.=vors
;; .............1..=adfs
;;............1...=com
ddnorth;;03 north M units (inclusive)
ddsouth;;07 south M units (inclusive)
ddeast;;11 east 32-bit pseudodegrees (inclusive)
ddwest;;15 east 32-bit pseudodegrees (inclusive)
endm