summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormadmaxoft <github@xoft.cz>2014-07-18 22:41:48 +0200
committermadmaxoft <github@xoft.cz>2014-07-18 22:41:48 +0200
commit23037ce7ec1f7ff290bd18f30d5fb25b91b5e61c (patch)
treecf8685a6bc506dd2cf66545cb24839cb73b77e1f
parentRemoved cBlockSignPostHandler descend. (diff)
downloadcuberite-23037ce7ec1f7ff290bd18f30d5fb25b91b5e61c.tar
cuberite-23037ce7ec1f7ff290bd18f30d5fb25b91b5e61c.tar.gz
cuberite-23037ce7ec1f7ff290bd18f30d5fb25b91b5e61c.tar.bz2
cuberite-23037ce7ec1f7ff290bd18f30d5fb25b91b5e61c.tar.lz
cuberite-23037ce7ec1f7ff290bd18f30d5fb25b91b5e61c.tar.xz
cuberite-23037ce7ec1f7ff290bd18f30d5fb25b91b5e61c.tar.zst
cuberite-23037ce7ec1f7ff290bd18f30d5fb25b91b5e61c.zip
-rw-r--r--src/Blocks/BlockSignPost.h19
-rw-r--r--src/Blocks/BlockWallSign.h17
2 files changed, 20 insertions, 16 deletions
diff --git a/src/Blocks/BlockSignPost.h b/src/Blocks/BlockSignPost.h
index d5b0c0b5f..ee65d099a 100644
--- a/src/Blocks/BlockSignPost.h
+++ b/src/Blocks/BlockSignPost.h
@@ -12,9 +12,11 @@
class cBlockSignPostHandler :
public cBlockHandler
{
+ typedef cBlockHandler super;
+
public:
- cBlockSignPostHandler(BLOCKTYPE a_BlockType)
- : cBlockHandler(a_BlockType)
+ cBlockSignPostHandler(BLOCKTYPE a_BlockType) :
+ super(a_BlockType)
{
}
@@ -78,22 +80,23 @@ public:
return (a_Meta + 12) & 0x0f;
}
+
virtual NIBBLETYPE MetaMirrorXY(NIBBLETYPE a_Meta) override
{
- // Mirrors signs over the XY plane (North-South Mirroring)
+ // Mirrors signs over the XY plane (North-South Mirroring)
- // There are 16 meta values which correspond to different directions.
- // These values are equated to angles on a circle; 0x08 = 180 degrees.
+ // There are 16 meta values which correspond to different directions.
+ // These values are equated to angles on a circle; 0x08 = 180 degrees.
return (a_Meta < 0x08) ? (0x08 + a_Meta) : (0x08 - a_Meta);
}
virtual NIBBLETYPE MetaMirrorYZ(NIBBLETYPE a_Meta) override
{
- // Mirrors signs over the YZ plane (East-West Mirroring)
+ // Mirrors signs over the YZ plane (East-West Mirroring)
- // There are 16 meta values which correspond to different directions.
- // These values are equated to angles on a circle; 0x10 = 360 degrees.
+ // There are 16 meta values which correspond to different directions.
+ // These values are equated to angles on a circle; 0x10 = 360 degrees.
return 0x10 - a_Meta;
}
} ;
diff --git a/src/Blocks/BlockWallSign.h b/src/Blocks/BlockWallSign.h
index b0f4015b6..e837b315e 100644
--- a/src/Blocks/BlockWallSign.h
+++ b/src/Blocks/BlockWallSign.h
@@ -13,9 +13,10 @@ class cBlockWallSignHandler :
public cBlockHandler
{
typedef cBlockHandler super;
+
public:
- cBlockWallSignHandler(BLOCKTYPE a_BlockType)
- : cBlockHandler(a_BlockType)
+ cBlockWallSignHandler(BLOCKTYPE a_BlockType) :
+ super(a_BlockType)
{
}
@@ -53,15 +54,15 @@ public:
}
- virtual void GetBlockCoordsBehindTheSign(NIBBLETYPE a_BlockMeta, int & a_BlockX, int & a_BlockZ)
+ static void GetBlockCoordsBehindTheSign(NIBBLETYPE a_BlockMeta, int & a_BlockX, int & a_BlockZ)
{
switch (a_BlockMeta)
{
- case 2: a_BlockZ++; break;
- case 3: a_BlockZ--; break;
- case 4: a_BlockX++; break;
- case 5: a_BlockX--; break;
- default: break;
+ case 2: a_BlockZ++; break;
+ case 3: a_BlockZ--; break;
+ case 4: a_BlockX++; break;
+ case 5: a_BlockX--; break;
+ default: break;
}
}