fix affine BG scroll starting points. fixes totally whack affine layer positioning

This commit is contained in:
zeromus 2009-04-25 23:47:55 +00:00
parent 41dc477e74
commit 5f2c541ada
3 changed files with 0 additions and 52 deletions

View File

@ -3041,21 +3041,6 @@ void GPU_ligne(NDS_Screen * screen, u16 l)
GPU * gpu = screen->gpu; GPU * gpu = screen->gpu;
GPU_tempScanline_valid = false; GPU_tempScanline_valid = false;
//here is some setup which is only done on line 0
if(l == 0) {
for(int num=2;num<=3;num++)
{
BGxPARMS * parms;
if (num==2)
parms = &(gpu->dispx_st)->dispx_BG2PARMS;
else
parms = &(gpu->dispx_st)->dispx_BG3PARMS;
parms->BGxX = gpu->affineInfo[num-2].x;
parms->BGxY = gpu->affineInfo[num-2].y;
}
}
//cache some parameters which are assumed to be stable throughout the rendering of the entire line //cache some parameters which are assumed to be stable throughout the rendering of the entire line
gpu->currLine = (u8)l; gpu->currLine = (u8)l;
u16 mosaic_control = T1ReadWord((u8 *)&gpu->dispx_st->dispx_MISC.MOSAIC, 0); u16 mosaic_control = T1ReadWord((u8 *)&gpu->dispx_st->dispx_MISC.MOSAIC, 0);
@ -3148,12 +3133,6 @@ bool gpu_loadstate(std::istream* is)
return !is->fail(); return !is->fail();
} }
void GPU::setAffineStart(int layer, int xy, u32 val)
{
if(xy==0) affineInfo[layer-2].x = val;
else affineInfo[layer-2].y = val;
}
void gpu_UpdateRender() void gpu_UpdateRender()
{ {
int x = 0, y = 0; int x = 0, y = 0;

View File

@ -761,12 +761,6 @@ struct GPU
void __setFinalColorBck(u16 color, u8 x, bool opaque); void __setFinalColorBck(u16 color, u8 x, bool opaque);
void setAffineStart(int layer, int xy, u32 val);
struct AffineInfo {
AffineInfo() : x(0), y(0) {}
u32 x, y;
} affineInfo[2];
void renderline_checkWindows(u16 x, bool &draw, bool &effect) const; void renderline_checkWindows(u16 x, bool &draw, bool &effect) const;

View File

@ -2194,31 +2194,6 @@ void FASTCALL _MMU_ARM9_write32(u32 adr, u32 val)
switch(adr) switch(adr)
{ {
case REG_DISPA_BG2XL:
MainScreen.gpu->setAffineStart(2,0,val);
break;
case REG_DISPA_BG2YL:
MainScreen.gpu->setAffineStart(2,1,val);
break;
case REG_DISPB_BG2XL:
SubScreen.gpu->setAffineStart(2,0,val);
break;
case REG_DISPB_BG2YL:
SubScreen.gpu->setAffineStart(2,1,val);
break;
case REG_DISPA_BG3XL:
MainScreen.gpu->setAffineStart(3,0,val);
break;
case REG_DISPA_BG3YL:
MainScreen.gpu->setAffineStart(3,1,val);
break;
case REG_DISPB_BG3XL:
SubScreen.gpu->setAffineStart(3,0,val);
break;
case REG_DISPB_BG3YL:
SubScreen.gpu->setAffineStart(3,1,val);
break;
case 0x04000600: case 0x04000600:
GFX_FIFOcnt(val); GFX_FIFOcnt(val);
return; return;