Chunk: Difference between revisions

From wowdev
Jump to navigation Jump to search
mNo edit summary
No edit summary
Line 1: Line 1:
*[[WDT]], [[ADT]], [[WMO]] and [[WDL]] files follow a chunked structure similar to IFF, consisting of chunks of the following format:
*[[WDT]], [[ADT]], [[WMO]] and [[WDL]] files follow a chunked structure similar to IFF, consisting of chunks of the following format:


  '''Offset Type Description'''
  struct IffChunk
0x0 char [4] Chunk identifier - in reverse character order
  {
0x4 uint32 Chunk size
  uint32_t token; // or "magic" or "identifier"
  0x8 size*bytes Chunk data
  uint32_t size;
  uint8_t data[size];
  };


*The initial chunk in all of these files is an MVER chunk, specifying the version of the files in a 32-bit integer.
*The initial chunk in most of these files is an MVER chunk, specifying the version of the files in a 32-bit integer.
*All files use Intel (little-endian) byte order.
*All files use Intel (little-endian) byte order.


[[Category:Auxiliary]]
[[Category:Auxiliary]]

Revision as of 03:21, 22 November 2015

  • WDT, ADT, WMO and WDL files follow a chunked structure similar to IFF, consisting of chunks of the following format:
struct IffChunk
{
  uint32_t token; // or "magic" or "identifier"
  uint32_t size;
  uint8_t data[size];
};
  • The initial chunk in most of these files is an MVER chunk, specifying the version of the files in a 32-bit integer.
  • All files use Intel (little-endian) byte order.