TrinityCore
MMapDefines.h
Go to the documentation of this file.
1/*
2 * This file is part of the TrinityCore Project. See AUTHORS file for Copyright information
3 *
4 * This program is free software; you can redistribute it and/or modify it
5 * under the terms of the GNU General Public License as published by the
6 * Free Software Foundation; either version 2 of the License, or (at your
7 * option) any later version.
8 *
9 * This program is distributed in the hope that it will be useful, but WITHOUT
10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
12 * more details.
13 *
14 * You should have received a copy of the GNU General Public License along
15 * with this program. If not, see <http://www.gnu.org/licenses/>.
16 */
17
18#ifndef MMapDefines_h__
19#define MMapDefines_h__
20
21#include "Define.h"
22#include "DetourNavMesh.h"
23
24const uint32 MMAP_MAGIC = 0x4d4d4150; // 'MMAP'
25#define MMAP_VERSION 15
26
28{
34 char padding[3];
35
36 MmapTileHeader() : mmapMagic(MMAP_MAGIC), dtVersion(DT_NAVMESH_VERSION),
38};
39
40// All padding fields must be handled and initialized to ensure mmaps_generator will produce binary-identical *.mmtile files
41static_assert(sizeof(MmapTileHeader) == 20, "MmapTileHeader size is not correct, adjust the padding field size");
42static_assert(sizeof(MmapTileHeader) == (sizeof(MmapTileHeader::mmapMagic) +
45 sizeof(MmapTileHeader::size) +
47 sizeof(MmapTileHeader::padding)), "MmapTileHeader has uninitialized padding fields");
48
50{
52 // areas 1-60 will be used for destructible areas (currently skipped in vmaps, WMO with flag 1)
53 // ground is the highest value to make recast choose ground over water when merging surfaces very close to each other (shallow water would be walkable)
57 NAV_AREA_MAGMA_SLIME = 8, // don't need to differentiate between them
60 NAV_AREA_ALL_MASK = 0x3F // max allowed value
61};
62
64{
65 NAV_EMPTY = 0x00,
70};
71
72#endif // MMapDefines_h__
uint32_t uint32
Definition: Define.h:142
NavTerrainFlag
Definition: MMapDefines.h:64
@ NAV_GROUND_STEEP
Definition: MMapDefines.h:67
@ NAV_EMPTY
Definition: MMapDefines.h:65
@ NAV_GROUND
Definition: MMapDefines.h:66
@ NAV_WATER
Definition: MMapDefines.h:68
@ NAV_MAGMA_SLIME
Definition: MMapDefines.h:69
NavArea
Definition: MMapDefines.h:50
@ NAV_AREA_MIN_VALUE
Definition: MMapDefines.h:59
@ NAV_AREA_ALL_MASK
Definition: MMapDefines.h:60
@ NAV_AREA_GROUND_STEEP
Definition: MMapDefines.h:55
@ NAV_AREA_GROUND
Definition: MMapDefines.h:54
@ NAV_AREA_MAGMA_SLIME
Definition: MMapDefines.h:57
@ NAV_AREA_EMPTY
Definition: MMapDefines.h:51
@ NAV_AREA_MAX_VALUE
Definition: MMapDefines.h:58
@ NAV_AREA_WATER
Definition: MMapDefines.h:56
#define MMAP_VERSION
Definition: MMapDefines.h:25
const uint32 MMAP_MAGIC
Definition: MMapDefines.h:24
uint32 dtVersion
Definition: MMapDefines.h:30
uint32 mmapVersion
Definition: MMapDefines.h:31
char padding[3]
Definition: MMapDefines.h:34
uint32 mmapMagic
Definition: MMapDefines.h:29