Added gui_util

This commit is contained in:
MihailRis
2023-12-07 13:18:28 +03:00
parent e3f7f7218f
commit 2055cff0be
11 changed files with 122 additions and 35 deletions
+10
View File
@@ -12,10 +12,20 @@ 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;
struct voxel {
blockid_t id;
uint8_t states;
inline uint8_t rotation() {
return states & BLOCK_ROT_MASK;
}
inline int8_t variant() {
return (states & BLOCK_VARIANT_MASK) >> 4;
}
};
#endif /* VOXELS_VOXEL_H_ */