adding missing check to an optimization so it can be re-enabled
This commit is contained in:
parent
ce279995de
commit
ecbdbf21df
|
@ -1103,32 +1103,29 @@ FORCEINLINE void rot_scale_op(GPU * gpu, s32 X, s32 Y, s16 PA, s16 PB, s16 PC, s
|
||||||
const s32 dx = (s32)PA;
|
const s32 dx = (s32)PA;
|
||||||
const s32 dy = (s32)PC;
|
const s32 dy = (s32)PC;
|
||||||
|
|
||||||
//not safe for 128 wide nonwrapping BG
|
// as an optimization, specially handle the fairly common case of
|
||||||
//and probably not safe for other size nonwrapping BG which are scrolled near their edge
|
// "unrotated + unscaled + no boundary checking required"
|
||||||
|
if(dx==0x100 && dy==0)
|
||||||
//// as an optimization, specially handle the fairly common case of
|
{
|
||||||
//// "unrotated + unscaled + no boundary checking required"
|
s32 auxX = x.bits.Integer;
|
||||||
//if(dx==0x100 && dy==0)
|
s32 auxY = y.bits.Integer;
|
||||||
//{
|
if(WRAP || (auxX + LG < wh && auxX >= 0 && auxY < ht && auxY >= 0))
|
||||||
// s32 auxX = x.bits.Integer;
|
{
|
||||||
// if(WRAP || auxX + LG < wh)
|
if(WRAP)
|
||||||
// {
|
{
|
||||||
// s32 auxY = y.bits.Integer;
|
auxY = auxY & (ht-1);
|
||||||
// if(WRAP)
|
auxX = auxX & (wh-1);
|
||||||
// {
|
}
|
||||||
// auxY = auxY & (ht-1);
|
for(int i = 0; i < LG; ++i)
|
||||||
// auxX = auxX & (wh-1);
|
{
|
||||||
// }
|
fun(gpu, auxX, auxY, wh, map, tile, pal, i);
|
||||||
// for(int i = 0; i < LG; ++i)
|
auxX++;
|
||||||
// {
|
if(WRAP)
|
||||||
// fun(gpu, auxX, auxY, wh, map, tile, pal, i);
|
auxX = auxX & (wh-1);
|
||||||
// auxX++;
|
}
|
||||||
// if(WRAP)
|
return;
|
||||||
// auxX = auxX & (wh-1);
|
}
|
||||||
// }
|
}
|
||||||
// return;
|
|
||||||
// }
|
|
||||||
//}
|
|
||||||
|
|
||||||
for(int i = 0; i < LG; ++i)
|
for(int i = 0; i < LG; ++i)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue