Rotation profiles limited to 8

This commit is contained in:
MihailRis
2024-01-04 21:48:41 +03:00
parent 6542bcbc6a
commit c35057d1de
4 changed files with 12 additions and 12 deletions
+5 -5
View File
@@ -10,10 +10,10 @@ const int BLOCK_DIR_EAST = 0x3;
const int BLOCK_DIR_UP = 0x4;
const int BLOCK_DIR_DOWN = 0x5;
// limited to 16 block orientations
const int BLOCK_ROT_MASK = 0xF;
// limited to 16 block variants
const int BLOCK_VARIANT_MASK = 0xF0;
// limited to 8 block orientations
const int BLOCK_ROT_MASK = 0b0000'0111;
// limited to 32 block variants
const int BLOCK_VARIANT_MASK = 0b1111'1000;
struct voxel {
blockid_t id;
@@ -24,7 +24,7 @@ struct voxel {
}
inline uint8_t variant() const {
return (states & BLOCK_VARIANT_MASK) >> 4;
return (states & BLOCK_VARIANT_MASK) >> 3;
}
};