summaryrefslogtreecommitdiffstats
path: root/src/Defines.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/Defines.h')
-rw-r--r--src/Defines.h39
1 files changed, 27 insertions, 12 deletions
diff --git a/src/Defines.h b/src/Defines.h
index 787eacab8..bbc69f79c 100644
--- a/src/Defines.h
+++ b/src/Defines.h
@@ -238,7 +238,12 @@ 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 +260,12 @@ 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 +281,12 @@ 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;
+ };
}
}
@@ -279,13 +294,13 @@ 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;
+ 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;
+ case BLOCK_FACE_NONE: return a_BlockFace;
}
}
@@ -436,7 +451,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 +469,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");