aboutsummaryrefslogtreecommitdiff
path: root/src/level.zig
diff options
context:
space:
mode:
authortslil clingman <>2021-10-13 23:00:33 -0400
committertslil clingman <>2021-10-13 23:01:36 -0400
commit502d41dbd98595b78ca4f80b07a7b91e28163447 (patch)
treea9987ddf767d2a9f452bbe076c8f85db6abf42ad /src/level.zig
parent7fa4ae345c8c8483c0513b21eda7b612315c1a4c (diff)
Polygonal walls!
It was essentially working before, just some indexing bug.
Diffstat (limited to 'src/level.zig')
-rw-r--r--src/level.zig12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/level.zig b/src/level.zig
index 9f5217d..87c3e80 100644
--- a/src/level.zig
+++ b/src/level.zig
@@ -35,12 +35,12 @@ pub const Cell = struct {
floor_texture: u8 = 0,
ceiling_texture: u8 = 2,
- vertices: [5][2]f32 = [5][2]f32{
- .{ 0, 0 },
- .{ 0.5, 0 },
- .{ 0.5, 0.5 },
- .{ 0, 0.5 },
- .{ 0, 0 },
+ vertices: []const [2]f32 = &[_][2]f32{
+ .{ 0.25, 0.25 },
+ .{ 0.75, 0.25 },
+ .{ 0.75, 0.75 },
+ .{ 0.25, 0.75 },
+ .{ 0.25, 0.25 },
},
pub const floor = Cell{};