|
The Tires
Stock Animation
|
Template Original SCA Code Edited SCA Code
There are six tires to animate: c_tire_still, c_tire_blurred, l_tire_still, l_tire_blurred, r_tire_still, and r_tire_blurred, each visible within a specific RPM range. All six wheels use the same template.
VAR1 - hex offset to the variable tire_rpm (wheel speed) VAR2 - hex offset to the variable tire_pos (wheel position).
; Part: PARTNAME
:PARTLABEL
IfVarRange( :RETPARTNAME VAR1 0 8192 )
Jump( :PARTNAME )
:RETPARTNAME
Return
:PARTNAME
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
)
TransformCall( :DrawPARTNAME 0 0 0 0.000000 VAR2 0.000000 0x00 0.000000 0x00 )
TransformEnd
Return
:DrawPARTNAME
SetMaterial( m t )
DrawTriList( index ... vertex indices ... )
Return
Original SCA Code Template Edited SCA Code
This is the original object source code for c_tire_still and c_tire_blurred generated by FSDS Pro v2.33 from fxpaint.fsc.
; Part: c_tire_still
:Part000076
Transform_Mat(
0.000000 -21.067778 -68.821404
1.000000 0.000000 0.000000
0.000000 1.000000 0.000000
0.000000 0.000000 1.000000
)
SetMaterial( 1 -1 )
DrawTriList( 652
0 1 2
0 2 3
4 5 6
4 6 7
8 9 10
8 10 11
12 13 14
12 14 15
16 17 18
16 18 19
20 21 22
20 22 23
24 25 26
24 26 27
28 29 30
28 30 31
32 33 34
32 34 35
36 37 38
36 38 39
40 41 42
40 42 43
44 45 46
44 46 47
48 49 50
48 50 51
48 51 52
48 52 53
48 53 54
48 54 55
48 55 56
48 56 57
48 57 58
48 58 59
60 61 62
60 62 63
60 63 64
60 64 65
60 65 66
60 66 67
60 67 68
60 68 69
60 69 70
60 70 71
)
TransformEnd
Return
; Part: c_tire_blurred
:Part000079
Transform_Mat(
0.000000 -21.067778 -68.821404
1.000000 0.000000 0.000000
0.000000 1.000000 0.000000
0.000000 0.000000 1.000000
)
SetMaterial( 2 -1 )
DrawTriList( 868
0 1 2
0 2 3
4 5 6
4 6 7
8 9 10
8 10 11
12 13 14
12 14 15
16 17 18
16 18 19
20 21 22
20 22 23
24 25 26
24 26 27
28 29 30
28 30 31
32 33 34
32 34 35
36 37 38
36 38 39
40 41 42
40 42 43
44 45 46
44 46 47
48 49 50
48 50 51
48 51 52
48 52 53
48 53 54
48 54 55
48 55 56
48 56 57
48 57 58
48 58 59
60 61 62
60 62 63
60 63 64
60 64 65
60 65 66
60 66 67
60 67 68
60 68 69
60 69 70
60 70 71
)
TransformEnd
Return
Edited SCA Code Template Original SCA Code
This is the edited object source code that produces the animated parts c_tire_still and c_tire_blurred in fxpaint.mdl. The original model uses a range of 0 - 4096 for tire_still and 0 - 8192 for tire_blurred. By expanding these range tests, you can make c_tire_still and c_tire_blurred appear for a longer period of time.
Note the slight difference in the range test for tire_blurred. Instead of drawing the part if the wheel speed is in range, it only draws the part if the wheel speed is not in range.
; Part: c_tire_still
:Part000076
IfVarRange( :RETCTireStill 0xF4 0 8192 )
Jump(:CTireStill )
:RETCTireStill
Return
:CTireStill
Transform_Mat(
0.000000 -21.067778 -68.821404
1.000000 0.000000 0.000000
0.000000 1.000000 0.000000
0.000000 0.000000 1.000000
)
TransformCall( :DrawCTireStill 0 0 0
0.000000 0xF2 0.000000 0x00 0.000000 0x00 )
TransformEnd
Return
:DrawCTireStill
SetMaterial( 1 -1 )
DrawTriList( 652
0 1 2
0 2 3
4 5 6
4 6 7
8 9 10
8 10 11
12 13 14
12 14 15
16 17 18
16 18 19
20 21 22
20 22 23
24 25 26
24 26 27
28 29 30
28 30 31
32 33 34
32 34 35
36 37 38
36 38 39
40 41 42
40 42 43
44 45 46
44 46 47
48 49 50
48 50 51
48 51 52
48 52 53
48 53 54
48 54 55
48 55 56
48 56 57
48 57 58
48 58 59
60 61 62
60 62 63
60 63 64
60 64 65
60 65 66
60 66 67
60 67 68
60 68 69
60 69 70
60 70 71
)
Return
; Part: c_tire_blurred
:Part000079
IfVarRange( :CTireBlur 0xF4 0 8192 )
:RETCTireBlur
Return
:CTireBlur
Transform_Mat(
0.000000 -21.067778 -68.821404
1.000000 0.000000 0.000000
0.000000 1.000000 0.000000
0.000000 0.000000 1.000000
)
TransformCall( :DrawCTireBlur 0 0 0
0.000000 0xF2 0.000000 0x00 0.000000 0x00 )
TransformEnd
Return
:DrawCTireBlur
SetMaterial( 2 -1 )
DrawTriList( 868
0 1 2
0 2 3
4 5 6
4 6 7
8 9 10
8 10 11
12 13 14
12 14 15
16 17 18
16 18 19
20 21 22
20 22 23
24 25 26
24 26 27
28 29 30
28 30 31
32 33 34
32 34 35
36 37 38
36 38 39
40 41 42
40 42 43
44 45 46
44 46 47
48 49 50
48 50 51
48 51 52
48 52 53
48 53 54
48 54 55
48 55 56
48 56 57
48 57 58
48 58 59
60 61 62
60 62 63
60 63 64
60 64 65
60 65 66
60 66 67
60 67 68
60 68 69
60 69 70
60 70 71
)
Return
|