summaryrefslogtreecommitdiffstats
path: root/src/Blocks/BlockSign.h
diff options
context:
space:
mode:
authornarroo <narroo@vt.edu>2014-03-29 15:00:44 +0100
committernarroo <narroo@vt.edu>2014-03-29 15:00:44 +0100
commit4492bd58f1dc93e5c5d6c1b9ff64d7ed44accee3 (patch)
tree8571cb54507db121acadbedcd117ec505ef8da4f /src/Blocks/BlockSign.h
parentAltered the rotates for cBlockSignHandler. The functions as a whole is still unfinished though; no wall sign or mirroring support yet. (diff)
downloadcuberite-4492bd58f1dc93e5c5d6c1b9ff64d7ed44accee3.tar
cuberite-4492bd58f1dc93e5c5d6c1b9ff64d7ed44accee3.tar.gz
cuberite-4492bd58f1dc93e5c5d6c1b9ff64d7ed44accee3.tar.bz2
cuberite-4492bd58f1dc93e5c5d6c1b9ff64d7ed44accee3.tar.lz
cuberite-4492bd58f1dc93e5c5d6c1b9ff64d7ed44accee3.tar.xz
cuberite-4492bd58f1dc93e5c5d6c1b9ff64d7ed44accee3.tar.zst
cuberite-4492bd58f1dc93e5c5d6c1b9ff64d7ed44accee3.zip
Diffstat (limited to 'src/Blocks/BlockSign.h')
-rw-r--r--src/Blocks/BlockSign.h19
1 files changed, 19 insertions, 0 deletions
diff --git a/src/Blocks/BlockSign.h b/src/Blocks/BlockSign.h
index 24346b930..6c0becfd6 100644
--- a/src/Blocks/BlockSign.h
+++ b/src/Blocks/BlockSign.h
@@ -83,6 +83,25 @@ public:
{
return (--a_Meta) & 0x0F;
}
+
+ virtual NIBBLETYPE MetaMirrorXY(NIBBLETYPE a_Meta) override
+ {
+ // 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.
+ 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)
+
+ // 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;
+ }
} ;