WDL/v18: Difference between revisions

From wowdev
Jump to navigation Jump to search
(-->MAHO chunk)
No edit summary
Line 9: Line 9:
*'''Map Area Offset.'''  
*'''Map Area Offset.'''  


Contains 64*64 = 4096 unsigned 32-bit integers, these are absolute offsets in the file to each map tile's low-res heightmap contained in a MARE chunk. For unused tiles the value is 0.
Contains 64*64 = 4096 unsigned 32-bit integers, these are absolute offsets in the file to each map tile's MapAreaLow-array-entry. For unused tiles the value is 0.


  /*000h*/ UINT32 areaLowOffsets[4096];
  /*000h*/ UINT32 areaLowOffsets[4096];
Line 15: Line 15:
  /*000h*/ UINT32 areaLowOffsets[64][64];
  /*000h*/ UINT32 areaLowOffsets[64][64];


==  MARE chunks ==
==MapAreaLow array==
===  MARE chunks ===
*'''Map Area'''  
*'''Map Area'''  


Heightmap for one map tile. Contains 17*17 + 16*16 = 545 signed 16-bit integers. So a 17 by 17 grid of height values is given, with additional height values in between grid points. Here, the "outer" 17x17 points are listed (in the usual row major order), followed by 16x16 "inner" points. The height values are on the same scale as those used in the regular height maps.
Heightmap for one map tile. Contains 17*17 + 16*16 = 545 signed 16-bit integers. So a 17 by 17 grid of height values is given, with additional height values in between grid points. Here, the "outer" 17x17 points are listed (in the usual row major order), followed by 16x16 "inner" points. The height values are on the same scale as those used in the regular height maps.


== MAHO chunks ==
=== MAHO chunks ===
After each MARE chunk there follows a MAHO chunk. It may be left out if the data is supposed to be 0 all the time.


Its an array of 16 shorts. Each short is a bitmask. If the bit is not set, 0xC is added to a value. If its set, there is nothing added to the value. The value is stored and later accessed.


After each MARE chunk there follows a MAHO chunk. I haven't seen ones containing Data. Size seems to be always 0x20. Perhaps just padding?
The chunk is stored at MapAreaLow + 0x8C0, the value (the added up 0xCs or 0xC00 if no chunk was present) is stored at MapAreaLow + 0x8E0. I did not investigate this further, but I guess, its something with liquids. But IDFK.

Revision as of 22:18, 13 July 2009

WDL files contain a low-resolution heightmap for a world. This is probably what the WoW client uses to draw the solid-colored mountain ranges in the background ('in front of' the sky, but 'behind' the fog and the rest of the scenery). It can also be conveniently used to construct a minimap - however, since no water level information is present, the best guess is 0 (sea level) - this results in some lower-than-sea-level areas being blue on the WoWmapview minimap. Oh well. :)

  • Someone told me that the use of WDL files was actually to determine pathing (especially for NPCs). We still need a confirmation on what they're for though. -DG

MAOF chunk

  • Map Area Offset.

Contains 64*64 = 4096 unsigned 32-bit integers, these are absolute offsets in the file to each map tile's MapAreaLow-array-entry. For unused tiles the value is 0.

/*000h*/ UINT32 areaLowOffsets[4096];
or
/*000h*/ UINT32 areaLowOffsets[64][64];

MapAreaLow array

MARE chunks

  • Map Area

Heightmap for one map tile. Contains 17*17 + 16*16 = 545 signed 16-bit integers. So a 17 by 17 grid of height values is given, with additional height values in between grid points. Here, the "outer" 17x17 points are listed (in the usual row major order), followed by 16x16 "inner" points. The height values are on the same scale as those used in the regular height maps.

MAHO chunks

After each MARE chunk there follows a MAHO chunk. It may be left out if the data is supposed to be 0 all the time.

Its an array of 16 shorts. Each short is a bitmask. If the bit is not set, 0xC is added to a value. If its set, there is nothing added to the value. The value is stored and later accessed.

The chunk is stored at MapAreaLow + 0x8C0, the value (the added up 0xCs or 0xC00 if no chunk was present) is stored at MapAreaLow + 0x8E0. I did not investigate this further, but I guess, its something with liquids. But IDFK.