-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy paththps2x_ddm.ksy
165 lines (151 loc) · 2.98 KB
/
thps2x_ddm.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
meta:
id: thps2x_ddm
application: Tony Hawk's Pro Skater 2X
title: Tony Hawk's Pro SKater 2X (XBOX) level mesh file
file-extension: ddm
endian: le
doc-ref: https://github.com/DCxDemo/LegacyTHPS/blob/master/formats/thps2x_ddm.ksy
doc: |
Describes visible level mesh in DDM format found in Original Xbox game
Tony Hawk's Pro Skater 2X. Does not contain collision meshes. Requires
data from a matching PSX file to fully reconstruct the level.
File mapped by DCxDemo*.
seq:
- id: magic
type: u4
- id: file_size
type: u4
- id: num_objects
type: u4
- id: entries
type: entry
repeat: expr
repeat-expr: num_objects
types:
entry:
seq:
- id: offset
type: u4
- id: length
type: u4
instances:
mesh:
type: mesh
pos: offset
mesh:
seq:
- id: header
type: mesh_header
- id: materials
type: material
repeat: expr
repeat-expr: header.num_mat2
- id: vertices
type: vertex
repeat: expr
repeat-expr: header.num_vertices
- id: indices
type: u2
repeat: expr
repeat-expr: header.num_indices
- id: mat_splits
type: split
repeat: expr
repeat-expr: header.num_mat2
mesh_header:
seq:
- id: index
type: u4
- id: checksum
type: u4
- id: anim_speed_x
type: f4
- id: anim_speed_y
type: f4
- id: unk_float
type: f4
- id: unk
type: u4
- id: flags
type: u4
- id: name
type: strz
encoding: ascii
size: 64
- id: unk_floats2
type: f4
repeat: expr
repeat-expr: 7
- id: num_mat
type: u4
- id: num_vertices
type: u4
- id: num_indices
type: u4
- id: num_mat2
type: u4
material:
seq:
- id: material_name
type: strz
encoding: ascii
size: 64
- id: texture_name
type: strz
encoding: ascii
size: 64
- id: some_int
type: u4
- id: diffuse_color
type: u4
- id: unk0
type: f4
- id: unk1
type: f4
- id: unk2
type: f4
- id: unk3
type: f4
split:
seq:
- id: count
type: u2
- id: start_index
type: u2
- id: indices_count
type: u2
vertex:
seq:
- id: position
type: vector3f
- id: normal
type: vector3f
- id: color
type: color
- id: tex_coord
type: vector2f
#basic types
vector2f:
seq:
- id: x
type: f4
- id: y
type: f4
vector3f:
seq:
- id: x
type: f4
- id: y
type: f4
- id: z
type: f4
color:
seq:
- id: r
type: u1
- id: g
type: u1
- id: b
type: u1
- id: a
type: u1