4 typedef unsigned char uint8
;
6 typedef unsigned short uint16
;
8 typedef unsigned int uint32
;
20 uint32 nGlobalSequences
;
21 uint32 ofsGlobalSequences
;
44 uint32 nTransparency
; // H
45 uint32 ofsTransparency
;
46 uint32 nI
; // always unused ?
48 uint32 nTexAnims
; // J
61 uint32 nTexUnitLookup
; // L
62 uint32 ofsTexUnitLookup
;
63 uint32 nTransparencyLookup
; // M
64 uint32 ofsTransparencyLookup
;
65 uint32 nTexAnimLookup
;
66 uint32 ofsTexAnimLookup
;
70 uint32 nBoundingTriangles
;
71 uint32 ofsBoundingTriangles
;
72 uint32 nBoundingVertices
;
73 uint32 ofsBoundingVertices
;
74 uint32 nBoundingNormals
;
75 uint32 ofsBoundingNormals
;
89 uint32 nRibbonEmitters
; // U
90 uint32 ofsRibbonEmitters
;
91 uint32 nParticleEmitters
; // V
92 uint32 ofsParticleEmitters
;
96 // block B - animations
97 struct ModelAnimation
{
108 uint32 playSpeed
; // note: this can't be play speed because it's 0 for some models
117 // sub-block in block E - animation data
118 struct AnimationBlock
{
119 int16 type
; // interpolation type (0=none, 1=linear, 2=hermite)
120 int16 seq
; // global sequence id or -1
130 struct ModelBoneDef
{
133 int16 parent
; // parent bone index
135 // new int added to the bone definitions. Added in WoW 2.0
137 AnimationBlock translation
;
138 AnimationBlock rotation
;
139 AnimationBlock scaling
;
143 struct ModelTexAnimDef
{
144 AnimationBlock trans
, rot
, scale
;
153 int unk1
, unk2
; // always 0,0 so this is probably unused
157 uint32 nIndex
, ofsIndex
; // Vertices in this model (index into vertices[])
158 uint32 nTris
, ofsTris
; // indices
159 uint32 nProps
, ofsProps
; // additional vtx properties
160 uint32 nSub
, ofsSub
; // materials/renderops/submeshes
161 uint32 nTex
, ofsTex
; // material properties/textures
162 int32 lod
; // LOD bias?
166 /// One material + render operation
168 uint16 d1
; // mesh part id?
170 uint16 vstart
; // first vertex
171 uint16 vcount
; // num vertices
172 uint16 istart
; // first index
173 uint16 icount
; // num indices
174 uint16 d3
; // number of bone indices
175 uint16 d4
; // offset into bone index list
177 uint16 d6
; // root bone?
179 float unknown
[4]; // Added in WoW 2.0?
182 /// A texture unit (sub of material)
184 // probably the texture units
185 // size always >=number of materials it seems
186 uint16 flags
; // Flags
188 uint16 op
; // Material this texture is part of (index into mat)
189 uint16 op2
; // Always same as above?
190 int16 colorIndex
; // color or -1
191 uint16 flagsIndex
; // more flags...
192 uint16 texunit
; // Texture unit (0 or 1)
193 uint16 d4
; // ? (seems to be always 1)
194 uint16 textureid
; // Texture id (index into global texture list)
195 uint16 texunit2
; // copy of texture unit value?
196 uint16 transid
; // transparency id (index into transparency list)
197 uint16 texanimid
; // texture animation id
200 // block X - render flags
201 struct ModelRenderFlags
{
206 // block G - color defs
207 struct ModelColorDef
{
208 AnimationBlock color
;
209 AnimationBlock opacity
;
212 // block H - transp defs
213 struct ModelTransDef
{
214 AnimationBlock trans
;
217 struct ModelTextureDef
{
224 struct ModelLightDef
{
228 AnimationBlock ambColor
;
229 AnimationBlock ambIntensity
;
230 AnimationBlock color
;
231 AnimationBlock intensity
;
232 AnimationBlock attStart
;
233 AnimationBlock attEnd
;
237 struct ModelCameraDef
{
239 float fov
, farclip
, nearclip
;
240 AnimationBlock transPos
;
242 AnimationBlock transTarget
;
248 struct ModelParticleParams
{
260 struct ModelParticleEmitterDef
{
276 AnimationBlock params
[10];
277 ModelParticleParams p
;
282 struct ModelRibbonEmitterDef
{
290 AnimationBlock color
;
291 AnimationBlock opacity
;
292 AnimationBlock above
;
293 AnimationBlock below
;
294 float res
, length
, unk
;