mirror of
https://github.com/hedge-dev/UnleashedRecomp.git
synced 2026-04-28 05:11:37 +00:00
Fix world map 3D to 2D projection.
This commit is contained in:
parent
c6e2dbcce0
commit
63a622740c
2 changed files with 11 additions and 0 deletions
|
|
@ -941,3 +941,9 @@ PPC_FUNC(sub_826906A8)
|
||||||
ctx.f1.f64 = 0.25;
|
ctx.f1.f64 = 0.25;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void WorldMapProjectionMidAsmHook(PPCVRegister& v63, PPCVRegister& v62)
|
||||||
|
{
|
||||||
|
v63.f32[3] *= std::max(NARROW_ASPECT_RATIO, g_aspectRatio) / WIDE_ASPECT_RATIO;
|
||||||
|
v62.f32[2] *= NARROW_ASPECT_RATIO / std::min(NARROW_ASPECT_RATIO, g_aspectRatio);
|
||||||
|
}
|
||||||
|
|
|
||||||
|
|
@ -628,3 +628,8 @@ registers = ["r3"]
|
||||||
name = "ObjGetItemFieldOfViewMidAsmHook"
|
name = "ObjGetItemFieldOfViewMidAsmHook"
|
||||||
address = 0x82692934
|
address = 0x82692934
|
||||||
registers = ["r1", "f1"]
|
registers = ["r1", "f1"]
|
||||||
|
|
||||||
|
[[midasm_hook]]
|
||||||
|
name = "WorldMapProjectionMidAsmHook"
|
||||||
|
address = 0x82574E00
|
||||||
|
registers = ["v63", "v62"]
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue