summaryrefslogtreecommitdiffstats
path: root/src/Map.h
diff options
context:
space:
mode:
authorandrew <xdotftw@gmail.com>2014-02-14 15:21:16 +0100
committerandrew <xdotftw@gmail.com>2014-02-14 15:21:16 +0100
commit5b92b877bcc0c5072dbea98b6c54106f954aa758 (patch)
treefa91320608d925cac74804fd44597198e2f3760e /src/Map.h
parentIDCount Serialization (diff)
downloadcuberite-5b92b877bcc0c5072dbea98b6c54106f954aa758.tar
cuberite-5b92b877bcc0c5072dbea98b6c54106f954aa758.tar.gz
cuberite-5b92b877bcc0c5072dbea98b6c54106f954aa758.tar.bz2
cuberite-5b92b877bcc0c5072dbea98b6c54106f954aa758.tar.lz
cuberite-5b92b877bcc0c5072dbea98b6c54106f954aa758.tar.xz
cuberite-5b92b877bcc0c5072dbea98b6c54106f954aa758.tar.zst
cuberite-5b92b877bcc0c5072dbea98b6c54106f954aa758.zip
Diffstat (limited to 'src/Map.h')
-rw-r--r--src/Map.h20
1 files changed, 16 insertions, 4 deletions
diff --git a/src/Map.h b/src/Map.h
index dbb15afdd..c443445de 100644
--- a/src/Map.h
+++ b/src/Map.h
@@ -26,28 +26,33 @@ class cWorld;
+// tolua_begin
class cMap
{
public:
typedef Byte ColorID;
+ // tolua_end
+
typedef std::vector<ColorID> cColorList;
public:
- /// Construct an empty map
+ /** Construct an empty map. */
cMap(unsigned int a_ID, cWorld * a_World);
cMap(unsigned int a_ID, int a_CenterX, int a_CenterZ, cWorld * a_World, unsigned int a_Scale = 3);
- /** Update the map (Query the world) */
- void UpdateMap(void);
-
/** Send this map to the specified client. */
void SendTo(cClientHandle & a_Client);
+ // tolua_begin
+
+ /** Erase pixel data */
+ void EraseData(void);
+
void Resize(unsigned int a_Width, unsigned int a_Height);
void SetPosition(int a_CenterX, int a_CenterZ);
@@ -74,9 +79,16 @@ public:
unsigned int GetNumBlocksPerPixel(void) const;
+ // tolua_end
+
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;