ADT/v18: Difference between revisions

From wowdev
Jump to navigation Jump to search
Line 10: Line 10:
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.
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.


== few? ==
 
few are dew
== MHDR chunk ==
 
<math>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*/
};</math>
 
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.

Revision as of 23:31, 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

<math>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*/

};</math>

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.