forked from othias/silvie
-
Notifications
You must be signed in to change notification settings - Fork 0
/
chr.ksy
228 lines (228 loc) · 3.86 KB
/
chr.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
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
meta:
id: chr
file-extension: chr
endian: le
seq:
- id: start
size: 8
- id: chunk
type: chunk
- id: offsets
type: material_offsets
- id: meshes
type: meshes
- id: textures
type: textures
- id: nodes
type: nodes
#- id: mesh_groups
# type: mesh_groups
types:
chunk:
seq:
- id: id
type: u4
- id: size
type: u4
material_offsets:
seq:
- id: chunk
type: chunk
- id: count
type: u4
- id: data
type: u4
repeat: expr
repeat-expr: count
meshes:
seq:
- id: chunk
type: chunk
- id: count
type: u4
- id: mesh_id
type: u4
- id: data
type: mesh
repeat: expr
repeat-expr: 2
mesh:
seq:
- id: chunk
type: chunk
- id: idx
type: u4
- id: id
type: u4
- id: unknown_0
type: u4
- id: number_of_vertices
type: u4
- id: number_of_normals
type: u4
- id: number_of_faces
type: u4
- id: unknown_1
type: u4
- id: unknown_2
type: u4
- id: origin
type: f4
repeat: expr
repeat-expr: 3
- id: matrix
type: f4
repeat: expr
repeat-expr: 16
- id: vertices
type: f4
repeat: expr
repeat-expr: number_of_vertices * 3
- id: normals
type: f4
repeat: expr
repeat-expr: number_of_normals * 3
- id: faces
type: face
repeat: expr
repeat-expr: number_of_faces
face:
seq:
- id: flags
type: u1
- id: idx
type: u1
- id: number_of_vertices
type: u1
- id: material_offset_idx
type: u1
- id: unknown
type: u4
- id: vertices
type: face_vertex
repeat: expr
repeat-expr: number_of_vertices
face_vertex:
seq:
- id: idx
type: u4
- id: unknown_0
type: u4
- id: color_idx
type: u2
- id: texel_u
type: u2
- id: unknown_1
type: u2
- id: texel_v
type: u2
textures:
seq:
- id: chunk
type: chunk
- id: cst_0
type: u4
- id: width_0
type: u4
- id: height
type: u4
- id: cst_1
type: u4
- id: buffer_size
type: u4
- id: width_1
type: u4
- id: buffer_offset
type: u4
- id: unknown_0
type: s4
- id: unknown_1
type: s4
- id: unknown_2
type: s4
- id: unknown_3
type: s4
- id: unknown_4
type: s4
- id: unks
type: s4
repeat: expr
repeat-expr: height
- id: buffer
type: u1
repeat: expr
repeat-expr: buffer_size - 8
texture:
seq:
- id: chunk
type: chunk
- id: idx
type: u4
- id: id
type: u4
- id: unknown_0
type: u4
- id: number_of_vertices
type: u4
- id: number_of_normals
type: u4
- id: number_of_faces
type: u4
- id: unknown_1
type: u4
- id: unknown_2
type: u4
- id: origin
type: f4
repeat: expr
repeat-expr: 3
- id: matrix
type: f4
repeat: expr
repeat-expr: 16
- id: vertices
type: f4
repeat: expr
repeat-expr: number_of_vertices * 3
- id: normals
type: f4
repeat: expr
repeat-expr: number_of_normals * 3
- id: faces
type: face
repeat: expr
repeat-expr: number_of_faces
nodes:
seq:
- id: chunk
type: chunk
- id: unknown
type: s4
- id: number_of_nodes
type: u4
- id: data
type: node
repeat: expr
repeat-expr: number_of_nodes
node:
seq:
- id: chunk
type: chunk
- id: parent_idx
type: s4
- id: position
type: f4
repeat: expr
repeat-expr: 3
mesh_groups:
seq:
- id: chunk
type: chunk
- id: data
type: mesh_group
repeat: expr
repeat-expr: 2
mesh_group:
seq:
- id: chunk
type: chunk