1
0

BlockArea: Create() can take the size as Vector3i, too.

This commit is contained in:
madmaxoft 2014-03-25 22:05:45 +01:00
parent 87e0bd54b4
commit 87de596078
2 changed files with 17 additions and 2 deletions

@ -240,6 +240,15 @@ void cBlockArea::Create(int a_SizeX, int a_SizeY, int a_SizeZ, int a_DataTypes)
void cBlockArea::Create(const Vector3i & a_Size, int a_DataTypes)
{
Create(a_Size.x, a_Size.y, a_Size.z, a_DataTypes);
}
void cBlockArea::SetWEOffset(int a_OffsetX, int a_OffsetY, int a_OffsetZ) void cBlockArea::SetWEOffset(int a_OffsetX, int a_OffsetY, int a_OffsetZ)
{ {
m_WEOffset.Set(a_OffsetX, a_OffsetY, a_OffsetZ); m_WEOffset.Set(a_OffsetX, a_OffsetY, a_OffsetZ);

@ -59,12 +59,18 @@ public:
/** Clears the data stored to reclaim memory */ /** Clears the data stored to reclaim memory */
void Clear(void); void Clear(void);
/** Creates a new area of the specified size and contents. /** Creates a new area of the specified size and contents.
Origin is set to all zeroes. Origin is set to all zeroes.
BlockTypes are set to air, block metas to zero, blocklights to zero and skylights to full light. BlockTypes are set to air, block metas to zero, blocklights to zero and skylights to full light.
*/ */
void Create(int a_SizeX, int a_SizeY, int a_SizeZ, int a_DataTypes = baTypes | baMetas); void Create(int a_SizeX, int a_SizeY, int a_SizeZ, int a_DataTypes = baTypes | baMetas);
/** Creates a new area of the specified size and contents.
Origin is set to all zeroes.
BlockTypes are set to air, block metas to zero, blocklights to zero and skylights to full light.
*/
void Create(const Vector3i & a_Size, int a_DataTypes = baTypes | baMetas);
/** Resets the origin. No other changes are made, contents are untouched. */ /** Resets the origin. No other changes are made, contents are untouched. */
void SetOrigin(int a_OriginX, int a_OriginY, int a_OriginZ); void SetOrigin(int a_OriginX, int a_OriginY, int a_OriginZ);