diff options
author | Alexander Harkness <bearbin@gmail.com> | 2014-06-18 22:22:53 +0200 |
---|---|---|
committer | Alexander Harkness <bearbin@gmail.com> | 2014-06-18 22:22:53 +0200 |
commit | 35a4aa419c3ee09f50cb9b397e76d87a13f9997f (patch) | |
tree | d40ae19252acd6308b7fe4c4a1c5f5a9979ed8de /src/Defines.h | |
parent | Merge pull request #1045 from Howaner/GlobalFixes (diff) | |
parent | FIxed second weird enum (diff) | |
download | cuberite-35a4aa419c3ee09f50cb9b397e76d87a13f9997f.tar cuberite-35a4aa419c3ee09f50cb9b397e76d87a13f9997f.tar.gz cuberite-35a4aa419c3ee09f50cb9b397e76d87a13f9997f.tar.bz2 cuberite-35a4aa419c3ee09f50cb9b397e76d87a13f9997f.tar.lz cuberite-35a4aa419c3ee09f50cb9b397e76d87a13f9997f.tar.xz cuberite-35a4aa419c3ee09f50cb9b397e76d87a13f9997f.tar.zst cuberite-35a4aa419c3ee09f50cb9b397e76d87a13f9997f.zip |
Diffstat (limited to 'src/Defines.h')
-rw-r--r-- | src/Defines.h | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/src/Defines.h b/src/Defines.h index 563fc308c..ee91ee596 100644 --- a/src/Defines.h +++ b/src/Defines.h @@ -274,8 +274,19 @@ inline eBlockFace RotateBlockFaceCW(eBlockFace a_BlockFace) } } - - +inline eBlockFace ReverseBlockFace(eBlockFace a_BlockFace) +{ + switch (a_BlockFace) + { + case BLOCK_FACE_YP: return BLOCK_FACE_YM; + case BLOCK_FACE_XP: return BLOCK_FACE_XM; + case BLOCK_FACE_ZP: return BLOCK_FACE_ZM; + case BLOCK_FACE_YM: return BLOCK_FACE_YP; + case BLOCK_FACE_XM: return BLOCK_FACE_XP; + case BLOCK_FACE_ZM: return BLOCK_FACE_ZP; + default: return a_BlockFace; + } +} /** Returns the textual representation of the BlockFace constant. */ |