polserver/pol-core/plib/mapblock.h
Kevin Eady 814f864989
Fix map crash on edges in Tokuno; Introduce Realm Descriptor versioning (#634)
* Update solidx size, shift, cellmask to 8, 3, 7

* Introduce realm descriptor versioning

* Add core-changes

* Update breaking-changes.txt
2024-03-18 20:47:29 +01:00

28 lines
452 B
C++

/** @file
*
* @par History
*
* @note a map block is a 64x64 cell area of a map.
* @note Since a mapcell is 2 bytes, each map block is 8K.
*/
#ifndef PLIB_MAPBLOCK_H
#define PLIB_MAPBLOCK_H
#include "mapcell.h"
namespace Pol
{
namespace Plib
{
const unsigned MAPBLOCK_CHUNK = 8;
const unsigned MAPBLOCK_SHIFT = 3;
const unsigned MAPBLOCK_CELLMASK = 7;
struct MAPBLOCK
{
MAPCELL cell[MAPBLOCK_CHUNK][MAPBLOCK_CHUNK]; // [x][y]
};
}
}
#endif