Remove conditions from api_blit.
This commit is contained in:
parent
2bb436eac6
commit
b4f1afd474
|
@ -1729,15 +1729,12 @@ static void api_blit(tic_mem* tic, tic_scanline scanline, tic_overlap overlap, v
|
||||||
|
|
||||||
s32 pos = (r + tic->ram.vram.vars.offset.y + TIC80_HEIGHT) % TIC80_HEIGHT * TIC80_WIDTH >> 1;
|
s32 pos = (r + tic->ram.vram.vars.offset.y + TIC80_HEIGHT) % TIC80_HEIGHT * TIC80_WIDTH >> 1;
|
||||||
|
|
||||||
u32 *endRow = colPtr + TIC80_WIDTH;
|
u32 x = (-tic->ram.vram.vars.offset.x + TIC80_WIDTH) % TIC80_WIDTH;
|
||||||
colPtr += (-tic->ram.vram.vars.offset.x + TIC80_WIDTH) % TIC80_WIDTH;
|
|
||||||
for(s32 c = 0; c < TIC80_WIDTH / 2; c++)
|
for(s32 c = 0; c < TIC80_WIDTH / 2; c++)
|
||||||
{
|
{
|
||||||
u8 val = ((u8*)tic->ram.vram.screen.data)[pos + c];
|
u8 val = ((u8*)tic->ram.vram.screen.data)[pos + c];
|
||||||
*colPtr++ = pal[val & 0xf];
|
*(colPtr + (x++ % TIC80_WIDTH)) = pal[val & 0xf];
|
||||||
if(colPtr >= endRow) colPtr -= TIC80_WIDTH;
|
*(colPtr + (x++ % TIC80_WIDTH)) = pal[val >> 4];
|
||||||
*colPtr++ = pal[val >> 4];
|
|
||||||
if(colPtr >= endRow) colPtr -= TIC80_WIDTH;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
memset4(rowPtr + (TIC80_FULLWIDTH-Right), pal[tic->ram.vram.vars.border], Right);
|
memset4(rowPtr + (TIC80_FULLWIDTH-Right), pal[tic->ram.vram.vars.border], Right);
|
||||||
|
|
Loading…
Reference in New Issue