aboutsummaryrefslogtreecommitdiff
path: root/src/main.zig
diff options
context:
space:
mode:
authortslil clingman <>2021-10-17 21:26:15 -0400
committertslil clingman <>2021-10-17 21:49:44 -0400
commite2f7ea90ff10d3cd575b58c30a7f5d4433db7e7d (patch)
treef16e19fa83cdffb0b9b9d74b948606567faaa676 /src/main.zig
parentb55966e335d6de86309f6a7abafcdca8bc3adbb8 (diff)
Additional bug fix
Essentially highest_drawn should be monotonic between squares, the only time we should allow ourselves to draw below this is in the special case of drawing a vertical portion over the horizontal portion of a previous layer in the same square.
Diffstat (limited to 'src/main.zig')
-rw-r--r--src/main.zig8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/main.zig b/src/main.zig
index 2ee6bc6..47f89a7 100644
--- a/src/main.zig
+++ b/src/main.zig
@@ -53,10 +53,10 @@ pub fn main() !void {
while (y < 10) : (y += 1) {
// HACK
const vert_coords0 = [_][2]f32{
- .{ 0.00, 0.00 },
- .{ 1.00, 0.00 },
- .{ 1.00, 1.00 },
- .{ 0.00, 1.00 },
+ .{ 0.10, 0.10 },
+ .{ 0.90, 0.10 },
+ .{ 0.90, 0.90 },
+ .{ 0.10, 0.90 },
};
var verts = try std.BoundedArray([2]f32, level.Layer.MAX_VERTS).fromSlice(vert_coords0[0..]);
var layer = level.Layer{ .height = 0.5, .vertices = verts };