diff options
| author | tslil clingman <> | 2021-10-13 23:00:33 -0400 |
|---|---|---|
| committer | tslil clingman <> | 2021-10-13 23:01:36 -0400 |
| commit | 502d41dbd98595b78ca4f80b07a7b91e28163447 (patch) | |
| tree | a9987ddf767d2a9f452bbe076c8f85db6abf42ad /src/main.zig | |
| parent | 7fa4ae345c8c8483c0513b21eda7b612315c1a4c (diff) | |
Polygonal walls!
It was essentially working before, just some indexing bug.
Diffstat (limited to 'src/main.zig')
| -rw-r--r-- | src/main.zig | 19 |
1 files changed, 17 insertions, 2 deletions
diff --git a/src/main.zig b/src/main.zig index 01a021c..3d74daa 100644 --- a/src/main.zig +++ b/src/main.zig @@ -66,13 +66,28 @@ pub fn main() !void { } map.cells.items[16 * 7 + 7] = level.Cell{ - .floor_height = 0.5, - .ceiling_height = 2.2, + .floor_height = 0.2, + .ceiling_height = 2, .lower_texture = 1, .upper_texture = 1, .floor_texture = 1, .ceiling_texture = 2, .draw_down = true, + .vertices = &[_][2]f32{ + .{ 0.00, 0.50 }, + .{ 0.25, 0.66 }, + .{ 0.25, 1.00 }, + .{ 0.50, 0.66 }, + .{ 0.75, 1.00 }, + .{ 0.75, 0.66 }, + .{ 1.00, 0.50 }, + .{ 0.75, 0.33 }, + .{ 0.75, 0.00 }, + .{ 0.50, 0.33 }, + .{ 0.25, 0.00 }, + .{ 0.25, 0.33 }, + .{ 0.00, 0.50 }, + }, }; try map.objects.append(level.Object{ .pos_x = 1.5, .pos_y = 7.5, .pos_z = 2, .texture = 2, .height = 1, .width = 1 }); |
