The Object Source Code File (.sca)
The Object Source Code File (sca)
FSDS-generated object source files have the extension .sca. Other valid extensions for this file type include .scx and .scm.

The object source code file, or SCA file, is simple ASCII text, so it can be read and edited with a text editor, e.g. NotePad, WordPad, etc.. In fact, with the help of a simple text editor, you can make some remarkable scenery objects by hand coding alone!

You'll recognize a number of things in the SCA file that seem familiar, such as labels that contain model part names.

To give you a better idea of the SCASM language features found in an FSDS object source code file, here is an annotated listing of the object source code file, fxbreak.sca.

The actual code is displayed in blue text. Moving your cursor over a command line will give you more information about that command.

;SCASM source file created by FS Design Studio v2
;FX Break
;
;Copyright 2003
;

Header( 1 48:30:00.0000 42:00:00.0000 -90:30:00.0000 -96:30:00.0000 )
LatRange( 42:00:00.0000 48:30:00.0000 )

Set( BUF 1024 )
Set( areamx 1024 )
Set( LINBUF 2048 )

Area( 5 45:03:40.8 -93:21:12.6 35 )

PerspectiveCall( :PCall )

ShadowCall( :PCall2 )

Jump32( :Exit )

:PCall
Perspective

:PCall2
RefPoint( 7 :Skip 0.001000 45:03:40.8 -93:21:12.6 E= 275 v1= 32000 V2= 8 )

Jump( :Continue )

NOTE
There is a special kind of jump command ... Jump ( : ) ... that causes the program to jump to the physical end of the SCASM code, i.e. to the EndA command at the end of the code.

:Skip
Return

:Continue
; CRASH Detection
IfVarRange3( :NoCrash 37E -4136 4136 382 -1074 1214 386 -3049 2093 )
SetVar( 0284 14 )

:NoCrash
BGLVersion( 0732 )

TextureList( 0
6 FF 255 255 255 0 6.096000 "FX_props.bmp"
)

MaterialList( 0
0.752941 0.752941 0.752941 1.000000 0.250980 0.250980 0.250980
1.000000 0.000000 0.000000 0.000000 1.000000 0.000000 0.000000
0.000000 1.000000 0.000000
0.250980 0.250980 0.250980 1.000000 0.250980 0.250980 0.250980
1.000000 0.000000 0.000000 0.000000 1.000000 0.125490 0.125490
0.125490 1.000000 0.000000
0.000000 0.956863 0.000000 1.000000 0.250980 0.250980 0.250980
1.000000 0.501961 1.000000 0.501961 1.000000 0.000000 0.000000
0.000000 1.000000 250.000000
...... ;List has been shortened to save space.
)

VertexList( 0
-129.491776 129.491486 -129.491562 0.000000 0.000000 -1.000000
0.000000 0.000000
-129.491486 -129.491776 -129.491562 0.000000 0.000000 -1.000000
0.000000 0.000000
129.491776 -129.491486 -129.491562 0.000000 0.000000 -1.000000
0.000000 0.000000
...... ;List has been shortened to save space.
)

; Draw Main Model
Call32( :_tmp_0_fuselage_1 )
Call32( :_tmp_0_tail_88 )
Call32( :_tmp_0_DB_tail_91 )

EndVersion

Return

; Part: fuselage
:_tmp_0_fuselage_1
; VISIBLE_ALLOTHER parameter check ... is the rest of the aircraft gone?
IfVarAnd( :RET0 90 8 )

Jump( :GO0 )

:RET0
Return

:GO0
Transform_Mat(
0.000000 0.000000 0.000000
1.000000 0.000000 0.000000
0.000000 1.000000 0.000000
0.000000 0.000000 1.000000
)

SetMaterial( 0 -1 )
DrawTriList( 24
24 25 26
24 26 27
...... ;List has been shortened to save space.
12 21 22
12 22 23
)

Call32( :_tmp_0_DB_nose_89 )
Call32( :_tmp_0_DB_fuselage_90 )
Call32( :_tmp_0_DB_r_wing_92 )
Call32( :_tmp_0_DB_l_wing_93 )
Call32( :_tmp_0_DB_r_wingtip_94 )
Call32( :_tmp_0_DB_l_wingtip_95 )
Call32( :_tmp_0_DB_vertical_96 )
Call32( :_tmp_0_DB_r_horizontal_97 )
Call32( :_tmp_0_DB_l_horizontal_98 )
Call32( :_tmp_0_windscreen_101 )
Call32( :_tmp_0_f_canopy_102 )

TransformEnd

Return

; Part: DB_nose
:_tmp_0_DB_nose_89
IfVarAnd( :RET10 90 8 )
Jump( :GO10 )
:RET10
Return
:GO10
Transform_Mat(
0.000000 0.000000 0.000000
1.000000 0.000000 0.000000
0.000000 1.000000 0.000000
0.000000 0.000000 1.000000
)

SetMaterial( 4 -1 )
DrawLineList( 1253
0 1
1 2
...... ;List has been shortened to save space.
22 23
23 20
)

TransformEnd
Return

...................... ;Remainder of object source code follows

:Exit
EndA

NOTE
Every object source code file must end with the "EndA" command!