-
Notifications
You must be signed in to change notification settings - Fork 0
/
x-bmd.bt
198 lines (173 loc) · 3.77 KB
/
x-bmd.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
//------------------------------------------------
//--- 010 Editor v14.0 Binary Template
//
// File: x-bmd.bt
// Authors: hollyland
// Version: 0.1
// Purpose: Reading binary .bmd (FilmBox) files structure.
// Category: Game
// File Mask: *.bmd
// ID Bytes:
// History:
//------------------------------------------------
struct A3DVECTOR3
{
float x,y,z;
};
struct _load_string
{
int len;
if(len > 0)
char buf[len];
};
struct A3DLMVERTEX_OPTIMISZE_SAVE
{
char pos[9];
float u;
float v;
};
struct A3DLMVERTEX_WITHOUTNORMAL
{
A3DVECTOR3 pos;
DWORD diffuse;
float u;
float v;
};
struct A3DAABB
{
A3DVECTOR3 Center;
A3DVECTOR3 Extents;
A3DVECTOR3 Mins;
A3DVECTOR3 Maxs;
};
struct A3DLitMesh
{
DWORD dwVersion;
if (dwVersion >= 0x1000000b)
{
byte bOptimize;
_load_string m_strName;
int nColorCount;
DWORD m_pDayColors[nColorCount];
if (dwVersion >= 0x1000000d)
{
DWORD m_pNightColors[nColorCount];
}
}
else if (dwVersion >= 0x1000000a)
{
byte bOptimize;
_load_string m_strName;
int nColorCount;
byte bHasExtraColors;
if (bOptimize == 0)
{
char pDayColors[nColorCount];
if (bHasExtraColors)
{
//pFileToLoad->Seek(3 * m_nColorCount, AFILE_SEEK_CUR);
}
}
else
{
DWORD m_pDayColors[nColorCount];
}
}
else if (dwVersion >= 0x10000009)
{
byte bOptimize;
_load_string m_strName;
_load_string szTextureMap;
int m_nTexDXT1AlphaFlag;
int nVertCount, nFaceCount;
byte bHasExtraColors;
if (bOptimize == 0)
{
A3DLMVERTEX_OPTIMISZE_SAVE pVerts[nVertCount];
char pNormal[3 * nVertCount];
WORD m_pIndices[nFaceCount * 3];
char pDayColors[3 * nVertCount];
}
else
{
A3DLMVERTEX_WITHOUTNORMAL pVerts[nVertCount];
A3DVECTOR3 m_pNormals[nVertCount];
WORD m_pIndices[nFaceCount * 3];
A3DVECTOR3 m_pDayColors[nVertCount];
A3DAABB m_aabb;
}
}
else if( dwVersion == 0x10000002 )
{
}
else if( dwVersion == 0x10000003 )
{
}
else if( dwVersion == 0x10000004 )
{
}
else if( dwVersion == 0x10000005 )
{
}
else if( dwVersion >= 0x10000006 )
{
}
else
{
}
};
struct A3DLitModel
{
DWORD dwVersion;
if (dwVersion >= 0x10000003)
{
byte bLocalSaveShareData;
int len;
char m_strShareDataPath[len];
A3DVECTOR3 m_vec3;
A3DVECTOR3 m_vecDir;
A3DVECTOR3 m_vecUp;
A3DVECTOR3 m_vecPos;
int nNumMeshes;
local int i;
for (i = 0; i < nNumMeshes; i++)
A3DLitMesh pMesh;
}
else if (dwVersion == 0x10000001)
{
A3DVECTOR3 m_vec3;
A3DVECTOR3 m_vecDir;
A3DVECTOR3 m_vecUp;
A3DVECTOR3 m_vecPos;
int nNumMeshes;
local int i;
for (i = 0; i < nNumMeshes; i++)
A3DLitMesh pMesh;
}
else if( dwVersion == 0x10000002 )
{
A3DVECTOR3 m_vec3;
A3DVECTOR3 m_vecDir;
A3DVECTOR3 m_vecUp;
A3DVECTOR3 m_vecPos;
int nNumMeshes;
local int i;
for (i = 0; i < nNumMeshes; i++)
A3DLitMesh pMesh;
}
};
DWORD version;
byte bCollideOnly;
if (version < 0x80000001)
{ }
else
{
if(version >= 0x80000002)
{
int len;
char m_strPxdPath[len];
}
}
A3DLitModel m_pA3DLitModel;
int len;
char m_chf[len];