summaryrefslogtreecommitdiffstats
path: root/src/Blocks
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/Blocks/BlockAnvil.h8
-rw-r--r--src/Blocks/BlockButton.h2
-rw-r--r--src/Blocks/BlockCocoaPod.h4
-rw-r--r--src/Blocks/BlockHopper.h2
-rw-r--r--src/Blocks/BlockLadder.h7
-rw-r--r--src/Blocks/BlockLeaves.h2
-rw-r--r--src/Blocks/BlockWallSign.h12
7 files changed, 23 insertions, 14 deletions
diff --git a/src/Blocks/BlockAnvil.h b/src/Blocks/BlockAnvil.h
index abfa0f782..154394550 100644
--- a/src/Blocks/BlockAnvil.h
+++ b/src/Blocks/BlockAnvil.h
@@ -46,10 +46,10 @@ public:
switch (Direction)
{
- case 0: a_BlockMeta = 0x2 | Meta << 2; break;
- case 1: a_BlockMeta = 0x3 | Meta << 2; break;
- case 2: a_BlockMeta = 0x0 | Meta << 2; break;
- case 3: a_BlockMeta = 0x1 | Meta << 2; break;
+ case 0: a_BlockMeta = static_cast<NIBBLETYPE>(0x2 | Meta << 2); break;
+ case 1: a_BlockMeta = static_cast<NIBBLETYPE>(0x3 | Meta << 2); break;
+ case 2: a_BlockMeta = static_cast<NIBBLETYPE>(0x0 | Meta << 2); break;
+ case 3: a_BlockMeta = static_cast<NIBBLETYPE>(0x1 | Meta << 2); break;
default:
{
return false;
diff --git a/src/Blocks/BlockButton.h b/src/Blocks/BlockButton.h
index d24c7d952..d65d9722d 100644
--- a/src/Blocks/BlockButton.h
+++ b/src/Blocks/BlockButton.h
@@ -67,7 +67,7 @@ public:
case BLOCK_FACE_XM: return 0x2;
case BLOCK_FACE_XP: return 0x1;
case BLOCK_FACE_YM: return 0x0;
- default:
+ case BLOCK_FACE_NONE:
{
ASSERT(!"Unhandled block face!");
return 0x0;
diff --git a/src/Blocks/BlockCocoaPod.h b/src/Blocks/BlockCocoaPod.h
index 1b659d48f..50552c788 100644
--- a/src/Blocks/BlockCocoaPod.h
+++ b/src/Blocks/BlockCocoaPod.h
@@ -81,7 +81,9 @@ public:
case BLOCK_FACE_XM: return 3;
case BLOCK_FACE_XP: return 1;
case BLOCK_FACE_ZP: return 2;
- default:
+ case BLOCK_FACE_NONE:
+ case BLOCK_FACE_YM:
+ case BLOCK_FACE_YP:
{
ASSERT(!"Unknown face");
return 0;
diff --git a/src/Blocks/BlockHopper.h b/src/Blocks/BlockHopper.h
index 4a5d32dd5..06e2b0e9f 100644
--- a/src/Blocks/BlockHopper.h
+++ b/src/Blocks/BlockHopper.h
@@ -35,7 +35,7 @@ public:
case BLOCK_FACE_NORTH: a_BlockMeta = E_META_HOPPER_FACING_ZP; break;
case BLOCK_FACE_SOUTH: a_BlockMeta = E_META_HOPPER_FACING_ZM; break;
case BLOCK_FACE_WEST: a_BlockMeta = E_META_HOPPER_FACING_XP; break;
- default: a_BlockMeta = E_META_HOPPER_UNATTACHED; break;
+ case BLOCK_FACE_NONE: a_BlockMeta = E_META_HOPPER_UNATTACHED; break;
}
return true;
}
diff --git a/src/Blocks/BlockLadder.h b/src/Blocks/BlockLadder.h
index ab3f55439..f49f1adc7 100644
--- a/src/Blocks/BlockLadder.h
+++ b/src/Blocks/BlockLadder.h
@@ -57,7 +57,12 @@ public:
case BLOCK_FACE_ZP: return 0x3;
case BLOCK_FACE_XM: return 0x4;
case BLOCK_FACE_XP: return 0x5;
- default: return 0x2;
+ case BLOCK_FACE_NONE:
+ case BLOCK_FACE_YM:
+ case BLOCK_FACE_YP:
+ {
+ return 0x2;
+ }
}
}
diff --git a/src/Blocks/BlockLeaves.h b/src/Blocks/BlockLeaves.h
index 8e44c94ac..b7b2cc127 100644
--- a/src/Blocks/BlockLeaves.h
+++ b/src/Blocks/BlockLeaves.h
@@ -47,7 +47,7 @@ public:
cItem(
E_BLOCK_SAPLING,
1,
- (m_BlockType == E_BLOCK_LEAVES) ? (a_BlockMeta & 0x03) : (2 << (a_BlockMeta & 0x01))
+ (m_BlockType == E_BLOCK_LEAVES) ? (a_BlockMeta & 0x03) : static_cast<short>(2 << (a_BlockMeta & 0x01))
)
);
}
diff --git a/src/Blocks/BlockWallSign.h b/src/Blocks/BlockWallSign.h
index b6599d033..9b90b78bf 100644
--- a/src/Blocks/BlockWallSign.h
+++ b/src/Blocks/BlockWallSign.h
@@ -55,11 +55,13 @@ public:
{
switch (a_Direction)
{
- case 0x2: return 0x2;
- case 0x3: return 0x3;
- case 0x4: return 0x4;
- case 0x5: return 0x5;
- default:
+ case BLOCK_FACE_ZM: return 0x2;
+ case BLOCK_FACE_ZP: return 0x3;
+ case BLOCK_FACE_XM: return 0x4;
+ case BLOCK_FACE_XP: return 0x5;
+ case BLOCK_FACE_NONE:
+ case BLOCK_FACE_YP:
+ case BLOCK_FACE_YM:
{
break;
}