-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathSMX.txt
67 lines (48 loc) · 2.06 KB
/
SMX.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
Simple Mesh Export VERSION 0
============================
NOTES :
=======
X,Y,Z values : fixed point world coordinates (1 metre = 65536)
Vertex colours : 4 bytes - Opacity, R, G, B
FILE DESCRIPTION :
==================
num unit offset description
--- ---- ------ -----------
HEADER BLOCK :
6 char 0 LFSSMX : do not read file if no match
1 byte 6 game version : ignore
1 byte 7 game revision : ignore
1 byte 8 SMX version (0) : do not read file if increased
1 byte 9 dimensions : always 3
1 byte 10 resolution : 0 high 1 low
1 byte 11 vertex colours : 1 : do not read if different
4 byte 12 0 :
32 char 16 track : text
1 byte 48 ground col R : red
1 byte 49 ground col G : green
1 byte 50 ground col B : blue
9 byte 51 0 :
1 int 60 num objects : number
......OBJECT BLOCKS (num objects)
OBJECT BLOCK :
1 int 0 centre X : fp
1 int 4 centre Y : fp
1 int 8 centre Z : fp
1 int 12 radius : fp
1 int 16 num points : number
1 int 20 num tris : number
......POINT BLOCKS
......TRIANGLE BLOCKS
POINT BLOCK :
1 int 0 X : fp (ground x)
1 int 4 Y : fp (ground y)
1 int 8 Z : fp (altitude)
1 int 12 Colour : (see NOTE)
TRIANGLE BLOCK :
1 word 0 vertex A : index
1 word 2 vertex B : index
1 word 4 vertex C : index
1 word 6 0 :
FOOTER BLOCK : (after all the objects)
1 int 0 num cp objects : number of checkpoint objects
num int 4 object index : index of each cp object