the purest of all commits are those that change only whitespacing and indentation. flawless, timeless, indescribable.

This commit is contained in:
goyuken 2014-02-14 16:02:48 +00:00
parent 05823d3022
commit b7a5b12535
2 changed files with 27 additions and 33 deletions

View File

@ -78,17 +78,15 @@ namespace BizHawk.Client.EmuHawk
int* dest = (int*)lockdata.Scan0;
int pitch = lockdata.Stride / sizeof(int);
fixed (byte* src = vdc.SpriteBuffer)
fixed (int* pal = &vce.Palette[256 + sppalnum * 16])
{
fixed (int* pal = &vce.Palette[256 + sppalnum * 16])
for (int tile = 0; tile < 512; tile++)
{
for (int tile = 0; tile < 512; tile++)
{
int srcaddr = tile * 256;
int tx = tile & 31;
int ty = tile >> 5;
int destaddr = ty * 16 * pitch + tx * 16;
Draw16x16(src + srcaddr, dest + destaddr, pitch, pal);
}
int srcaddr = tile * 256;
int tx = tile & 31;
int ty = tile >> 5;
int destaddr = ty * 16 * pitch + tx * 16;
Draw16x16(src + srcaddr, dest + destaddr, pitch, pal);
}
}
bmpViewSP.bmp.UnlockBits(lockdata);
@ -101,17 +99,15 @@ namespace BizHawk.Client.EmuHawk
int* dest = (int*)lockdata.Scan0;
int pitch = lockdata.Stride / sizeof(int);
fixed (byte* src = vdc.PatternBuffer)
fixed (int* pal = &vce.Palette[0 + bgpalnum * 16])
{
fixed (int* pal = &vce.Palette[0 + bgpalnum * 16])
for (int tile = 0; tile < 2048; tile++)
{
for (int tile = 0; tile < 2048; tile++)
{
int srcaddr = tile * 64;
int tx = tile & 63;
int ty = tile >> 6;
int destaddr = ty * 8 * pitch + tx * 8;
Draw8x8(src + srcaddr, dest + destaddr, pitch, pal);
}
int srcaddr = tile * 64;
int tx = tile & 63;
int ty = tile >> 6;
int destaddr = ty * 8 * pitch + tx * 8;
Draw8x8(src + srcaddr, dest + destaddr, pitch, pal);
}
}
bmpViewBG.bmp.UnlockBits(lockdata);

View File

@ -98,23 +98,21 @@ namespace BizHawk.Client.EmuHawk
int pitch = lockdata.Stride / sizeof(int);
fixed (byte* src = vdp.PatternBuffer)
fixed (byte* vram = vdp.VRAM)
{
fixed (byte* vram = vdp.VRAM)
{
short* map = (short*)(vram + vdp.CalcNameTableBase());
short* map = (short*)(vram + vdp.CalcNameTableBase());
for (int tile = 0; tile < maxtile; tile++)
{
short bgent = *map++;
bool hflip = (bgent & 1 << 9) != 0;
bool vflip = (bgent & 1 << 10) != 0;
int* tpal = pal + ((bgent & 1 << 11) >> 7);
int srcaddr = (bgent & 511) * 64;
int tx = tile & 31;
int ty = tile >> 5;
int destaddr = ty * 8 * pitch + tx * 8;
Draw8x8hv(src + srcaddr, dest + destaddr, pitch, tpal, hflip, vflip);
}
for (int tile = 0; tile < maxtile; tile++)
{
short bgent = *map++;
bool hflip = (bgent & 1 << 9) != 0;
bool vflip = (bgent & 1 << 10) != 0;
int* tpal = pal + ((bgent & 1 << 11) >> 7);
int srcaddr = (bgent & 511) * 64;
int tx = tile & 31;
int ty = tile >> 5;
int destaddr = ty * 8 * pitch + tx * 8;
Draw8x8hv(src + srcaddr, dest + destaddr, pitch, tpal, hflip, vflip);
}
}
bmpViewBG.bmp.UnlockBits(lockdata);