diff options
| author | Freya Murphy <freya@freyacat.org> | 2025-12-11 22:10:52 -0500 |
|---|---|---|
| committer | Freya Murphy <freya@freyacat.org> | 2025-12-11 22:10:52 -0500 |
| commit | e511e9c678eeb76906e75dbc92165e538d13546b (patch) | |
| tree | 30b6dfde164603fa0a677baebe770f44536dfeff /src/voxel.h | |
| parent | i did a lot (diff) | |
| download | voxel-main.tar.gz voxel-main.tar.bz2 voxel-main.zip | |
Diffstat (limited to '')
| -rw-r--r-- | src/voxel.h | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/voxel.h b/src/voxel.h index 12480b2..bba2c44 100644 --- a/src/voxel.h +++ b/src/voxel.h @@ -24,7 +24,7 @@ #define VOXEL_FALSE 1 #define VOXEL_RESULT int -typedef enum : char { +typedef enum : u8 { POS_X = 0, NEG_X = 1, POS_Y = 2, @@ -33,7 +33,11 @@ typedef enum : char { NEG_Z = 5, } Face; -typedef enum : char { AIR = 0, A, B, C, D } Block; +void face_to_vec(Face face, ivec3 out); +Face face_opposite(Face face); +void face_perpendicular(Face face, Face out[2]); + +typedef enum : u8 { AIR = 0, A, B, C, D } Block; #define CHUNK_SIZE 16 #define CHUNK_BLOCKS CHUNK_SIZE * CHUNK_SIZE * CHUNK_SIZE |