mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-07 03:51:50 +00:00
Added gui_util
This commit is contained in:
parent
e3f7f7218f
commit
2055cff0be
11 changed files with 122 additions and 35 deletions
|
|
@ -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_ */
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue