summaryrefslogtreecommitdiffstats
path: root/src/Block.hpp
diff options
context:
space:
mode:
authorElisey Puzko <puzko.e02@gmail.com>2018-02-18 11:25:30 +0100
committerElisey Puzko <puzko.e02@gmail.com>2018-02-18 11:25:30 +0100
commit9f911204d2a8295a669b0741a5076f55a0dd9cc5 (patch)
tree59d39747281f4de5d643ab8843c235f557077433 /src/Block.hpp
parentRaycast debug render (diff)
downloadAltCraft-9f911204d2a8295a669b0741a5076f55a0dd9cc5.tar
AltCraft-9f911204d2a8295a669b0741a5076f55a0dd9cc5.tar.gz
AltCraft-9f911204d2a8295a669b0741a5076f55a0dd9cc5.tar.bz2
AltCraft-9f911204d2a8295a669b0741a5076f55a0dd9cc5.tar.lz
AltCraft-9f911204d2a8295a669b0741a5076f55a0dd9cc5.tar.xz
AltCraft-9f911204d2a8295a669b0741a5076f55a0dd9cc5.tar.zst
AltCraft-9f911204d2a8295a669b0741a5076f55a0dd9cc5.zip
Diffstat (limited to '')
-rw-r--r--src/Block.hpp16
1 files changed, 7 insertions, 9 deletions
diff --git a/src/Block.hpp b/src/Block.hpp
index 12d2907..dfd6762 100644
--- a/src/Block.hpp
+++ b/src/Block.hpp
@@ -3,14 +3,13 @@
#include <functional>
struct Block {
- Block();
+ Block();
+ Block(unsigned short id, unsigned char state,
+ unsigned char light, unsigned char sky);
+ ~Block();
- Block(unsigned short id, unsigned char state, unsigned char light, unsigned char sky);
-
- ~Block();
-
- unsigned short id : 13;
- unsigned char state : 4;
+ unsigned short id : 13;
+ unsigned char state : 4;
unsigned char light : 4;
unsigned char sky : 4;
};
@@ -27,8 +26,7 @@ bool operator<(const BlockId& lhs, const BlockId &rhs);
namespace std {
template <>
struct hash<BlockId> {
- std::size_t operator()(const BlockId& k) const
- {
+ std::size_t operator()(const BlockId& k) const {
size_t id = std::hash<unsigned short>()(k.id);
size_t state = std::hash<unsigned char>()(k.state);