From 1aad9b2a1c5e86c8c6ea635772db5ddb20af39ed Mon Sep 17 00:00:00 2001 From: tslil clingman <> Date: Fri, 8 Oct 2021 21:38:41 -0400 Subject: Fixed some artefacts for walls with both lower and upper parts I can't quite explain it, but something about the way floating point numbers round meant that we weren't calculating consistent distances (in pixels) for the length of the strip between the top of the floor and the bottom of the ceiling in cells which had both. --- src/main.zig | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'src/main.zig') diff --git a/src/main.zig b/src/main.zig index d76e424..3c425ba 100644 --- a/src/main.zig +++ b/src/main.zig @@ -62,14 +62,13 @@ pub fn main() !void { } } - map.cells.items[16 * 7 + 7] = level.Cell{ .floor_height = level.Cell.DEFAULT_HEIGHT, .lower_texture = 1 }; - map.cells.items[16 * 7 + 6] = level.Cell{ + map.cells.items[16 * 7 + 7] = level.Cell{ .floor_height = 0.5, .ceiling_height = 2, .lower_texture = 1, .upper_texture = 1, .floor_texture = 1, - .ceiling_texture = 1, + .ceiling_texture = 2, .draw_down = true, }; -- cgit v1.3.1