@@ -1311,16 +1311,16 @@ static const double OBJ_GET_ITEM_TANGENT = tan(M_PI / 8.0);
13111311// Coordinates are in [-1, 1] range. Automatically fit and centered.
13121312// The tangent is calculated incorrectly in game, causing distortion.
13131313// The hook makes them move to the correct position regardless of FOV.
1314- static float ComputeObjGetItemTangent (float fieldOfView, float aspectRatio)
1315- {
1316- return tan (AdjustFieldOfView (fieldOfView, aspectRatio) / 2.0 ) / OBJ_GET_ITEM_TANGENT ;
1317- }
1318-
1319- void ObjGetItemFieldOfViewMidAsmHook (PPCRegister& r1, PPCRegister& f1)
1320- {
1321- if (Config::AspectRatio != EAspectRatio::OriginalNarrow)
1322- *reinterpret_cast <be<float >*>(g_memory.base + r1.u32 + 0x58 ) = ComputeObjGetItemTangent (f1.f64 , g_aspectRatio);
1323- }
1314+ // static float ComputeObjGetItemTangent(float fieldOfView, float aspectRatio)
1315+ // {
1316+ // return tan(AdjustFieldOfView(fieldOfView, aspectRatio) / 2.0) / OBJ_GET_ITEM_TANGENT;
1317+ // }
1318+ //
1319+ // void ObjGetItemFieldOfViewMidAsmHook(PPCRegister& r1, PPCRegister& f1)
1320+ // {
1321+ // if (Config::AspectRatio != EAspectRatio::OriginalNarrow)
1322+ // *reinterpret_cast<be<float>*>(g_memory.base + r1.u32 + 0x58) = ComputeObjGetItemTangent(f1.f64, g_aspectRatio);
1323+ // }
13241324
13251325static double ComputeObjGetItemX (uint32_t type)
13261326{
@@ -1418,11 +1418,11 @@ void WorldMapProjectionMidAsmHook(PPCVRegister& v63, PPCVRegister& v62)
14181418}
14191419
14201420// CViewRing has the same exact incorrect math as CObjGetItem.
1421- void ViewRingFieldOfViewMidAsmHook (PPCRegister& r1, PPCRegister& f1)
1422- {
1423- if (Config::AspectRatio != EAspectRatio::OriginalNarrow)
1424- *reinterpret_cast <be<float >*>(g_memory.base + r1.u32 + 0x54 ) = ComputeObjGetItemTangent (f1.f64 , g_aspectRatio);
1425- }
1421+ // void ViewRingFieldOfViewMidAsmHook(PPCRegister& r1, PPCRegister& f1)
1422+ // {
1423+ // if (Config::AspectRatio != EAspectRatio::OriginalNarrow)
1424+ // *reinterpret_cast<be<float>*>(g_memory.base + r1.u32 + 0x54) = ComputeObjGetItemTangent(f1.f64, g_aspectRatio);
1425+ // }
14261426
14271427void ViewRingYMidAsmHook (PPCRegister& f1)
14281428{
0 commit comments