New Map Format
From mangos
Current system
Currently there are two mapfile formats: .map and .vmap. While .map file contain only terrain information available in adt files, vmaps are used to calculate collisions caused by WMOs such as trees, houses, caves etc.
To achieve this, vmaps disassemble WMOs to a lot of triangles. This makes collision detection easier in terms of efficiency, but many information are lost. WMOs describe liquids which allows fishing independently of the water level (see this bugreport), define indoor/outdoor flags (required for dismounting in buildings) and have an areaid which overrides the default one of the terrain. The last problem is currently solved using hacks.
New system
To solve those limitations, it has been proposed to merge all information into a new map format. It will be based on the default .map format and keeps its grid based partition.
Format
Mapfiles are named in the pattern MMMXXYY.map where MMM is the mapid, XX the x grid and YY the y grid offset. Each file starts with a header which contains the following information:
uint32 mapMagic; uint32 versionMagic; uint32 buildMagic; uint32 areaMapOffset; uint32 areaMapSize; uint32 heightMapOffset; uint32 heightMapSize; uint32 liquidMapOffset; uint32 liquidMapSize; TODO: add new vmap/wmo parts here
The header is followed by the actual data. Every offset in the header points to a place in this blob.