diff options
Diffstat (limited to '')
-rw-r--r-- | src/Defines.h | 21 |
1 files changed, 15 insertions, 6 deletions
diff --git a/src/Defines.h b/src/Defines.h index 787eacab8..71288b430 100644 --- a/src/Defines.h +++ b/src/Defines.h @@ -238,7 +238,10 @@ inline eBlockFace MirrorBlockFaceY(eBlockFace a_BlockFace) case BLOCK_FACE_XP: return BLOCK_FACE_XM; case BLOCK_FACE_ZM: return BLOCK_FACE_ZP; case BLOCK_FACE_ZP: return BLOCK_FACE_ZM; - default: return a_BlockFace; + case BLOCK_FACE_NONE: + case BLOCK_FACE_YM: + case BLOCK_FACE_YP: + return a_BlockFace; } } @@ -255,7 +258,10 @@ inline eBlockFace RotateBlockFaceCCW(eBlockFace a_BlockFace) case BLOCK_FACE_XP: return BLOCK_FACE_ZM; case BLOCK_FACE_ZM: return BLOCK_FACE_XM; case BLOCK_FACE_ZP: return BLOCK_FACE_XP; - default: return a_BlockFace; + case BLOCK_FACE_NONE: + case BLOCK_FACE_YM: + case BLOCK_FACE_YP: + return a_BlockFace; } } @@ -271,7 +277,10 @@ inline eBlockFace RotateBlockFaceCW(eBlockFace a_BlockFace) case BLOCK_FACE_XP: return BLOCK_FACE_ZP; case BLOCK_FACE_ZM: return BLOCK_FACE_XP; case BLOCK_FACE_ZP: return BLOCK_FACE_XM; - default: return a_BlockFace; + case BLOCK_FACE_NONE: + case BLOCK_FACE_YM: + case BLOCK_FACE_YP: + return a_BlockFace; } } @@ -285,7 +294,7 @@ inline eBlockFace ReverseBlockFace(eBlockFace a_BlockFace) 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; + case BLOCK_FACE_NONE: return a_BlockFace; } } @@ -436,7 +445,7 @@ inline void AddFaceDirection(int & a_BlockX, int & a_BlockY, int & a_BlockZ, eBl case BLOCK_FACE_ZP: a_BlockZ++; break; case BLOCK_FACE_XP: a_BlockX++; break; case BLOCK_FACE_XM: a_BlockX--; break; - default: + case BLOCK_FACE_NONE: { LOGWARNING("%s: Unknown face: %d", __FUNCTION__, a_BlockFace); ASSERT(!"AddFaceDirection(): Unknown face"); @@ -454,7 +463,7 @@ inline void AddFaceDirection(int & a_BlockX, int & a_BlockY, int & a_BlockZ, eBl case BLOCK_FACE_ZP: a_BlockZ--; break; case BLOCK_FACE_XP: a_BlockX--; break; case BLOCK_FACE_XM: a_BlockX++; break; - default: + case BLOCK_FACE_NONE: { LOGWARNING("%s: Unknown inv face: %d", __FUNCTION__, a_BlockFace); ASSERT(!"AddFaceDirection(): Unknown face"); |