SCLINK 2.41

Scenery Linker for SCASM output files


The Scenery Assembler SCASM can only handle one latitude range per output BGL file and all sections in the same output BGL have the same latitude range. Also, in large scenery developments, it is generally useful to split up the source text into several files, each generating its own BGL, because then you do not need to assemble/compile the entire development after making only a minor modification. Hence, a utility to combine BGLs into one file, with one or more latitude ranges, is useful.

SCLINK is such a combining utility.
This version is designed to link up to 500 files together.

SCLINK 2.14 is a simple Win32 console application which looks like a DOS program. It needs command line parameters to recognise what you want it to do. As you can see below there are two ways to call SCLINK. If you have only a few files you can enter all parameters in the command line. The options can be omitted if not needed. If you cannot put all filenames in the command line you can write the names into a control file (pure ASCII text !) and then start SCLINK with the name of the control file as the ONLY parameter.

Syntax:
  SCLINK [-options] output.bgl input1.bgl ... input#.bgl
or
SCLINK ctrlfile.scl

If only one command line parameter is present it must be the name of a control file which contains more parameters/names. The control file must contain only one option or one filename per line. Comment lines are allowed if they start with a ';' character. If using a control file, any options required must be in this file and not on the command line. Do not use TAB characters in this file.

Attention: The first filename is always the name of the output file.

Options must begin with a '-' sign and should appear in the command line or the control file prior to file names. Options are separated by spaces in the command line or new lines characters in the control file.

List of options:
 
-t#  the following number is the BGL file type (ID). This is a number 1...4 and is normaly filled in by SCLINK. SCLINK scans all input files and chooses the lowest number.
-cTEXT  You can enter one line of copyright text to be included in the destination file. The text starts immediately after the "c" and is limited to 128 characters.
-o  If this option switch is set, SCLINK tries to optimise the latitude records in the file. If SCLINK finds identical boundary definitions in different BGL files they are combined. This can save some bytes.
-s  Sort on. This option forces SCLINK to sort the latitude ranges. This version only suports a sort from the north to the south. A sort can improve the optimiser run in most cases but can also give strange results in the visual scenery section (9) if the boundaries are not carefully chosen (see the note below).
-mXXXX  This option is used to set the internal section mask. The default value is 0xFFFFFFFF. There is one bit for every section. You must be familar with hex arithmetic to use this option. Normally not needed. Can be used to suppress unknown sections and the resulting error message.
-e  Combines all menu entries into one airport menu. The menu description is taken from the first file from the link list. (not fully tested!)


Many known 3rd party BGL compilers will insert a signature and a copyright information into its output file. SCLINK recognises such signatures if they are inserted immediately behind the file header, and copies that one from the first input file into its own output file after inserting its own signature. For batch job users: SCLINK now returns a result value of 1 if an error is detected, otherwise 0.

Note:
The data in FS5 scenery files are organised in latitude bands. If you decide to use several SCASM source files for the same latitude bands, SCLINK, with the -o switch active, can combine them to one if the following range span is equal or smaller than the previous one.

If you have designed a large area consisting of a larger number of latitude ranges the result may be better if you also activate the -s (sort) switch. However, this can cause some strange effects in the visual scenery section if the file boundaries are not carefully chosen and/or the scenery contains sequence sensitive codes. This may happen if you have all the ground polygons in one file and roads in another one (if the road file does not use scenery layer management, (-> SCASM LayerCall instruction). If the file boundaries are equal, the data will appear in the destination file in the same order you entered the input filenames. In this version only the sections 0 (NAV aids), 9 (visual), 13 (ATIS), 14 (NDB), 15 (DYN) and 16 (Marker...) can be sorted and optimised. Section 0 (navaids) will always be optimised.

Limitations:
This version is designed to handle 500 (200 before 2.40) input files. Only known sections can be linked together. Unknown sections will produce errors. In section 19 (exclude files), SCLINK may find some unknown data structures which cannot be linked. You will receive an error message if this happens. (There are no 3rd party BGL's found with such data.)
BGL library data (section 10) and new facility data (section 20) and DEM data (section 7 & 8) cannot be handled by this version. SCLINK cannot handle FS2K's compressed BGL files.

What is new:

2.14:  The GPF error wich sometimes appears is fixed. This has taken so long because the users who reported this problem refused to send me the trouble making files... This version also can handle the new Area types in the CFS/FS2K BGL's.
2.40:  Number of input files has been increased to 500 and the buffering has been improved
2.41:  When linking section 19 (exclude data) exception data records do not longer cause to stop SCLINK.

Many thanks to:

  Tom Monnone for help and testing.
  Rafael Sanchez


© by Manfred Moldenhauer