M2

From wowdev
Revision as of 17:51, 19 August 2008 by Xayo (talk | contribs) (New page: == Header == The header has mostly the layout of number-offset pairs, containing the number of a particular record in the file, and the offset. These appear at fixed places in the header...)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Header

The header has mostly the layout of number-offset pairs, containing the number of a particular record in the file, and the offset. These appear at fixed places in the header. Record sizes are not specified in the file.

The unknown blocks have (mostly arbitrary) alphabetic names until we figure out what they are.

Offset 	Type 		Description
0x000 	4 * char 	"MD20"
0x004 	4 * uint8 	Version (00 01 00 00 before Burning Crusade, 04 01 00 00 after BC)
0x008 	uint32 		model name length (including \0)
0x00C 	uint32 		model name offset
0x010 	uint32 		Model type? always 0, 1 or 3 (mostly 0)
0x014 	uint32 		nGlobalSequences - number of global sequences
0x018 	uint32 		ofsGlobalSequences - offset to global sequences
0x01C 	uint32 		nAnimations - number of animation sequences
0x020 	uint32 		ofsAnimations - offset to animation sequences
0x024 	uint32 		nAnimationLookup
0x028 	uint32 		ofsAnimationLookup
0x02C 	uint32 		nD - always 201 or 203 depending on WoW client version
0x030 	uint32 		ofsD
0x02C 	uint32 		nBones - number of bones
0x030 	uint32 		ofsBones - offset to bones
0x03C 	uint32 		nF - bone lookup table
0x040 	uint32 		ofsF
0x044 	uint32 		nVertices - number of vertices
0x048 	uint32 		ofsVertices - offset to vertices
0x04C 	uint32 		nViews - number of views (LOD versions?) 4 for every model
0x050 	uint32 		ofsViews - offset to views
0x054 	uint32 		nColors - number of color definitions
0x058 	uint32 		ofsColors - offset to color definitions
0x05C 	uint32 		nTextures - number of textures
0x060 	uint32 		ofsTextures - offset to texture definitions
0x064 	uint32 		nTransparency - number of transparency definitions
0x068 	uint32 		ofsTransparency - offset to transparency definitions
0x06C 	uint32 		nI - always 0
0x070 	uint32 		ofsI
0x074 	uint32 		nTexAnims - number of texture animations
0x078 	uint32 		ofsTexAnims - offset to texture animations
0x07C 	uint32 		nTexReplace
0x080 	uint32 		ofsTexReplace
0x084 	uint32 		nRenderFlags - number of blending mode definitions
0x088 	uint32 		ofsRenderFlags - offset to blending mode definitions
0x08C 	uint32 		nBoneLookupTable - bone lookup table
0x090 	uint32 		ofsBoneLookupTable
0x094 	uint32 		nTexLookup - number of texture lookup table entries
0x098 	uint32 		ofsTexLookup - offset to texture lookup table
0x09C 	uint32 		nTexUnits - texture unit definitions?
0x0A0 	uint32 		ofsTexUnits
0x0A4 	uint32 		nTransLookup - number of transparency lookup table entries
0x0A8 	uint32 		ofsTransLookup - offset to transparency lookup table
0x0AC 	uint32 		nTexAnimLookup - number of texture animation lookup table entries
0x0B0 	uint32 		ofsTexAnimLookup - offset to texture animation lookup table
0x0B4 	14 * float 	float values ... ? (in range -1000...1000, mostly in -20...30)
0x0EC 	uint32 		nBoundingTriangles
0x0F0 	uint32 		ofsBoundingTriangles
0x0F4 	uint32 		nBoundingVertices
0x0F8 	uint32 		ofsBoundingVertices
0x0FC 	uint32 		nBoundingNormals
0x100 	uint32 		ofsBoundingNormals
0x104 	uint32 		nAttachments
0x108 	uint32 		ofsAttachments
0x10C 	uint32 		nAttachLookup
0x110 	uint32 		ofsAttachLookup
0x114 	uint32 		nAttachments_2
0x118 	uint32 		ofsAttachments_2
0x11C 	uint32 		nLights - number of lights
0x120 	uint32 		ofsLights - offset to lights
0x124 	uint32 		nCameras - number of cameras
0x128 	uint32 		ofsCameras - offset to cameras
0x12C 	uint32 		nCameraLookup
0x130 	uint32 		ofsCameraLookup
0x134 	uint32 		nRibbonEmitters - number of ribbon emitters
0x138 	uint32 		ofsRibbonEmitters - offset to ribbon emitters
0x13C 	uint32 		nParticleEmitters - number of particle emitters
0x140 	uint32 		ofsParticleEmitters - offset to particle emitters


Note: These infos are ALL not aprooved!

TEMP: 0x0870