From e4baa0810748bd3de93d1eaf216288ad67a86295 Mon Sep 17 00:00:00 2001 From: tslil clingman <> Date: Fri, 3 Sep 2021 21:09:07 -0400 Subject: Working on floor casting, but it's not quite right The way floors are currently rendered the textures will always appear ``under'' the walls. This is not intended for shorter walls, the floor should be atop them. I might be able to fix this by switching to vertical scan-line rendering of floors -- although i understand that that is less efficient -- and doing this at the same time as wall rendering. --- src/renderConstants.zig | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) (limited to 'src/renderConstants.zig') diff --git a/src/renderConstants.zig b/src/renderConstants.zig index 2dbadee..7c193a7 100644 --- a/src/renderConstants.zig +++ b/src/renderConstants.zig @@ -14,13 +14,16 @@ // // You should have received a copy of the GNU General Public License // along with this program. If not, see . -pub const screenWidth: f32 = 1024; -pub const screenHeight: f32 = 768; +pub const ScreenWidth: f32 = 1024; +pub const ScreenHeight: f32 = 768; -pub const planeWidth = 320; -pub const planeHeight = 240; +pub const PlaneWidth = 320; +pub const PlaneHeight = 240; -pub const backTextureWidth: f32 = 1280; -pub const backTextureHeight: f32 = 240; +pub const HFact = ScreenWidth / PlaneWidth; +pub const VFact = ScreenHeight / PlaneHeight; -pub const wallTextureDim: f32 = 32.0; +pub const BackTextureWidth: f32 = 1280; +pub const BackTextureHeight: f32 = 240; + +pub const TextureDim: f32 = 32.0; -- cgit v1.3.1