Minor refactor

This commit is contained in:
MihailRis
2024-01-06 14:36:37 +03:00
parent 5342d5489d
commit 85d85dada7
2 changed files with 6 additions and 16 deletions
+3 -7
View File
@@ -11,9 +11,9 @@ const int BLOCK_DIR_UP = 0x4;
const int BLOCK_DIR_DOWN = 0x5;
// limited to 8 block orientations
const int BLOCK_ROT_MASK = 0b0000'0111;
// limited to 32 block variants
const int BLOCK_VARIANT_MASK = 0b1111'1000;
const int BLOCK_ROT_MASK = 0b0000'0111;
// reserved bits
const int BLOCK_RESERVED_MASK = 0b1111'1000;
struct voxel {
blockid_t id;
@@ -22,10 +22,6 @@ struct voxel {
inline uint8_t rotation() const {
return states & BLOCK_ROT_MASK;
}
inline uint8_t variant() const {
return (states & BLOCK_VARIANT_MASK) >> 3;
}
};
#endif /* VOXELS_VOXEL_H_ */