-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmbr.ksy
125 lines (98 loc) · 2.71 KB
/
mbr.ksy
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
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
meta:
id: mbr
file-extension: mbr
endian: le
#############################################
seq:
- id: one
type: u2
- id: block_count # количество саб-мешей
type: u4
- id: blocks
type: block
repeat: expr
repeat-expr: block_count
#############################################
types:
block:
seq:
- id: str_count # 01 00 или 02 00
type: u2
- id: string48s
type: str
size: 48
encoding: ASCII
repeat: expr
repeat-expr: 2
- id: floats_q
type: f4
repeat: expr
repeat-expr: 27
- id: count_triplet # количество вершин
type: u4
- id: count_quadrat
type: u4
- id: triplets # xyz
type: triplet
repeat: expr
repeat-expr: count_triplet
- id: quadrats
type: float8
repeat: expr
repeat-expr: count_quadrat
# не проверял, потому что у меня нет игры
- id: triplet_int # ссылки на текстуры для полигонов ?
type: u4
repeat: expr
repeat-expr: count_triplet
- id: count_float
type: u4
if: str_count == 2
- id: float_8
type: float8
repeat: expr
repeat-expr: count_float
if: count_float > 0
- id: short_5
type: short5
repeat: expr
repeat-expr: count_float
if: count_float > 0
- id: float_6
type: f4
repeat: expr
repeat-expr: 6
#############################################
triplet:
seq:
- id: vector
type: f4
repeat: expr
repeat-expr: 3
#############################################
float8:
seq:
- id: bytes4 # цвет ? (как в o3d)
type: u1
repeat: expr
repeat-expr: 4
- id: floats8 # текстурные координаты = для 6 для tri, 8 для quad ? (как в o3d)
type: f4
repeat: expr
repeat-expr: 8
- id: polygon4 # tri or quad (где то да, а где то 65535) теперь больше похоже на грани, хотя бывает и по одному не 65535 значению
type: u2
repeat: expr
repeat-expr: 4
- id: short_array # 6 байт окончания / в конце может текстура, как в o3d ?
type: u2
repeat: expr
repeat-expr: 3
#############################################
short5:
seq:
- id: shorts
type: u2
repeat: expr
repeat-expr: 5
#############################################