-
Notifications
You must be signed in to change notification settings - Fork 5
/
sh3_ps2_map.bt
212 lines (178 loc) · 3.39 KB
/
sh3_ps2_map.bt
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
//------------------------------------------------
//--- 010 Editor v13.0.2 Binary Template
//
// File:
// Authors:
// Version:
// Purpose:
// Category:
// File Mask: map
// ID Bytes: FF FF FF FF
// History:
//------------------------------------------------
struct Unknown {
uint32 unk;
uint32 unk;
uint32 unk;
uint32 pad;
uint16 unk;
uint16 unk;
uint16 unk;
uint16 unk;
uint32 pad;
uint32 pad;
uint32 unk;
uint32 unk;
uint32 unk;
uint32 unk;
uint32 unk;
uint32 pad;
uint32 pad;
uint32 pad;
};
struct Float4 {
float x;
float y;
float z;
float pad;
};
struct Head {
uint32 next_ofs;
uint32 data_start_ofs;
uint32 total_size;
uint32 pad;
};
struct MeshGroup {
struct MeshGroupH mesh_group_h;
struct MeshGroupB mesh_group_b;
};
struct MeshGroupH {
struct Head head;
uint32 unk;
uint32 arr_id;
uint16 num_mesh;
uint16 unk;
uint32 unk;
uint32 unk;
uint32 unk;
uint32 unk;
uint32 unk;
};
struct MeshGroupB {
struct Mesh mesh;
local int i;
for (i=0; mesh[i].mesh_h.head.next_ofs > 0; i++) {
FSeek(mesh[i].mesh_h.head.next_ofs);
struct Mesh mesh;
}
};
struct Mesh {
struct MeshH mesh_h;
struct MeshB mesh_b;
};
struct MeshH {
struct Head head;
uint16 clut_index;
uint16 unk;
uint16 unk;
uint16 flag;
uint32 unk;
uint32 unk;
uint32 unk;
uint32 unk;
uint32 unk;
uint32 unk;
};
struct MeshB {
struct SubMesh sub_mesh;
local int i;
for (i=0; sub_mesh[i].sub_mesh_h.head.next_ofs > 0; i++) {
FSeek(sub_mesh[i].sub_mesh_h.head.next_ofs);
struct SubMesh sub_mesh;
}
};
struct SubMesh {
struct SubMeshH sub_mesh_h;
struct SubMeshB sub_mesh_b;
};
struct SubMeshH {
struct Head head;
uint32 unk;
uint32 unk;
uint32 unk;
uint32 unk;
float unk;
float unk;
float unk;
float unk;
};
struct SubMeshB {
struct Shape shape;
local int i = 0;
for (i=0; shape[i].shape_h.head.next_ofs > 0; i++) {
FSeek(shape[i].shape_h.head.next_ofs);
struct Shape shape;
}
};
struct Shape {
struct ShapeH shape_h;
struct ShapeB shape_b[shape_h.num_vertex];
};
struct ShapeH {
struct Head head;
uint32 num_vertex;
uint32 transform_index;
uint32 unk;
uint16 unk;
uint16 unk;
uint32 unk;
uint32 unk;
uint32 unk;
uint32 unk;
uint32 pad[4];
};
struct ShapeB {
int16 vpos[3];
int16 vn_vcol_x;
ubyte tri_flag;
byte uv_u;
byte pad;
byte uv_v;
int16 vn_vcol[2];
};
struct MeshBlock {
struct MeshGroup mesh_group;
local int i;
for (i=0; mesh_group[i].mesh_group_h.head.next_ofs > 0; i++) {
FSeek(mesh_group[i].mesh_group_h.head.next_ofs);
struct MeshGroup mesh_group;
}
};
//----------------------------
uint32 magic <format=hex>;
uint32 pad;
uint32 pad;
uint32 unk_ofs;
uint32 unk_ofs;
uint32 pad;
uint32 unk;
uint32 unk_mesh_group_ofs0;
uint32 unk_mesh_group_ofs1;
uint32 unk_mesh_group_ofs2;
uint32 pad;
uint32 pad;
struct Unknown unknown;
float matrix_col[16];
struct Float4 bbox[8];
if (unk_mesh_group_ofs0 > 0) {
FSeek(unk_mesh_group_ofs0);
struct MeshBlock mesh_group0;
}
if (unk_mesh_group_ofs1 > 0) {
FSeek(unk_mesh_group_ofs1);
struct MeshBlock mesh_group1;
}
if (unk_mesh_group_ofs2 > 0) {
FSeek(unk_mesh_group_ofs2);
struct MeshBlock mesh_group2;
}