gpu: revert an optimization which broke some edge handling in affine bg (fix NYT crosswords)

This commit is contained in:
zeromus 2009-09-25 05:16:54 +00:00
parent a570e7a054
commit bab64f3c94
1 changed files with 31 additions and 23 deletions

View File

@ -1103,29 +1103,32 @@ 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;
// as an optimization, specially handle the fairly common case of //not safe for 128 wide nonwrapping BG
// "unrotated + unscaled + no boundary checking required" //and probably not safe for other size nonwrapping BG which are scrolled near their edge
if(dx==0x100 && dy==0)
{ //// as an optimization, specially handle the fairly common case of
s32 auxX = x.bits.Integer; //// "unrotated + unscaled + no boundary checking required"
if(WRAP || auxX + LG < wh) //if(dx==0x100 && dy==0)
{ //{
s32 auxY = y.bits.Integer; // s32 auxX = x.bits.Integer;
if(WRAP) // if(WRAP || auxX + LG < wh)
{ // {
auxY = auxY & (ht-1); // s32 auxY = y.bits.Integer;
auxX = auxX & (wh-1); // if(WRAP)
} // {
for(int i = 0; i < LG; ++i) // auxY = auxY & (ht-1);
{ // auxX = auxX & (wh-1);
fun(gpu, auxX, auxY, wh, map, tile, pal, i); // }
auxX++; // for(int i = 0; i < LG; ++i)
if(WRAP) // {
auxX = auxX & (wh-1); // fun(gpu, auxX, auxY, wh, map, tile, pal, i);
} // auxX++;
return; // if(WRAP)
} // auxX = auxX & (wh-1);
} // }
// return;
// }
//}
for(int i = 0; i < LG; ++i) for(int i = 0; i < LG; ++i)
{ {
@ -2136,6 +2139,11 @@ static void GPU_ligne_layer(NDS_Screen * screen, u16 l)
//useful for debugging individual layers //useful for debugging individual layers
//if(gpu->core == 1 || i16 != 2) continue; //if(gpu->core == 1 || i16 != 2) continue;
if(gpu->core == 0 || i16 == 2)
{
int zzz=9;
}
#ifndef DISABLE_MOSAIC #ifndef DISABLE_MOSAIC
if(gpu->curr_mosaic_enabled) if(gpu->curr_mosaic_enabled)
gpu->modeRender<true>(i16); gpu->modeRender<true>(i16);