Alpha: Difference between revisions

From wowdev
Jump to navigation Jump to search
mNo edit summary
(16 intermediate revisions by 2 users not shown)
Line 10: Line 10:


===MPHD===
===MPHD===
  struct MphdInfo
  struct SMMapHeader
  {
  {
/*0x00*/ int32 unknown1;  // Something related to M2 number.
  uint32_t nDoodadNames;
/*0x04*/ [[Alpha#MDNM|MDNM]]* mdnm;
  uint32_t offsDoodadNames;  // [[Alpha#MDNM|MDNM]]
/*0x08*/ int32 unknown2;  // Something related to Wmo number.
  uint32_t nMapObjNames;
/*0x0C*/ [[Alpha#MONM|MONM]]* monm;
  uint32_t offsMapObjNames;  // [[Alpha#MONM|MONM]]
/*0x10*/ int32 unused[28]; // only zeroes
  uint8_t pad[112];
  }
  };


===MAIN===
===MAIN===
*'''Map tile table.''' Needs to contain 64x64 = 4096 entries of sizeof(SMAreaInfo)
  struct SMAreaInfo
  struct SMAreaInfo
  {
  {
  struct SMAreaInfoEntry
   uint32_t offset;     // absolute offset [[Alpha#MHDR|MHDR]]
  {
  uint32_t size;       // offset relative to MHDR start (so value can also be read as : all ADT chunks total size from MHDR to first MCNK) [[Alpha#MCNK|MCNK]]
   [[Alpha#MHDR|MHDR]]* mhdr;       // absolute offset
   uint32_t flags;    // FLAG_LOADED = 0x1 is the only flag, set at runtime
  [[Alpha#MCNK|MCNK]]* firstMcnk;   // offset relative to MHDR start (so value can also be read as : all ADT chunks total size from MHDR to first MCNK)
   union
   int32 unknown1;    // unused ?
  {
   int32 unknown2;   // unused ?
    uint8_t pad[4];
  } entries[64*64];
    uint32_t asyncId; // set at runtime
  };
  };
  };
 
===MDNM===
===MDNM===
Filenames Doodads.
Filenames Doodads.
Line 39: Line 42:
===MODF (optional)===
===MODF (optional)===
See the new files.
See the new files.
Unique and at the end of the file for WMO based maps, which contain no ADT parts. First entry looks like a dummy one (2nd int32 is all 0xff, rest of entry is full of 0x0). Total 2 entries counting the dummy one.
Unique and at the end of the file for WMO based maps, which contain no ADT parts. <s>First entry looks like a dummy one (2nd int32 is all 0xff, rest of entry is full of 0x0). Total 2 entries counting the dummy one.</s>


RazorfenDowns is "hybrid", it contains both WDT-part optional MODF with the dummy entry, and a MODF for each of its ADTs.
RazorfenDowns is "hybrid", it contains both WDT-part optional MODF with the dummy entry, and a MODF for each of its ADTs.


===MHDR===
===MHDR===
  struct MhdrInfo
The start of what is now the ADT files.
 
  struct SMAreaHeader
  {
  {
/*0x00*/ [[Alpha#MCIN|MCIN]]* mcin;
  uint32_t offsInfo;    // [[Alpha#MCIN|MCIN]]
/*0x04*/ [[Alpha#MTEX|MTEX]]* mtex;
  uint32_t offsTex;     // [[Alpha#MTEX|MTEX]]
/*0x08*/ int32 MtexSize;   // includes chunk name and size
  uint32_t sizeTex;
/*0x0C*/ [[Alpha#MDDF|MDDF]]* mddf;
  uint32_t offsDoo;     // [[Alpha#MDDF|MDDF]]
/*0x10*/ int32 unknown1;   // always 0 ?
  uint32_t sizeDoo;
/*0x14*/ [[Alpha#MODF_.28in_ADT_part.29|MODF]]* modf;
  uint32_t offsMob;     // [[Alpha#MODF_.28in_ADT_part.29|MODF]]
/*0x18*/ int32 unused[10]; // seem unused
  uint32_t sizeMob;
  }
  uint8_t pad[36];
  };


===MCIN===
===MCIN===
Line 73: Line 79:
  struct SMChunk
  struct SMChunk
  {
  {
/*0x00*/ int32 flags;
  uint32_t flags;                     // See SMChunkFlags
/*0x04*/ int32 IndexX;
  uint32_t indexX;
/*0x08*/ int32 IndexY;
  uint32_t indexY;
/*0x0C*/ float unknown3;
  float radius;
/*0x10*/ int32 nLayers;
  uint32_t nLayers;
/*0x14*/ int32 nDoodadRefs;
  uint32_t nDoodadRefs;
/*0x18*/ [[Alpha#.28MCVT.29_sub-chunk|MCVT]]* mcvt;     // (= 0x00)
  uint32_t offsHeight;                // [[Alpha#.28MCVT.29_sub-chunk|MCVT]]
/*0x1C*/ [[Alpha#.28MCNR.29_sub-chunk|MCNR]]* mcnr;
  uint32_t offsNormal;               // [[Alpha#.28MCNR.29_sub-chunk|MCNR]]
/*0x20*/ [[Alpha#MCLY_sub-chunk|MCLY]]* mcly;
  uint32_t offsLayer;                 // [[Alpha#MCLY_sub-chunk|MCLY]]
/*0x24*/ [[Alpha#MCRF_sub-chunk|MCRF]]* mcrf;
  uint32_t offsRefs;                 // [[Alpha#MCRF_sub-chunk|MCRF]]
/*0x28*/ [[Alpha#.28MCAL.29_sub-chunk|MCAL]]* mcal;
  uint32_t offsAlpha;                 // [[Alpha#.28MCAL.29_sub-chunk|MCAL]]
/*0x2C*/ int32 McalSize;
  uint32_t sizeAlpha;
/*0x30*/ [[Alpha#.28MCSH.29_sub-chunk|MCSH]]* mcsh;
  uint32_t offsShadow;               // [[Alpha#.28MCSH.29_sub-chunk|MCSH]]
/*0x34*/ int32 McshSize;
  uint32_t sizeShadow;
/*0x38*/      // unknown
  uint32_t areaid;
/*0x3C*/ int32 nMapObjRefs;
  uint32_t nMapObjRefs;
/*0x40*/ int32 holes;
  uint16_t holes;
/*0x44*/ UINT2[8][8] ReallyLowQualityTexturingMap;
  uint16_t pad0;
/*0x48*/
  uint16_t predTex[8];
/*0x4C*/
  uint8_t noEffectDoodad[8];
/*0x50*/
  uint32_t offsSndEmitters;          // MCSE
/*0x54*/      // unknown
  uint32_t nSndEmitters;
/*0x58*/      // unknown
  uint32_t offsLiquid;               // MLIQ
/*0x5C*/ int32 McnkSize; // (minus header size)
  uint8_t pad1[24];
/*0x60*/      // unknown
  };
/*0x64*/ [[Alpha#.28MCLQ.29_sub-chunk|MCLQ]]* mclq;     // If (value == MCNK size) it means there's no MCLQ.
/*0x68 to 0x80*/        // unused ?
  }


FLAG_IMPASS seems to be at the same place as later versions, other flags not verified.
enum SMChunkFlags
{
  FLAG_SHADOW = 0x1,
  FLAG_IMPASS = 0x2,
  FLAG_LQ_RIVER = 0x4,
  FLAG_LQ_OCEAN = 0x8,
  FLAG_LQ_MAGMA = 0x10,
};


====(MCVT) sub-chunk====
====(MCVT) sub-chunk====
Line 114: Line 124:


Same as 3.x format, except values order which is like alpha MCVT : all outer values first, then all inner ones.
Same as 3.x format, except values order which is like alpha MCVT : all outer values first, then all inner ones.
struct SMNormal
{
  uint8_t n[145][3];
  uint8_t pad[13];
};


====MCLY sub-chunk====
====MCLY sub-chunk====
See the new files.
See the new files.
struct SMLayer
{
  uint32_t textureId;
  uint32_t props;
  uint32_t offsAlpha;
  uint16_t effectId;
  uint8_t pad[2];
};


====MCRF sub-chunk====
====MCRF sub-chunk====
Line 135: Line 160:


See the new files.
See the new files.
====(MCSE) sub-chunk====
No chunk name and no size.
struct CWSoundEmitter
{
  uint32_t soundPointID;
  uint32_t soundNameID;
  {{Template:Type|C3Vector}} pos;
  float minDistance;
  float maxDistance;
  float cutoffDistance;
  uint32_t startTime;
  uint32_t endTime;
  uint32_t mode;
  uint32_t groupSilenceMin;
  uint32_t groupSilenceMax;
  uint32_t playInstancesMin;
  uint32_t playInstancesMax;
  uint32_t loopCountMin;
  uint32_t loopCountMax;
  uint32_t interSoundGapMin;
  uint32_t interSoundGapMax;
};


==MDX==
==MDX==

Revision as of 12:02, 28 September 2017

This site contains information about the alphafiles

For information added on 2012-03-24 : files I looked at come from build 3368 (Mjollnà).

WDT

In the Alpha the ADTs and the WDT were just one big file with this structure :

MVER

See the new files.

MPHD

struct SMMapHeader
{
  uint32_t nDoodadNames;
  uint32_t offsDoodadNames;   // MDNM
  uint32_t nMapObjNames;
  uint32_t offsMapObjNames;   // MONM
  uint8_t pad[112];
};

MAIN

  • Map tile table. Needs to contain 64x64 = 4096 entries of sizeof(SMAreaInfo)
struct SMAreaInfo
{
  uint32_t offset;     // absolute offset MHDR
  uint32_t size;       // offset relative to MHDR start (so value can also be read as : all ADT chunks total size from MHDR to first MCNK) MCNK
  uint32_t flags;    // FLAG_LOADED = 0x1 is the only flag, set at runtime
  union
  {
    uint8_t pad[4];
    uint32_t asyncId; // set at runtime
  };
};

MDNM

Filenames Doodads.

MONM

Filenames WMOS.

MODF (optional)

See the new files. Unique and at the end of the file for WMO based maps, which contain no ADT parts. First entry looks like a dummy one (2nd int32 is all 0xff, rest of entry is full of 0x0). Total 2 entries counting the dummy one.

RazorfenDowns is "hybrid", it contains both WDT-part optional MODF with the dummy entry, and a MODF for each of its ADTs.

MHDR

The start of what is now the ADT files.

struct SMAreaHeader
{
  uint32_t offsInfo;    // MCIN
  uint32_t offsTex;     // MTEX
  uint32_t sizeTex;
  uint32_t offsDoo;     // MDDF
  uint32_t sizeDoo;
  uint32_t offsMob;     // MODF
  uint32_t sizeMob;
  uint8_t pad[36];
};

MCIN

256 Entries, so a 16*16 Chunkmap. See the new files.

MTEX

See the new files.

MDDF

See the new files.

MODF (in ADT part)

See the new files.

MCNK

The header is 128 bytes like later versions, but information inside is placed slightly differently. Offsets are relative to the end of MCNK header.

struct SMChunk
{
  uint32_t flags;                     // See SMChunkFlags
  uint32_t indexX;
  uint32_t indexY;
  float radius;
  uint32_t nLayers;
  uint32_t nDoodadRefs;
  uint32_t offsHeight;                // MCVT
  uint32_t offsNormal;                // MCNR
  uint32_t offsLayer;                 // MCLY
  uint32_t offsRefs;                  // MCRF
  uint32_t offsAlpha;                 // MCAL
  uint32_t sizeAlpha;
  uint32_t offsShadow;                // MCSH
  uint32_t sizeShadow;
  uint32_t areaid;
  uint32_t nMapObjRefs;
  uint16_t holes;
  uint16_t pad0;
  uint16_t predTex[8];
  uint8_t noEffectDoodad[8];
  uint32_t offsSndEmitters;           // MCSE
  uint32_t nSndEmitters;
  uint32_t offsLiquid;                // MLIQ
  uint8_t pad1[24];
};
enum SMChunkFlags
{
  FLAG_SHADOW = 0x1,
  FLAG_IMPASS = 0x2,
  FLAG_LQ_RIVER = 0x4,
  FLAG_LQ_OCEAN = 0x8,
  FLAG_LQ_MAGMA = 0x10,
};

(MCVT) sub-chunk

No chunk name and no size.

It's composed of the usual 145 floats, but their order is different : alpha vertices are not interleaved... Which means there are all outer vertices first (all 81), then all inner vertices (all 64) in MCVT (and not 9-8-9-8 etc.). Unlike 3.x format, MCVT have absolute height values (no height relative to MCNK header 0x70).

(MCNR) sub-chunk

No chunk name and no size.

Same as 3.x format, except values order which is like alpha MCVT : all outer values first, then all inner ones.

struct SMNormal
{
  uint8_t n[145][3];
  uint8_t pad[13];
};

MCLY sub-chunk

See the new files.

struct SMLayer
{
  uint32_t textureId;
  uint32_t props;
  uint32_t offsAlpha;
  uint16_t effectId;
  uint8_t pad[2];
};

MCRF sub-chunk

Since there are no MMDX/MWMO MMID/MWID in alpha ADT, MCRF entries directly point to index in MDNM and MONM chunks.

(MCSH) sub-chunk

No chunk name and no size.

See the new files.

(MCAL) sub-chunk

No chunk name and no size.

See the new files.

(MCLQ) sub-chunk

No chunk name and no size.

See the new files.

(MCSE) sub-chunk

No chunk name and no size.

struct CWSoundEmitter
{
  uint32_t soundPointID;
  uint32_t soundNameID;
  C3Vector pos;
  float minDistance;
  float maxDistance;
  float cutoffDistance;
  uint32_t startTime;
  uint32_t endTime;
  uint32_t mode;
  uint32_t groupSilenceMin;
  uint32_t groupSilenceMax;
  uint32_t playInstancesMin;
  uint32_t playInstancesMax;
  uint32_t loopCountMin;
  uint32_t loopCountMax;
  uint32_t interSoundGapMin;
  uint32_t interSoundGapMax;
};

MDX

The old Model-Format, it's a lightly modified WC3-Modelformat. ChunkedStructure

'MDLX' Identifier(no chunk size!)

'VERS' 0x514 Version Chunk

'MODL':

  • char Name[80];
  • char AnimationFileName[260];
  • float BoundsRadius;
  • Vector3D MinimumExtent;
  • Vector3D MaximumExtent;
  • int BlendTime;
  • char unk;//oO

'SEQS'

  • int nSequences;

array[nSequences] of:

  • char Name[80];
  • int IntervalStart;
  • int IntervalEnd;
  • float MoveSpeed;//only for animations were you move
  • int Flags; //0 - Looping 1 - NonLooping
  • Vector3D MinimumExtent;
  • Vector3D MaximumExtent;
  • float Rarity;//?
  • int SyncPoint;//?
  • float BoundsRadius;//?
  • int unknown;//?
  • int PlaybackSpeed;//?

'GLBS'

  • int GlobalSequence;

'MTLS'

  • int nMaterials;
  • int unk;

array[nMaterials] of:

  • int InclusiveSize;
  • int PriorityPlane;
  • int Flags;
  • int InclusiveSize2;
  • int FilterMode;
  • int ShadingFlags;
  • int TextureId;
  • int TextureAnimationId;
  • int CoordId;
  • float Alpha;

'TEXS' array of:

  • int ReplaceableId;
  • char FileName[260] ;
  • int Flags

'GEOS'

  • int nGeos;
  • int unk;

array[nGeos] of:

  • char vert[4];//'VRTX'
  • int NrOfVertexPositions;
  • Vector3D vpos[NrOfVertexPositions];
  • char norm[4];//'NRMS'
  • int NrOfVertexNormals;
  • Vector3D vnorm[NrOfVertexNormals];
  • char uvas[4];//'UVAS'
  • int NrOfTextureVertexGroups;
  • Vector2D unk[NrOfVertexNormals];
  • char ptyp[4];//'PTYP'
  • int NrOfFaceTypeGroups;
  • char FaceType[NrOfFaceTypeGroups];
  • char pcnt[4];//'PCNT'
  • int NrOfFaceGroups;
  • int NrOfIndexes[NrOfFaceGroups];
  • char pvtx[4];//'PVTX'
  • int TotalNrOfIndexes;

local int TotalNrOfFaces = TotalNrOfIndexes / 3;

  • Triangle Face[TotalNrOfFaces] ;
  • char gndx[4];//'GNDX'
  • int NrOfVertexGroups;
  • byte MatrixGroup[NrOfVertexGroups];
  • char mtgc[4];//'MTGC'
  • int NrOfMatrixGroups;
  • int MatrixGroupSize[NrOfMatrixGroups];
  • char mats[4];//'MATS'
  • int NrOfMatrixIndexes;
  • int MatrixIndex[NrOfMatrixIndexes];
  • char bidx[4];//'BIDX'
  • int nBidx;
  • int Bidx[nBidx];
  • char bwgt[4];
  • int nBwgt;//'BWGT'
  • float Bwgt[nBwgt];
  • int MaterialId;
  • int SelectionGroup;
  • int SelectionFlags;
  • float BoundsRadius;
  • Vector3D MinimumExtent;
  • Vector3D MaximumExtent;
  • int NrOfExtents;
  • Vector6D Extent[NrOfExtents];
  • float unk_[15];

'BONE'

'KGRT' Animated geoset rotation

'WOQC'

'KGSC' Animated geoset scaling

'PIVT'

'CAMS'

'EVTS'

'KEVT'

'NRMS'