From 8656e149c8820272a882406912790f0075ed5f28 Mon Sep 17 00:00:00 2001 From: Tiger Wang Date: Tue, 30 Jun 2015 15:50:15 +0100 Subject: Improved maps --- src/Blocks/BlockVine.h | 24 ++++++++---------------- 1 file changed, 8 insertions(+), 16 deletions(-) (limited to 'src/Blocks/BlockVine.h') diff --git a/src/Blocks/BlockVine.h b/src/Blocks/BlockVine.h index 3d06a8223..cc354c374 100644 --- a/src/Blocks/BlockVine.h +++ b/src/Blocks/BlockVine.h @@ -15,7 +15,6 @@ public: { } - virtual bool GetPlacementBlockTypeMeta( cChunkInterface & a_ChunkInterface, cPlayer * a_Player, int a_BlockX, int a_BlockY, int a_BlockZ, eBlockFace a_BlockFace, @@ -39,14 +38,12 @@ public: return true; } - virtual void ConvertToPickups(cItems & a_Pickups, NIBBLETYPE a_BlockMeta) override { // Reset meta to zero a_Pickups.push_back(cItem(E_BLOCK_VINES, 1, 0)); } - static NIBBLETYPE DirectionToMetaData(char a_BlockFace) { switch (a_BlockFace) @@ -59,7 +56,6 @@ public: } } - static char MetaDataToDirection(NIBBLETYPE a_MetaData) { switch (a_MetaData) @@ -72,8 +68,7 @@ public: } } - - /// Returns true if the specified block type is good for vines to attach to + /** Returns true if the specified block type is good for vines to attach to */ static bool IsBlockAttachable(BLOCKTYPE a_BlockType) { switch (a_BlockType) @@ -93,8 +88,7 @@ public: } } - - /// Returns the meta that has the maximum allowable sides of the vine, given the surroundings + /** Returns the meta that has the maximum allowable sides of the vine, given the surroundings */ NIBBLETYPE GetMaxMeta(cChunk & a_Chunk, int a_RelX, int a_RelY, int a_RelZ) { static const struct @@ -124,7 +118,6 @@ public: return res; } - void Check(cChunkInterface & a_ChunkInterface, cBlockPluginInterface & a_PluginInterface, int a_RelX, int a_RelY, int a_RelZ, cChunk & a_Chunk) override { NIBBLETYPE CurMeta = a_Chunk.GetMeta(a_RelX, a_RelY, a_RelZ); @@ -164,18 +157,15 @@ public: } } - virtual bool DoesIgnoreBuildCollision(void) override { return true; } - virtual bool DoesDropOnUnsuitable(void) override { return false; } - virtual void OnUpdate(cChunkInterface & a_ChunkInterface, cWorldInterface & a_WorldInterface, cBlockPluginInterface & a_BlockPluginInterface, cChunk & a_Chunk, int a_RelX, int a_RelY, int a_RelZ) override { @@ -199,33 +189,35 @@ public: } } } - virtual NIBBLETYPE MetaRotateCCW(NIBBLETYPE a_Meta) override { return ((a_Meta >> 1) | (a_Meta << 3)) & 0x0f; // Rotate bits to the right } - virtual NIBBLETYPE MetaRotateCW(NIBBLETYPE a_Meta) override { return ((a_Meta << 1) | (a_Meta >> 3)) & 0x0f; // Rotate bits to the left } - virtual NIBBLETYPE MetaMirrorXY(NIBBLETYPE a_Meta) override { // Bits 2 and 4 stay, bits 1 and 3 swap return (NIBBLETYPE)((a_Meta & 0x0a) | ((a_Meta & 0x01) << 2) | ((a_Meta & 0x04) >> 2)); } - virtual NIBBLETYPE MetaMirrorYZ(NIBBLETYPE a_Meta) override { // Bits 1 and 3 stay, bits 2 and 4 swap return (NIBBLETYPE)((a_Meta & 0x05) | ((a_Meta & 0x02) << 2) | ((a_Meta & 0x08) >> 2)); } + virtual ColourID GetMapBaseColourID(NIBBLETYPE a_Meta) override + { + UNUSED(a_Meta); + return 7; + } + } ; -- cgit v1.2.3