diff options
Diffstat (limited to 'source/BlockArea.h')
-rw-r--r-- | source/BlockArea.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/source/BlockArea.h b/source/BlockArea.h index d9b21d933..797c37de6 100644 --- a/source/BlockArea.h +++ b/source/BlockArea.h @@ -59,6 +59,9 @@ public: // TODO: Write() is not too good an interface: if it fails, there's no way to repeat only for the parts that didn't write
// A better way may be to return a list of cBlockAreas for each part that didn't succeed writing, so that the caller may try again
+ /// Crops the internal contents by the specified amount of blocks from each border.
+ void Crop(int a_AddMinX, int a_SubMaxX, int a_AddMinY, int a_SubMaxY, int a_AddMinZ, int a_SubMaxZ);
+
// Setters:
void SetRelBlockType (int a_RelX, int a_RelY, int a_RelZ, BLOCKTYPE a_BlockType);
void SetBlockType (int a_BlockX, int a_BlockY, int a_BlockZ, BLOCKTYPE a_BlockType);
@@ -135,6 +138,8 @@ protected: virtual void BlockSkyLight(const NIBBLETYPE * a_BlockSkyLight) override;
} ;
+ typedef NIBBLETYPE * NIBBLEARRAY;
+
int m_OriginX;
int m_OriginY;
@@ -157,6 +162,10 @@ protected: // Basic Getters:
NIBBLETYPE GetRelNibble(int a_RelX, int a_RelY, int a_RelZ, NIBBLETYPE * a_Array) const;
NIBBLETYPE GetNibble (int a_BlockX, int a_BlockY, int a_BlockZ, NIBBLETYPE * a_Array) const;
+
+ // Crop helpers:
+ void CropBlockTypes(int a_AddMinX, int a_SubMaxX, int a_AddMinY, int a_SubMaxY, int a_AddMinZ, int a_SubMaxZ);
+ void CropNibbles (NIBBLEARRAY & a_Array, int a_AddMinX, int a_SubMaxX, int a_AddMinY, int a_SubMaxY, int a_AddMinZ, int a_SubMaxZ);
// tolua_begin
} ;
|