Refactor literally everything
This commit is contained in:
23
src/voxel.zig
Normal file
23
src/voxel.zig
Normal file
@@ -0,0 +1,23 @@
|
||||
pub const Orientation = enum(u4) {
|
||||
negative_x,
|
||||
positive_x,
|
||||
negative_y,
|
||||
positive_y,
|
||||
negative_z,
|
||||
positive_z,
|
||||
};
|
||||
|
||||
// ┌────────────────── x
|
||||
// │ ┌────────────── y
|
||||
// │ │ ┌───────── z
|
||||
// │ │ │ ┌───── orientation
|
||||
// │ │ │ │ ┌ material
|
||||
// ┌┴─┐┌┴─┐ ┌┴─┐┌┴─┐ ┌┴──────────────┐
|
||||
// 10987654 32109876 54321098 76543210
|
||||
pub const Wall = packed struct(u32) {
|
||||
material: u16,
|
||||
orientation: Orientation,
|
||||
z: u4,
|
||||
y: u4,
|
||||
x: u4,
|
||||
};
|
||||
Reference in New Issue
Block a user