ADT/v18: Difference between revisions
Line 42: | Line 42: | ||
Index for MCNK chunks. Contains 256 records of 16 bytes, which have the following format: | Index for MCNK chunks. Contains 256 records of 16 bytes, which have the following format: | ||
< | <nowiki> | ||
0x0 | Offset Type Description | ||
0x4 | 0x0 uint32 MCNK chunk absolute offset | ||
0x8 | 0x4 uint32 MCNK size in bytes | ||
0x8 8 bytes 0 | |||
</nowiki> | |||
struct SMChunkInfo // 03-29-2005 By ObscuR | struct SMChunkInfo // 03-29-2005 By ObscuR |
Revision as of 23:39, 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.