From dba2317566f75f17e0e5a8d53c5df590e0b2998d Mon Sep 17 00:00:00 2001 From: Dragorn421 Date: Wed, 5 Oct 2022 13:08:21 +0200 Subject: [PATCH] Viewport z scale/translation: `0x1FF` -> `G_MAXZ/2` (see proman "9.7 Mixing CPU and SP Addresses", "12.7.6 Depth Source") --- src/code/z_view.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/code/z_view.c b/src/code/z_view.c index 044e5603e7..7205f789b8 100644 --- a/src/code/z_view.c +++ b/src/code/z_view.c @@ -12,11 +12,11 @@ void View_ViewportToVp(Vp* dest, Viewport* src) { dest->vp.vscale[0] = width * 2; dest->vp.vscale[1] = height * 2; - dest->vp.vscale[2] = 0x01FF; + dest->vp.vscale[2] = G_MAXZ / 2; dest->vp.vscale[3] = 0; dest->vp.vtrans[0] = ((src->leftX * 2) + width) * 2; dest->vp.vtrans[1] = ((src->topY * 2) + height) * 2; - dest->vp.vtrans[2] = 0x01FF; + dest->vp.vtrans[2] = G_MAXZ / 2; dest->vp.vtrans[3] = 0; }