ADT/v18: Difference between revisions

From wowdev
Jump to navigation Jump to search
Line 13: Line 13:
==  MHDR chunk ==
==  MHDR chunk ==


struct SMAreaHeader // 03-29-2005 By ObscuR
struct SMAreaHeader // 03-29-2005 By ObscuR
{
{
  /*000h*/  UINT32 pad;
  /*000h*/  UINT32 pad;
  /*004h*/  UINT32 offsInfo;
  /*004h*/  UINT32 offsInfo;
Line 32: Line 32:
  /*03Ch*/  UINT32 pad7;
  /*03Ch*/  UINT32 pad7;
  /*040h*/
  /*040h*/
};
};


Header chunk. Contains offsets (relative to 0x14) for some other chunks that appear in the file. Since the file follows a well-defined structure, this is redundant information.
Header chunk. Contains offsets (relative to 0x14) for some other chunks that appear in the file. Since the file follows a well-defined structure, this is redundant information.


==  MCIN chunk ==
==  MCIN chunk ==

Revision as of 23:41, 20 July 2007

Retrived from; http://wowdev.org/wiki/index.php/ADT


ADT Files

ADT files contain terrain and object information for map tiles. They have a chunked structure just like the WDT files.

A map tile is split up into 16x16 = 256 map chunks. (not the same as file chunks, although each map chunk will have its own file chunk :) ) So there will be a few initial data chunks to specify textures, objects, models, etc. followed by 256 MCNK (mapchunk) chunks :) Each MCNK chunk has a small header of its own, and additional chunks within its data block, following the same id-size-data format.


MHDR chunk

struct SMAreaHeader // 03-29-2005 By ObscuR
{
/*000h*/  UINT32 pad;
/*004h*/  UINT32 offsInfo;		
/*008h*/  UINT32 offsTex;		
/*00Ch*/  UINT32 offsModels;		
/*010h*/  UINT32 offsModelsIds;		
/*014h*/  UINT32 offsMapObejcts;		
/*018h*/  UINT32 offsMapObejctsIds;		
/*01Ch*/  UINT32 offsDoodsDef;		
/*020h*/  UINT32 offsObjectsDef;	
/*024h*/  UINT32 pad1;	
/*028h*/  UINT32 pad2;		
/*02Ch*/  UINT32 pad3;	
/*030h*/  UINT32 pad4;		
/*034h*/  UINT32 pad5;		
/*038h*/  UINT32 pad6;		
/*03Ch*/  UINT32 pad7;	
/*040h*/
};

Header chunk. Contains offsets (relative to 0x14) for some other chunks that appear in the file. Since the file follows a well-defined structure, this is redundant information.

MCIN chunk

Index for MCNK chunks. Contains 256 records of 16 bytes, which have the following format:


Offset	Type		Description
0x0	uint32		MCNK chunk absolute offset
0x4	uint32		MCNK size in bytes
0x8	8 bytes		0


struct SMChunkInfo // 03-29-2005 By ObscuR
{
/*000h*/  UINT32 offset;
/*004h*/  UINT32 size;		
/*008h*/  UINT32 flags;		
/*00Ch*/  UINT32 asyncId;;		
/*010h*/  		
};

This is also redundant information but kind of convenient.