From b21e399bd09577d2eef78d81c0db642ba4c390b7 Mon Sep 17 00:00:00 2001 From: tslil clingman <> Date: Mon, 11 Oct 2021 21:55:39 -0400 Subject: Fix many texture bugs, access memory in increasing order everywhere - switch z_buffer to use screen space coordinates (why does y increase downward!) - extract pointless (re)calculations from inside hot loops, in particular from object drawing but also to the extent allowed by applicable law from floor and ceiling drawing --- src/main.zig | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/main.zig') diff --git a/src/main.zig b/src/main.zig index c3647b4..1211529 100644 --- a/src/main.zig +++ b/src/main.zig @@ -67,11 +67,11 @@ pub fn main() !void { map.cells.items[16 * 7 + 7] = level.Cell{ .floor_height = 0.5, - .ceiling_height = 2, + .ceiling_height = 2.2, .lower_texture = 1, .upper_texture = 1, .floor_texture = 1, - .ceiling_texture = 2, + .ceiling_texture = 1, .draw_down = true, }; -- cgit v1.3.1