AzerothCore 3.3.5a
OpenSource WoW Emulator
|
#include "Map.h"
Public Member Functions | |
GridMap () | |
~GridMap () | |
bool | loadData (char *filaname) |
void | unloadData () |
uint16 | getArea (float x, float y) const |
float | getHeight (float x, float y) const |
float | getMinHeight (float x, float y) const |
float | getLiquidLevel (float x, float y) const |
LiquidData const | GetLiquidData (float x, float y, float z, float collisionHeight, uint8 ReqLiquidType) const |
Private Types | |
typedef float(GridMap::* | GetHeightPtr) (float x, float y) const |
Private Member Functions | |
bool | loadAreaData (FILE *in, uint32 offset, uint32 size) |
bool | loadHeightData (FILE *in, uint32 offset, uint32 size) |
bool | loadLiquidData (FILE *in, uint32 offset, uint32 size) |
bool | loadHolesData (FILE *in, uint32 offset, uint32 size) |
bool | isHole (int row, int col) const |
float | getHeightFromFloat (float x, float y) const |
float | getHeightFromUint16 (float x, float y) const |
float | getHeightFromUint8 (float x, float y) const |
float | getHeightFromFlat (float x, float y) const |
Private Attributes | |
uint32 | _flags |
union { | |
float * m_V9 | |
uint16 * m_uint16_V9 | |
uint8 * m_uint8_V9 | |
}; | |
union { | |
float * m_V8 | |
uint16 * m_uint16_V8 | |
uint8 * m_uint8_V8 | |
}; | |
int16 * | _maxHeight |
int16 * | _minHeight |
float | _gridHeight |
float | _gridIntHeightMultiplier |
uint16 * | _areaMap |
float | _liquidLevel |
uint16 * | _liquidEntry |
uint8 * | _liquidFlags |
float * | _liquidMap |
uint16 | _gridArea |
uint16 | _liquidGlobalEntry |
uint8 | _liquidGlobalFlags |
uint8 | _liquidOffX |
uint8 | _liquidOffY |
uint8 | _liquidWidth |
uint8 | _liquidHeight |
uint16 * | _holes |
GetHeightPtr | _gridGetHeight |
|
private |
GridMap::GridMap | ( | ) |
References _areaMap, _flags, _gridArea, _gridGetHeight, _gridHeight, _gridIntHeightMultiplier, _holes, _liquidEntry, _liquidFlags, _liquidGlobalEntry, _liquidGlobalFlags, _liquidHeight, _liquidLevel, _liquidMap, _liquidOffX, _liquidOffY, _liquidWidth, _maxHeight, _minHeight, getHeightFromFlat(), INVALID_HEIGHT, m_V8, and m_V9.
GridMap::~GridMap | ( | ) |
References unloadData().
uint16 GridMap::getArea | ( | float | x, |
float | y | ||
) | const |
References _areaMap, _gridArea, and SIZE_OF_GRIDS.
Referenced by Map::GetFullTerrainStatusForPosition(), and GetLiquidData().
|
inline |
Referenced by Map::GetFullTerrainStatusForPosition(), and GetLiquidData().
|
private |
References _gridHeight.
Referenced by GridMap(), loadHeightData(), and unloadData().
|
private |
References _gridHeight, INVALID_HEIGHT, isHole(), m_V8, m_V9, MAP_RESOLUTION, and SIZE_OF_GRIDS.
Referenced by loadHeightData().
|
private |
References _gridHeight, _gridIntHeightMultiplier, INVALID_HEIGHT, isHole(), m_uint16_V8, m_uint16_V9, MAP_RESOLUTION, and SIZE_OF_GRIDS.
Referenced by loadHeightData().
|
private |
References _gridHeight, _gridIntHeightMultiplier, INVALID_HEIGHT, isHole(), m_uint8_V8, m_uint8_V9, MAP_RESOLUTION, and SIZE_OF_GRIDS.
Referenced by loadHeightData().
|
inline |
References _liquidEntry, _liquidFlags, _liquidGlobalEntry, _liquidGlobalFlags, _liquidLevel, _liquidMap, _liquidOffX, _liquidOffY, _liquidWidth, LiquidData::DepthLevel, LiquidData::Entry, LiquidData::Flags, getArea(), getHeight(), LiquidData::Level, LIQUID_MAP_ABOVE_WATER, LIQUID_MAP_IN_WATER, LIQUID_MAP_UNDER_WATER, LIQUID_MAP_WATER_WALK, MAP_LIQUID_TYPE_DARK_WATER, MAP_RESOLUTION, sAreaTableStore, SIZE_OF_GRIDS, sLiquidTypeStore, and LiquidData::Status.
Referenced by Map::GetFullTerrainStatusForPosition().
float GridMap::getLiquidLevel | ( | float | x, |
float | y | ||
) | const |
References _liquidHeight, _liquidLevel, _liquidMap, _liquidOffX, _liquidOffY, _liquidWidth, INVALID_HEIGHT, MAP_RESOLUTION, and SIZE_OF_GRIDS.
float GridMap::getMinHeight | ( | float | x, |
float | y | ||
) | const |
References _minHeight, Cell::CellX(), Cell::CellY(), CENTER_GRID_ID, Cell::GridX(), Cell::GridY(), MAX_NUMBER_OF_CELLS, and SIZE_OF_GRIDS.
|
private |
References _holes, holetab_h, and holetab_v.
Referenced by getHeightFromFloat(), getHeightFromUint16(), and getHeightFromUint8().
References _areaMap, _gridArea, u_map_magic::asUInt, map_areaHeader::flags, map_areaHeader::fourcc, map_areaHeader::gridArea, MAP_AREA_NO_AREA, and MapAreaMagic.
Referenced by loadData().
bool GridMap::loadData | ( | char * | filaname | ) |
References map_fileheader::areaMapOffset, map_fileheader::areaMapSize, u_map_magic::asUInt, map_fileheader::heightMapOffset, map_fileheader::heightMapSize, map_fileheader::holesOffset, map_fileheader::holesSize, map_fileheader::liquidMapOffset, map_fileheader::liquidMapSize, loadAreaData(), loadHeightData(), loadHolesData(), loadLiquidData(), LOG_ERROR, MapMagic, map_fileheader::mapMagic, MapVersionMagic, unloadData(), and map_fileheader::versionMagic.
References _gridGetHeight, _gridHeight, _gridIntHeightMultiplier, _maxHeight, _minHeight, u_map_magic::asUInt, map_heightHeader::flags, map_heightHeader::fourcc, getHeightFromFlat(), getHeightFromFloat(), getHeightFromUint16(), getHeightFromUint8(), map_heightHeader::gridHeight, map_heightHeader::gridMaxHeight, m_uint16_V8, m_uint16_V9, m_uint8_V8, m_uint8_V9, m_V8, m_V9, MAP_HEIGHT_AS_INT16, MAP_HEIGHT_AS_INT8, MAP_HEIGHT_HAS_FLIGHT_BOUNDS, MAP_HEIGHT_NO_HEIGHT, and MapHeightMagic.
Referenced by loadData().
References _liquidEntry, _liquidFlags, _liquidGlobalEntry, _liquidGlobalFlags, _liquidHeight, _liquidLevel, _liquidMap, _liquidOffX, _liquidOffY, _liquidWidth, u_map_magic::asUInt, map_liquidHeader::flags, map_liquidHeader::fourcc, map_liquidHeader::height, map_liquidHeader::liquidFlags, map_liquidHeader::liquidLevel, map_liquidHeader::liquidType, MAP_LIQUID_NO_HEIGHT, MAP_LIQUID_NO_TYPE, MapLiquidMagic, map_liquidHeader::offsetX, map_liquidHeader::offsetY, and map_liquidHeader::width.
Referenced by loadData().
void GridMap::unloadData | ( | ) |
References _areaMap, _gridGetHeight, _holes, _liquidEntry, _liquidFlags, _liquidMap, _maxHeight, _minHeight, getHeightFromFlat(), m_V8, and m_V9.
Referenced by loadData(), Map::UnloadGrid(), and ~GridMap().
union { ... } GridMap::@295 |
union { ... } GridMap::@297 |
|
private |
Referenced by getArea(), GridMap(), loadAreaData(), and unloadData().
|
private |
Referenced by getArea(), GridMap(), and loadAreaData().
|
private |
Referenced by GridMap(), loadHeightData(), and unloadData().
|
private |
Referenced by getHeightFromFlat(), getHeightFromFloat(), getHeightFromUint16(), getHeightFromUint8(), GridMap(), and loadHeightData().
|
private |
Referenced by getHeightFromUint16(), getHeightFromUint8(), GridMap(), and loadHeightData().
|
private |
Referenced by GridMap(), isHole(), loadHolesData(), and unloadData().
|
private |
Referenced by GetLiquidData(), GridMap(), loadLiquidData(), and unloadData().
|
private |
Referenced by GetLiquidData(), GridMap(), loadLiquidData(), and unloadData().
|
private |
Referenced by GetLiquidData(), GridMap(), and loadLiquidData().
|
private |
Referenced by GetLiquidData(), GridMap(), and loadLiquidData().
|
private |
Referenced by getLiquidLevel(), GridMap(), and loadLiquidData().
|
private |
Referenced by GetLiquidData(), getLiquidLevel(), GridMap(), and loadLiquidData().
|
private |
Referenced by GetLiquidData(), getLiquidLevel(), GridMap(), loadLiquidData(), and unloadData().
|
private |
Referenced by GetLiquidData(), getLiquidLevel(), GridMap(), and loadLiquidData().
|
private |
Referenced by GetLiquidData(), getLiquidLevel(), GridMap(), and loadLiquidData().
|
private |
Referenced by GetLiquidData(), getLiquidLevel(), GridMap(), and loadLiquidData().
|
private |
Referenced by GridMap(), loadHeightData(), and unloadData().
|
private |
Referenced by getMinHeight(), GridMap(), loadHeightData(), and unloadData().
uint16* GridMap::m_uint16_V8 |
Referenced by getHeightFromUint16(), and loadHeightData().
uint16* GridMap::m_uint16_V9 |
Referenced by getHeightFromUint16(), and loadHeightData().
uint8* GridMap::m_uint8_V8 |
Referenced by getHeightFromUint8(), and loadHeightData().
uint8* GridMap::m_uint8_V9 |
Referenced by getHeightFromUint8(), and loadHeightData().
float* GridMap::m_V8 |
Referenced by getHeightFromFloat(), GridMap(), loadHeightData(), and unloadData().
float* GridMap::m_V9 |
Referenced by getHeightFromFloat(), GridMap(), loadHeightData(), and unloadData().