From 0cce0478d846114f49c4b8fe201aee7a1bb06b22 Mon Sep 17 00:00:00 2001 From: STRWarrior Date: Mon, 10 Mar 2014 17:07:46 +0100 Subject: This allows a blockarea to have an Offset. --- src/BlockArea.cpp | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) (limited to 'src/BlockArea.cpp') diff --git a/src/BlockArea.cpp b/src/BlockArea.cpp index d07ef747a..986b2ee25 100644 --- a/src/BlockArea.cpp +++ b/src/BlockArea.cpp @@ -168,6 +168,7 @@ cBlockArea::cBlockArea(void) : m_SizeX(0), m_SizeY(0), m_SizeZ(0), + m_Offset(0,0,0), m_BlockTypes(NULL), m_BlockMetas(NULL), m_BlockLight(NULL), @@ -254,6 +255,24 @@ void cBlockArea::Create(int a_SizeX, int a_SizeY, int a_SizeZ, int a_DataTypes) +void cBlockArea::SetOffset(int a_OffsetX, int a_OffsetY, int a_OffsetZ) +{ + m_Offset.Set(a_OffsetX, a_OffsetY, a_OffsetZ); +} + + + + + +void cBlockArea::SetOffset(Vector3i a_Offset) +{ + m_Offset.Set(a_Offset.x, a_Offset.y, a_Offset.z); +} + + + + + void cBlockArea::SetOrigin(int a_OriginX, int a_OriginY, int a_OriginZ) { m_OriginX = a_OriginX; -- cgit v1.2.3 From 541175d8a08515568d75a8d6b57bc4841e273c4a Mon Sep 17 00:00:00 2001 From: STRWarrior Date: Tue, 11 Mar 2014 14:44:21 +0100 Subject: Using ```const Vector3i &``` --- src/BlockArea.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/BlockArea.cpp') diff --git a/src/BlockArea.cpp b/src/BlockArea.cpp index 986b2ee25..dfdf998df 100644 --- a/src/BlockArea.cpp +++ b/src/BlockArea.cpp @@ -264,7 +264,7 @@ void cBlockArea::SetOffset(int a_OffsetX, int a_OffsetY, int a_OffsetZ) -void cBlockArea::SetOffset(Vector3i a_Offset) +void cBlockArea::SetOffset(const Vector3i & a_Offset) { m_Offset.Set(a_Offset.x, a_Offset.y, a_Offset.z); } -- cgit v1.2.3 From e213e5f9fcb3681a5f383546e17b9800d4a4804a Mon Sep 17 00:00:00 2001 From: STRWarrior Date: Tue, 11 Mar 2014 18:23:21 +0100 Subject: Renamed m_Offset to m_WEOffset --- src/BlockArea.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/BlockArea.cpp') diff --git a/src/BlockArea.cpp b/src/BlockArea.cpp index dfdf998df..983dbe46b 100644 --- a/src/BlockArea.cpp +++ b/src/BlockArea.cpp @@ -168,7 +168,7 @@ cBlockArea::cBlockArea(void) : m_SizeX(0), m_SizeY(0), m_SizeZ(0), - m_Offset(0,0,0), + m_WEOffset(0, 0, 0), m_BlockTypes(NULL), m_BlockMetas(NULL), m_BlockLight(NULL), @@ -257,7 +257,7 @@ void cBlockArea::Create(int a_SizeX, int a_SizeY, int a_SizeZ, int a_DataTypes) void cBlockArea::SetOffset(int a_OffsetX, int a_OffsetY, int a_OffsetZ) { - m_Offset.Set(a_OffsetX, a_OffsetY, a_OffsetZ); + m_WEOffset.Set(a_OffsetX, a_OffsetY, a_OffsetZ); } @@ -266,7 +266,7 @@ void cBlockArea::SetOffset(int a_OffsetX, int a_OffsetY, int a_OffsetZ) void cBlockArea::SetOffset(const Vector3i & a_Offset) { - m_Offset.Set(a_Offset.x, a_Offset.y, a_Offset.z); + m_WEOffset.Set(a_Offset.x, a_Offset.y, a_Offset.z); } -- cgit v1.2.3 From 950614da7e700b8847f0dcc0bac9d76367801a3f Mon Sep 17 00:00:00 2001 From: madmaxoft Date: Wed, 12 Mar 2014 07:46:14 +0100 Subject: Renamed cBlockArea Offset to WEOffset. Even in getters / setters. --- src/BlockArea.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/BlockArea.cpp') diff --git a/src/BlockArea.cpp b/src/BlockArea.cpp index 983dbe46b..406e18a3b 100644 --- a/src/BlockArea.cpp +++ b/src/BlockArea.cpp @@ -255,7 +255,7 @@ void cBlockArea::Create(int a_SizeX, int a_SizeY, int a_SizeZ, int a_DataTypes) -void cBlockArea::SetOffset(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); } @@ -264,7 +264,7 @@ void cBlockArea::SetOffset(int a_OffsetX, int a_OffsetY, int a_OffsetZ) -void cBlockArea::SetOffset(const Vector3i & a_Offset) +void cBlockArea::SetWEOffset(const Vector3i & a_Offset) { m_WEOffset.Set(a_Offset.x, a_Offset.y, a_Offset.z); } -- cgit v1.2.3