1
0
Fork 0
mirror of https://github.com/zeldaret/oot.git synced 2024-12-28 15:56:51 +00:00

Viewport z scale/translation: 0x1FF -> G_MAXZ/2 (see proman "9.7 Mixing CPU and SP Addresses", "12.7.6 Depth Source")

This commit is contained in:
Dragorn421 2022-10-05 13:08:21 +02:00
parent 085c81ad01
commit dba2317566
No known key found for this signature in database
GPG key ID: 32B53D2D16FC4118

View file

@ -12,11 +12,11 @@ void View_ViewportToVp(Vp* dest, Viewport* src) {
dest->vp.vscale[0] = width * 2; dest->vp.vscale[0] = width * 2;
dest->vp.vscale[1] = height * 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.vscale[3] = 0;
dest->vp.vtrans[0] = ((src->leftX * 2) + width) * 2; dest->vp.vtrans[0] = ((src->leftX * 2) + width) * 2;
dest->vp.vtrans[1] = ((src->topY * 2) + height) * 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; dest->vp.vtrans[3] = 0;
} }