From e561e652ccae7d7fd214930000892cc24281f96c Mon Sep 17 00:00:00 2001 From: UIS Date: Fri, 14 Aug 2020 01:38:23 +0300 Subject: Use 12+4 bits for BlockId, GetBlockInfo return pointer instead value --- src/Block.hpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/Block.hpp') diff --git a/src/Block.hpp b/src/Block.hpp index fbeeaeb..a9fd881 100644 --- a/src/Block.hpp +++ b/src/Block.hpp @@ -6,7 +6,7 @@ #include "Vector.hpp" struct BlockId { - unsigned short id : 13; + unsigned short id : 12; unsigned char state : 4; }; @@ -49,4 +49,4 @@ struct BlockInfo { void RegisterStaticBlockInfo(BlockId blockId, BlockInfo blockInfo); -BlockInfo GetBlockInfo(BlockId blockId, Vector blockPos = Vector(0,0,0)); \ No newline at end of file +BlockInfo* GetBlockInfo(BlockId blockId, Vector blockPos = Vector(0,0,0)); -- cgit v1.2.3 From 70c3ade4dd87907506ab40eb8e1cf04e4db3779a Mon Sep 17 00:00:00 2001 From: UIS Date: Sun, 20 Sep 2020 00:59:00 +0300 Subject: Shader optimization, removed unused argument from GetBlockInfo function --- src/Block.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/Block.hpp') diff --git a/src/Block.hpp b/src/Block.hpp index a9fd881..0fd0e89 100644 --- a/src/Block.hpp +++ b/src/Block.hpp @@ -49,4 +49,4 @@ struct BlockInfo { void RegisterStaticBlockInfo(BlockId blockId, BlockInfo blockInfo); -BlockInfo* GetBlockInfo(BlockId blockId, Vector blockPos = Vector(0,0,0)); +BlockInfo* GetBlockInfo(BlockId blockId); -- cgit v1.2.3