summaryrefslogtreecommitdiffstats
path: root/src/Blocks
diff options
context:
space:
mode:
Diffstat (limited to 'src/Blocks')
-rw-r--r--src/Blocks/BlockLever.h14
-rw-r--r--src/Blocks/BlockQuartz.h2
-rw-r--r--src/Blocks/BlockRail.h7
-rw-r--r--src/Blocks/BlockSideways.h2
-rw-r--r--src/Blocks/BlockTorch.h2
-rw-r--r--src/Blocks/BlockTrapdoor.h4
-rw-r--r--src/Blocks/BlockTripwireHook.h8
7 files changed, 26 insertions, 13 deletions
diff --git a/src/Blocks/BlockLever.h b/src/Blocks/BlockLever.h
index 2da138e5f..5792d280b 100644
--- a/src/Blocks/BlockLever.h
+++ b/src/Blocks/BlockLever.h
@@ -59,13 +59,13 @@ public:
// Determine lever direction:
switch (a_Dir)
{
- case BLOCK_FACE_YP: return 0x6;
- case BLOCK_FACE_XP: return 0x1;
- case BLOCK_FACE_XM: return 0x2;
- case BLOCK_FACE_ZP: return 0x3;
- case BLOCK_FACE_ZM: return 0x4;
- case BLOCK_FACE_YM: return 0x0;
- default: return 0x6;
+ case BLOCK_FACE_YP: return 0x6;
+ case BLOCK_FACE_XP: return 0x1;
+ case BLOCK_FACE_XM: return 0x2;
+ case BLOCK_FACE_ZP: return 0x3;
+ case BLOCK_FACE_ZM: return 0x4;
+ case BLOCK_FACE_YM: return 0x0;
+ case BLOCK_FACE_NONE: return 0x6;
}
}
diff --git a/src/Blocks/BlockQuartz.h b/src/Blocks/BlockQuartz.h
index edc4fb9c5..6f5c23902 100644
--- a/src/Blocks/BlockQuartz.h
+++ b/src/Blocks/BlockQuartz.h
@@ -58,7 +58,7 @@ public:
return 0x3; // East or west
}
- default:
+ case BLOCK_FACE_NONE:
{
ASSERT(!"Unhandled block face!");
return a_QuartzMeta; // No idea, give a special meta (all sides the same)
diff --git a/src/Blocks/BlockRail.h b/src/Blocks/BlockRail.h
index a2e27a351..eecd07006 100644
--- a/src/Blocks/BlockRail.h
+++ b/src/Blocks/BlockRail.h
@@ -487,7 +487,12 @@ public:
}
break;
}
- default: break;
+ case BLOCK_FACE_NONE:
+ case BLOCK_FACE_YM:
+ case BLOCK_FACE_YP:
+ {
+ break;
+ }
}
return true;
}
diff --git a/src/Blocks/BlockSideways.h b/src/Blocks/BlockSideways.h
index 4b1e38d6d..74b05e33c 100644
--- a/src/Blocks/BlockSideways.h
+++ b/src/Blocks/BlockSideways.h
@@ -58,7 +58,7 @@ public:
return a_Meta | 0x4; // East or west
}
- default:
+ case BLOCK_FACE_NONE:
{
ASSERT(!"Unhandled block face!");
return a_Meta | 0xC; // No idea, give a special meta
diff --git a/src/Blocks/BlockTorch.h b/src/Blocks/BlockTorch.h
index d63df94cf..aaf50d23d 100644
--- a/src/Blocks/BlockTorch.h
+++ b/src/Blocks/BlockTorch.h
@@ -59,7 +59,7 @@ public:
case BLOCK_FACE_WEST: return E_META_TORCH_WEST;
case BLOCK_FACE_NORTH: return E_META_TORCH_NORTH;
case BLOCK_FACE_SOUTH: return E_META_TORCH_SOUTH;
- default:
+ case BLOCK_FACE_NONE:
{
ASSERT(!"Unhandled torch direction!");
break;
diff --git a/src/Blocks/BlockTrapdoor.h b/src/Blocks/BlockTrapdoor.h
index dbb0b5a5b..2841e3e08 100644
--- a/src/Blocks/BlockTrapdoor.h
+++ b/src/Blocks/BlockTrapdoor.h
@@ -74,7 +74,9 @@ public:
case BLOCK_FACE_ZM: return 0x0;
case BLOCK_FACE_XP: return 0x3;
case BLOCK_FACE_XM: return 0x2;
- default:
+ case BLOCK_FACE_NONE:
+ case BLOCK_FACE_YM:
+ case BLOCK_FACE_YP:
{
ASSERT(!"Unhandled block face!");
return 0;
diff --git a/src/Blocks/BlockTripwireHook.h b/src/Blocks/BlockTripwireHook.h
index 88d389711..c7a96d393 100644
--- a/src/Blocks/BlockTripwireHook.h
+++ b/src/Blocks/BlockTripwireHook.h
@@ -37,7 +37,13 @@ public:
case BLOCK_FACE_XP: return 0x3;
case BLOCK_FACE_ZM: return 0x2;
case BLOCK_FACE_ZP: return 0x0;
- default: ASSERT(!"Unhandled tripwire hook direction!"); return 0x0;
+ case BLOCK_FACE_NONE:
+ case BLOCK_FACE_YM:
+ case BLOCK_FACE_YP:
+ {
+ ASSERT(!"Unhandled tripwire hook direction!");
+ return 0x0;
+ }
}
}