diff options
| author | tslil clingman <> | 2021-09-03 21:09:07 -0400 |
|---|---|---|
| committer | tslil clingman <> | 2021-09-04 11:36:32 -0400 |
| commit | e4baa0810748bd3de93d1eaf216288ad67a86295 (patch) | |
| tree | 7f1117a7dd5299cffbeb98a3bfea28073c7d83a2 /src/renderConstants.zig | |
| parent | de255063b234871021da004d32964e25d549d3e4 (diff) | |
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.
Diffstat (limited to 'src/renderConstants.zig')
| -rw-r--r-- | src/renderConstants.zig | 17 |
1 files changed, 10 insertions, 7 deletions
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 <https://www.gnu.org/licenses/>. -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; |
