1
0

Fixed compile and a few more warnings

This commit is contained in:
tycho 2015-05-19 12:28:31 +01:00
parent 95e06ab93f
commit fa4fb75e03
9 changed files with 33 additions and 15 deletions

View File

@ -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;
}
}

View File

@ -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)

View File

@ -487,7 +487,12 @@ public:
}
break;
}
default: break;
case BLOCK_FACE_NONE:
case BLOCK_FACE_YM:
case BLOCK_FACE_YP:
{
break;
}
}
return true;
}

View File

@ -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

View File

@ -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;

View File

@ -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;

View File

@ -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;
}
}
}

View File

@ -414,7 +414,12 @@ protected:
FillColumnPattern(a_ChunkDesc, a_RelX, a_RelZ, Pattern, a_ShapeColumn);
return;
}
default:
case biInvalidBiome:
case biHell:
case biSky:
case biNumBiomes:
case biVariant:
case biNumVariantBiomes:
{
ASSERT(!"Unhandled biome");
return;

View File

@ -2071,7 +2071,7 @@ void cWorld::BroadcastAttachEntity(const cEntity & a_Entity, const cEntity * a_V
void cWorld::BroadcastBlockAction(int a_BlockX, int a_BlockY, int a_BlockZ, char a_Byte1, char a_Byte2, BLOCKTYPE a_BlockType, const cClientHandle * a_Exclude)
void cWorld::BroadcastBlockAction(int a_BlockX, int a_BlockY, int a_BlockZ, Byte a_Byte1, Byte a_Byte2, BLOCKTYPE a_BlockType, const cClientHandle * a_Exclude)
{
m_ChunkMap->BroadcastBlockAction(a_BlockX, a_BlockY, a_BlockZ, a_Byte1, a_Byte2, a_BlockType, a_Exclude);
}