Minor refactor
This commit is contained in:
+3
-7
@@ -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_ */
|
||||
|
||||
Reference in New Issue
Block a user