summaryrefslogtreecommitdiffstats
path: root/src/ChunkDef.h
diff options
context:
space:
mode:
authorTiger Wang <ziwei.tiger@hotmail.co.uk>2014-02-01 22:40:02 +0100
committerTiger Wang <ziwei.tiger@hotmail.co.uk>2014-02-01 22:40:02 +0100
commitb0784d1931b4a6771321a0c3b33af537200bf084 (patch)
treeac217cbe473660e86010caf2512edf46670ca9b9 /src/ChunkDef.h
parentAnother Linux fix (diff)
downloadcuberite-b0784d1931b4a6771321a0c3b33af537200bf084.tar
cuberite-b0784d1931b4a6771321a0c3b33af537200bf084.tar.gz
cuberite-b0784d1931b4a6771321a0c3b33af537200bf084.tar.bz2
cuberite-b0784d1931b4a6771321a0c3b33af537200bf084.tar.lz
cuberite-b0784d1931b4a6771321a0c3b33af537200bf084.tar.xz
cuberite-b0784d1931b4a6771321a0c3b33af537200bf084.tar.zst
cuberite-b0784d1931b4a6771321a0c3b33af537200bf084.zip
Diffstat (limited to '')
-rw-r--r--src/ChunkDef.h42
1 files changed, 32 insertions, 10 deletions
diff --git a/src/ChunkDef.h b/src/ChunkDef.h
index 13933e6f1..2c50755cf 100644
--- a/src/ChunkDef.h
+++ b/src/ChunkDef.h
@@ -498,15 +498,14 @@ public:
-/// Generic template that can store any kind of data together with a triplet of 3 coords:
-template <typename X, typename Y> class cCoordWithData
+/** Generic template that can store any kind of data together with a triplet of 3 coords*/
+template <typename X> class cCoordWithData
{
public:
int x;
int y;
int z;
X Data;
- Y SecondData;
cCoordWithData(int a_X, int a_Y, int a_Z) :
x(a_X), y(a_Y), z(a_Z)
@@ -517,18 +516,41 @@ public:
x(a_X), y(a_Y), z(a_Z), Data(a_Data)
{
}
-
- cCoordWithData(int a_X, int a_Y, int a_Z, const X & a_Data, const Y & a_SecondData) :
- x(a_X), y(a_Y), z(a_Z), Data(a_Data), SecondData(a_SecondData)
- {
- }
} ;
-typedef cCoordWithData<int, void *> cCoordWithInt;
-typedef cCoordWithData<BLOCKTYPE, bool> cCoordWithBlockAndBool;
+typedef cCoordWithData<int> cCoordWithInt;
+typedef cCoordWithData<BLOCKTYPE> cCoordWithBlock;
typedef std::list<cCoordWithInt> cCoordWithIntList;
typedef std::vector<cCoordWithInt> cCoordWithIntVector;
+
+
+
+
+
+/** Generic template that can store two types of any kind of data together with a triplet of 3 coords */
+template <typename X, typename Z> class cCoordWithDoubleData
+{
+public:
+ int x;
+ int y;
+ int z;
+ X Data;
+ Z DataTwo;
+
+ cCoordWithDoubleData(int a_X, int a_Y, int a_Z) :
+ x(a_X), y(a_Y), z(a_Z)
+ {
+ }
+
+ cCoordWithDoubleData(int a_X, int a_Y, int a_Z, const X & a_Data, const Z & a_DataTwo) :
+ x(a_X), y(a_Y), z(a_Z), Data(a_Data), DataTwo(a_DataTwo)
+ {
+ }
+};
+
+typedef cCoordWithDoubleData <BLOCKTYPE, bool> cCoordWithBlockAndBool;
+
typedef std::vector<cCoordWithBlockAndBool> cCoordWithBlockAndBoolVector;