117 cMap(
unsigned int a_ID,
int a_CenterX,
int a_CenterZ,
cWorld * a_World,
unsigned int a_Scale = 3);
124 void UpdateRadius(
int a_PixelX,
int a_PixelZ,
unsigned int a_Radius);
134 void Resize(
unsigned int a_Width,
unsigned int a_Height);
175 bool UpdatePixel(
unsigned int a_X,
unsigned int a_Z);
eDimension
Dimension of a world.
Encapsulates a map decorator.
@ E_TYPE_PLAYER_OUTSIDE
Player outside of the boundaries of the map.
unsigned int GetPixelX(void) const
eType GetType(void) const
cMapDecorator(eType a_Type, unsigned int a_X, unsigned int a_Z, int a_Rot)
unsigned int GetPixelZ(void) const
Encapsulates an in-game world map.
eDimension GetDimension(void) const
const cMapDecoratorList GetDecorators(void) const
unsigned int GetHeight(void) const
void Tick()
Sends a map update to all registered clients Clears the list holding registered clients and decorator...
const cColorList & GetData(void) const
unsigned int m_Scale
The zoom level, 2^scale square blocks per pixel.
cMapDecoratorList m_Decorators
ColorID GetPixel(unsigned int a_X, unsigned int a_Z)
std::vector< cClientHandle * > cMapClientList
unsigned int GetWidth(void) const
void SetScale(unsigned int a_Scale)
void SetPosition(int a_CenterX, int a_CenterZ)
void UpdateClient(cPlayer *a_Player)
Send next update packet to the specified player and remove invalid decorators / clients.
unsigned int GetNumPixels(void) const
cMapClientList m_ClientsInCurrentTick
int GetCenterZ(void) const
bool SetPixel(unsigned int a_X, unsigned int a_Z, ColorID a_Data)
unsigned int GetScale(void) const
std::vector< cMapDecorator > cMapDecoratorList
int GetCenterX(void) const
void UpdateRadius(int a_PixelX, int a_PixelZ, unsigned int a_Radius)
Update a circular region with the specified radius and center (in pixels).
void Resize(unsigned int a_Width, unsigned int a_Height)
std::vector< ColorID > cColorList
@ E_BASE_COLOR_LIGHT_BROWN
@ E_BASE_COLOR_DARK_BROWN
@ E_BASE_COLOR_LIGHT_GRAY
@ E_BASE_COLOR_LIGHT_BLUE
@ E_BASE_COLOR_DARK_GREEN
@ E_BASE_COLOR_TRANSPARENT
@ E_BASE_COLOR_LIGHT_GREEN
bool UpdatePixel(unsigned int a_X, unsigned int a_Z)
Update the specified pixel.
const cMapDecorator CreateDecorator(const cEntity *a_TrackedEntity)
cMap(unsigned int a_ID, cWorld *a_World)
Construct an empty map.
unsigned int GetID(void) const
cColorList m_Data
Column-major array of colours.
unsigned int GetPixelWidth(void) const
Utility class used to serialize maps.