@@ -1788,7 +1788,7 @@ void GX_SetViewportJitter(f32 xOrig,f32 yOrig,f32 wd,f32 ht,f32 nearZ,f32 farZ,u
17881788{
17891789 f32 x0 ,y0 ,x1 ,y1 ,n ,f ,z ;
17901790 static const f32 Xfactor = 0.5f ;
1791- static const f32 Yfactor = 342.0f ;
1791+ static const f32 Yfactor = 342.0f + ( 0.5f / 12.0f ) ;
17921792 static const f32 Zfactor = 16777215.0f ;
17931793
17941794 if (!field ) yOrig -= Xfactor ;
@@ -4075,8 +4075,8 @@ void GX_SetClipMode(u8 mode)
40754075
40764076void GX_SetScissor (u32 xOrigin ,u32 yOrigin ,u32 wd ,u32 ht )
40774077{
4078- u32 xo = xOrigin + 0x156 ;
4079- u32 yo = yOrigin + 0x156 ;
4078+ u32 xo = xOrigin + 342 ;
4079+ u32 yo = yOrigin + 342 ;
40804080 u32 nwd = xo + (wd - 1 );
40814081 u32 nht = yo + (ht - 1 );
40824082
@@ -4097,16 +4097,16 @@ void GX_GetScissor(u32 *xOrigin,u32 *yOrigin,u32 *wd,u32 *ht)
40974097 u32 nwd = _SHIFTR (__gx -> sciBRcorner ,12 ,11 );
40984098 u32 nht = _SHIFTL (__gx -> sciBRcorner ,0 ,11 );
40994099
4100- * xOrigin = xo - 0x156 ;
4101- * yOrigin = yo - 0x156 ;
4100+ * xOrigin = xo - 342 ;
4101+ * yOrigin = yo - 342 ;
41024102 * wd = (nwd + 1 )- xo ;
41034103 * ht = (nht + 1 )- yo ;
41044104}
41054105
41064106void GX_SetScissorBoxOffset (s32 xoffset ,s32 yoffset )
41074107{
4108- s32 xoff = _SHIFTR ((xoffset + 0x156 ),1 ,24 );
4109- s32 yoff = _SHIFTR ((yoffset + 0x156 ),1 ,24 );
4108+ s32 xoff = _SHIFTR ((xoffset + 342 ),1 ,24 );
4109+ s32 yoff = _SHIFTR ((yoffset + 342 ),1 ,24 );
41104110
41114111 GX_LOAD_BP_REG ((0x59000000 |(_SHIFTL (yoff ,10 ,10 ))|(xoff & 0x3ff )));
41124112}
@@ -4490,7 +4490,7 @@ void GX_SetFogRangeAdj(u8 enable,u16 center,const GXFogAdjTbl *table)
44904490 val = 0xed000000 |(_SHIFTL (table -> r [9 ],12 ,12 ))|(table -> r [8 ]& 0x0fff );
44914491 GX_LOAD_BP_REG (val );
44924492 }
4493- val = 0xe8000000 |(_SHIFTL (enable ,10 ,1 ))|((center + 342 )& 0x03ff );
4493+ val = 0xe8000000 |(_SHIFTL (enable ,10 ,1 ))|((center + 342 )& 0x03ff );
44944494 GX_LOAD_BP_REG (val );
44954495}
44964496
0 commit comments