(PSX) Some small-time opts to do with fade to black

This commit is contained in:
twinaphex 2014-05-02 01:46:08 +02:00
parent cfbaac2a73
commit 8a28b498cd
2 changed files with 12 additions and 23 deletions

View File

@ -1252,8 +1252,6 @@ pscpu_timestamp_t PS_GPU::Update(const pscpu_timestamp_t sys_timestamp)
{
if((bool)(DisplayMode & 0x08) != HardwarePALType)
{
const uint32 black = surface->MakeColor(0, 0, 0);
DisplayRect->x = 0;
DisplayRect->y = 0;
DisplayRect->w = 384;
@ -1261,15 +1259,12 @@ pscpu_timestamp_t PS_GPU::Update(const pscpu_timestamp_t sys_timestamp)
for(int32 y = 0; y < DisplayRect->h; y++)
{
uint32 *dest = surface->pixels + y * surface->pitch32;
uint32 *dest = surface->pixels + y * surface->pitch32;
LineWidths[y].x = 0;
LineWidths[y].w = 384;
LineWidths[y].x = 0;
LineWidths[y].w = 384;
for(int32 x = 0; x < 384; x++)
{
dest[x] = black;
}
memset(dest, 0, 384 * sizeof(int32));
}
char buffer[256];
@ -1279,8 +1274,6 @@ pscpu_timestamp_t PS_GPU::Update(const pscpu_timestamp_t sys_timestamp)
}
else
{
const uint32 black = surface->MakeColor(0, 0, 0);
espec->InterlaceOn = (bool)(DisplayMode & 0x20);
espec->InterlaceField = (bool)(DisplayMode & 0x20) && field;
@ -1294,10 +1287,10 @@ pscpu_timestamp_t PS_GPU::Update(const pscpu_timestamp_t sys_timestamp)
for(int i = 0; i < (DisplayRect->y + DisplayRect->h); i++)
{
surface->pixels[i * surface->pitch32 + 0] =
surface->pixels[i * surface->pitch32 + 1] = black;
LineWidths[i].x = 0;
LineWidths[i].w = 2;
surface->pixels[i * surface->pitch32 + 0] =
surface->pixels[i * surface->pitch32 + 1] = 0;
LineWidths[i].x = 0;
LineWidths[i].w = 2;
}
}
}
@ -1398,10 +1391,8 @@ pscpu_timestamp_t PS_GPU::Update(const pscpu_timestamp_t sys_timestamp)
{
const uint16 *src = GPURAM[DisplayFB_CurLineYReadout];
const uint32 black = surface->MakeColor(0, 0, 0);
for(int32 x = 0; x < dx_start; x++)
dest[x] = black;
memset(dest, 0, dx_start * sizeof(int32));
//printf("%d %d %d - %d %d\n", scanline, dx_start, dx_end, HorizStart, HorizEnd);
if(surface->format.Rshift == 0 && surface->format.Gshift == 8 && surface->format.Bshift == 16)
@ -1416,7 +1407,7 @@ pscpu_timestamp_t PS_GPU::Update(const pscpu_timestamp_t sys_timestamp)
ReorderRGB_Var(surface->format.Rshift, surface->format.Gshift, surface->format.Bshift, DisplayMode & 0x10, src, dest, dx_start, dx_end, fb_x);
for(uint32 x = dx_end; x < dmw; x++)
dest[x] = black;
dest[x] = 0;
}
//if(scanline == 64)

View File

@ -73,10 +73,8 @@ void Deinterlacer::Process(MDFN_Surface *surface, const MDFN_Rect &DisplayRect,
if(y == 0 && field)
{
uint32 black = surface->MakeColor(0, 0, 0);
LineWidths[dly - 2] = *src_lw;
memset(&surface->pixels[(dly - 2) * surface->pitch32], black, src_lw->w * sizeof(uint32));
LineWidths[dly - 2] = *src_lw;
memset(&surface->pixels[(dly - 2) * surface->pitch32], 0, src_lw->w * sizeof(uint32));
}
if(dly < (DisplayRect.y + DisplayRect.h))