From cf96e69716e0ccd0657cf275720bb11b915361c4 Mon Sep 17 00:00:00 2001 From: andrew Date: Sat, 15 Feb 2014 20:06:47 +0200 Subject: cMap::UpdateRadius --- src/Map.h | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) (limited to 'src/Map.h') diff --git a/src/Map.h b/src/Map.h index c443445de..4134d53a1 100644 --- a/src/Map.h +++ b/src/Map.h @@ -21,6 +21,7 @@ class cClientHandle; class cWorld; +class cPlayer; @@ -48,6 +49,11 @@ public: /** Send this map to the specified client. */ void SendTo(cClientHandle & a_Client); + /** Update a circular region with the specified radius and center (in pixels). */ + void UpdateRadius(int a_PixelX, int a_PixelZ, unsigned int a_Radius); + + void UpdateRadius(cPlayer & a_Player, unsigned int a_Radius); + // tolua_begin /** Erase pixel data */ @@ -71,13 +77,15 @@ public: cWorld * GetWorld(void) { return m_World; } + AString GetName(void) { return m_Name; } + eDimension GetDimension(void) const; const cColorList & GetData(void) const { return m_Data; } unsigned int GetNumPixels(void) const; - unsigned int GetNumBlocksPerPixel(void) const; + unsigned int GetPixelWidth(void) const; // tolua_end @@ -87,8 +95,6 @@ private: /** Update the specified pixel. */ bool UpdatePixel(unsigned int a_X, unsigned int a_Y); - void PixelToWorldCoords(unsigned int a_X, unsigned int a_Y, int & a_WorldX, int & a_WorldY); - unsigned int m_ID; unsigned int m_Width; @@ -105,6 +111,11 @@ private: cWorld * m_World; + //typedef std::vector cPlayerList; + //cPlayerList m_TrackedPlayers; + + AString m_Name; + friend class cMapSerializer; }; -- cgit v1.2.3