The .SL File Format
The are two kinds of .SL files, Single Brick Files and SL Libraries.
So far, there are 206 Single Brick Files and two Library Files.
A library can contain up up 256 bricks, so there's still room for more.
Some bricks need two files, but most bricks need four files, one for
each 90 deg. rotation.
If you wish to edit a library, you must first edit the single brick
and then recompile the library.
Or you can choose to have the single brick file outside the library.
SimLego first looks for a single brick file, and only if it wasn't
found, the program opens the library.
Here are the Single Brick Files that make the libraries:
x4lib.zip 28 k Latest update: 970808
x8lib.zip 63 k Latest update: 970809
And here are the utilities to build libraries:
libx4exe.zip 25 k Latest update: 970803
libx8exe.zip 25 k Latest update: 970803
Max chars.
Example:
"4x2 Default Brick"
Type 43 = x8 Library
Type 44 = x4 Library
Example:
43
999 = Current drawing colour
Example:
999
1 = Yes
0 = No
Example:
1
Default values for the three variables above are:
43 999 1
A fighead though, will be:
43 14 0
sinceit's always yellow.
Used for marking out "Busy Flags"
Example (4x2 Default Brick):
3 2 4
Change to ... if button ... is clicked
!!!! = Button Disabled
decrease height, increase height, decrease depth, increase depth, decrease
width, increase width, rotate left, rotate right
Example:
!!!! !!!!, x821 x841, !!!! !!!!, x832 x830
Begin with T:
Terminate with $
Default Brick Top with Studs
Default Tile Top without Studs
Step right to next stud area
Step right to next stud line
Flood area with current drawing colour, then draw border line to the Left,
Top, Right, or Bottom
Just draw border line to the Left, Top, Right, or Bottom
Draw diagonal line in border colour.
Flood area, draw frame, and remove stud (if any)
Flood area and remove any border line or stud
Draw a stud
Draw a circle a flood it.
Draw 1/4 circle and fill it.
0 1
2 3
Draw 1/4 circle and fill outside.
4 5
6 7
3D Rendering Macros, char 1&2
Begin 3D Rendering Macros with D:
Terminate with $ after the last macro.
Set flooding colour.
Left Side. Draw only if eye position is to the left of object.
Left Side. Always draw.
Right Side. Draw only if eye position is to the right of object.
Note that the 'o' option is not yet supported by SimLego.
Back, Front, Top, Misc.
Note that normally, Back is not drawn.
3D Rendering Macros, char 3&4
Filled polygon.
Example:
La04:x,y+4,Z. X-10,Y,Z. X-10,Y,z. x,y+4,z.
Rectangle. Rx for sides, Ry for top, Rz for front.
Special case - top:
Draw a top with studs:
TaRy:x,Y,Z. X,Y,z.
Draw a top without studs:
TaRy:x,y,Z. X,y,z.
Draw a stud.
Example. Draw a stud on the top:
TaSx:x+10,Y,Z-10.
Draw a circle.
Draw a cylinder.