This commit is contained in:
MihailRis
2024-05-06 17:35:05 +03:00
parent b3a1cad0e1
commit 3c6089225f
16 changed files with 633 additions and 638 deletions
+5 -5
View File
@@ -16,12 +16,12 @@ const int BLOCK_ROT_MASK = 0b0000'0111;
const int BLOCK_RESERVED_MASK = 0b1111'1000;
struct voxel {
blockid_t id;
blockstate_t states;
blockid_t id;
blockstate_t states;
inline uint8_t rotation() const {
return states & BLOCK_ROT_MASK;
}
inline uint8_t rotation() const {
return states & BLOCK_ROT_MASK;
}
inline void setRotation(uint8_t rotation) {
states = (states & (~BLOCK_ROT_MASK)) | (rotation & BLOCK_ROT_MASK);