bring branches into line
fixes duke nukem on bgk-link and silences gcc warning on trunk ignore a few more files git-svn-id: https://svn.code.sf.net/p/vbam/code/branches/bgk-link@1197 a31d4220-a93d-0410-bf67-fe4944624d44
This commit is contained in:
parent
52f1aa9129
commit
493deb7687
|
@ -5036,8 +5036,7 @@ void gbEmulate(int ticksToStop)
|
||||||
{
|
{
|
||||||
u16 color = gbColorOption ? gbColorFilter[0] : 0;
|
u16 color = gbColorOption ? gbColorFilter[0] : 0;
|
||||||
if (!gbCgbMode)
|
if (!gbCgbMode)
|
||||||
color = gbColorOption ? gbColorFilter[gbPalette[3] & 0x7FFF] :
|
color = gbColorOption ? gbColorFilter[gbPalette[3] & 0x7FFF] : gbPalette[3] & 0x7FFF;
|
||||||
gbPalette[3] & 0x7FFF;
|
|
||||||
for(int i = 0; i < 160; i++)
|
for(int i = 0; i < 160; i++)
|
||||||
{
|
{
|
||||||
gbLineMix[i] = color;
|
gbLineMix[i] = color;
|
||||||
|
@ -5113,11 +5112,9 @@ void gbEmulate(int ticksToStop)
|
||||||
u8 register_LYLcdOff = ((register_LY+154)%154);
|
u8 register_LYLcdOff = ((register_LY+154)%154);
|
||||||
for (register_LY=0;register_LY <= 0x90;register_LY++)
|
for (register_LY=0;register_LY <= 0x90;register_LY++)
|
||||||
{
|
{
|
||||||
u16 color = gbColorOption ? gbColorFilter[0x7FFF] :
|
u16 color = gbColorOption ? gbColorFilter[0x7FFF] : 0x7FFF;
|
||||||
0x7FFF;
|
|
||||||
if (!gbCgbMode)
|
if (!gbCgbMode)
|
||||||
color = gbColorOption ? gbColorFilter[gbPalette[0] & 0x7FFF] :
|
color = gbColorOption ? gbColorFilter[gbPalette[0] & 0x7FFF] : gbPalette[0] & 0x7FFF;
|
||||||
gbPalette[0] & 0x7FFF;
|
|
||||||
for(int i = 0; i < 160; i++)
|
for(int i = 0; i < 160; i++)
|
||||||
{
|
{
|
||||||
gbLineMix[i] = color;
|
gbLineMix[i] = color;
|
||||||
|
@ -5140,11 +5137,9 @@ void gbEmulate(int ticksToStop)
|
||||||
if (register_LY<144)
|
if (register_LY<144)
|
||||||
{
|
{
|
||||||
|
|
||||||
u16 color = gbColorOption ? gbColorFilter[0x7FFF] :
|
u16 color = gbColorOption ? gbColorFilter[0x7FFF] : 0x7FFF;
|
||||||
0x7FFF;
|
|
||||||
if (!gbCgbMode)
|
if (!gbCgbMode)
|
||||||
color = gbColorOption ? gbColorFilter[gbPalette[0] & 0x7FFF] :
|
color = gbColorOption ? gbColorFilter[gbPalette[0] & 0x7FFF] : gbPalette[0] & 0x7FFF;
|
||||||
gbPalette[0] & 0x7FFF;
|
|
||||||
for(int i = 0; i < 160; i++)
|
for(int i = 0; i < 160; i++)
|
||||||
{
|
{
|
||||||
gbLineMix[i] = color;
|
gbLineMix[i] = color;
|
||||||
|
|
|
@ -155,8 +155,7 @@ void gbRenderLine()
|
||||||
c = c + 4*palette;
|
c = c + 4*palette;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
gbLineMix[x] = gbColorOption ? gbColorFilter[gbPalette[c] & 0x7FFF] :
|
gbLineMix[x] = gbColorOption ? gbColorFilter[gbPalette[c] & 0x7FFF] : gbPalette[c] & 0x7FFF;
|
||||||
gbPalette[c] & 0x7FFF;
|
|
||||||
x++;
|
x++;
|
||||||
if(x >= 160)
|
if(x >= 160)
|
||||||
break;
|
break;
|
||||||
|
@ -204,10 +203,10 @@ void gbRenderLine()
|
||||||
// Also added the gbColorOption (fixes Dracula Densetsu II color problems)
|
// Also added the gbColorOption (fixes Dracula Densetsu II color problems)
|
||||||
for(int i = 0; i < 160; i++)
|
for(int i = 0; i < 160; i++)
|
||||||
{
|
{
|
||||||
u16 color = gbColorOption ? gbColorFilter[0x7FFF] :
|
u16 color = gbColorOption ? gbColorFilter[0x7FFF] : 0x7FFF;
|
||||||
0x7FFF;
|
|
||||||
if (!gbCgbMode)
|
if (!gbCgbMode)
|
||||||
color = gbColorOption ? gbColorFilter[gbPalette[gbBgpLine[i+(gbSpeed ? 5 : 11)+gbSpritesTicks[i]*(gbSpeed ? 2 : 4)]&3] & 0x7FFF] :
|
color = gbColorOption ?
|
||||||
|
gbColorFilter[gbPalette[gbBgpLine[i+(gbSpeed ? 5 : 11)+gbSpritesTicks[i]*(gbSpeed ? 2 : 4)]&3] & 0x7FFF] :
|
||||||
gbPalette[gbBgpLine[i+(gbSpeed ? 5 : 11)+gbSpritesTicks[i]*(gbSpeed ? 2 : 4)]&3] & 0x7FFF;
|
gbPalette[gbBgpLine[i+(gbSpeed ? 5 : 11)+gbSpritesTicks[i]*(gbSpeed ? 2 : 4)]&3] & 0x7FFF;
|
||||||
gbLineMix[i] = color;
|
gbLineMix[i] = color;
|
||||||
gbLineBuffer[i] = 0;
|
gbLineBuffer[i] = 0;
|
||||||
|
@ -218,8 +217,7 @@ void gbRenderLine()
|
||||||
// LCDC.0 also enables/disables the window in !gbCgbMode ?!?!
|
// LCDC.0 also enables/disables the window in !gbCgbMode ?!?!
|
||||||
// (tested on real hardware)
|
// (tested on real hardware)
|
||||||
// This fixes Last Bible II & Zankurou Musouken
|
// This fixes Last Bible II & Zankurou Musouken
|
||||||
if((register_LCDC & 0x01 || gbCgbMode) && (register_LCDC & 0x20) &&
|
if((register_LCDC & 0x01 || gbCgbMode) && (register_LCDC & 0x20) && (layerSettings & 0x2000) && (gbWindowLine != -2)) {
|
||||||
(layerSettings & 0x2000) && (gbWindowLine != -2)) {
|
|
||||||
int i = 0;
|
int i = 0;
|
||||||
// Fix (accurate emulation) for most of the window display problems
|
// Fix (accurate emulation) for most of the window display problems
|
||||||
// (ie. Zen - Intergalactic Ninja, Urusei Yatsura...).
|
// (ie. Zen - Intergalactic Ninja, Urusei Yatsura...).
|
||||||
|
@ -236,7 +234,7 @@ void gbRenderLine()
|
||||||
|
|
||||||
if(y >= inUseRegister_WY) {
|
if(y >= inUseRegister_WY) {
|
||||||
|
|
||||||
if (gbWindowLine == -1)
|
if (gbWindowLine>143)
|
||||||
gbWindowLine = 0;
|
gbWindowLine = 0;
|
||||||
|
|
||||||
int wx = register_WX;
|
int wx = register_WX;
|
||||||
|
@ -352,8 +350,7 @@ void gbRenderLine()
|
||||||
c = c + 4*palette;
|
c = c + 4*palette;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
gbLineMix[x] = gbColorOption ? gbColorFilter[gbPalette[c] & 0x7FFF] :
|
gbLineMix[x] = gbColorOption ? gbColorFilter[gbPalette[c] & 0x7FFF] : gbPalette[c] & 0x7FFF;
|
||||||
gbPalette[c] & 0x7FFF;
|
|
||||||
}
|
}
|
||||||
x++;
|
x++;
|
||||||
if(x >= 160)
|
if(x >= 160)
|
||||||
|
@ -390,11 +387,9 @@ void gbRenderLine()
|
||||||
gbWindowLine = 0;
|
gbWindowLine = 0;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
u16 color = gbColorOption ? gbColorFilter[0x7FFF] :
|
u16 color = gbColorOption ? gbColorFilter[0x7FFF] : 0x7FFF;
|
||||||
0x7FFF;
|
|
||||||
if (!gbCgbMode)
|
if (!gbCgbMode)
|
||||||
color = gbColorOption ? gbColorFilter[gbPalette[0] & 0x7FFF] :
|
color = gbColorOption ? gbColorFilter[gbPalette[0] & 0x7FFF] : gbPalette[0] & 0x7FFF;
|
||||||
gbPalette[0] & 0x7FFF;
|
|
||||||
for(int i = 0; i < 160; i++)
|
for(int i = 0; i < 160; i++)
|
||||||
{
|
{
|
||||||
gbLineMix[i] = color;
|
gbLineMix[i] = color;
|
||||||
|
@ -521,8 +516,7 @@ void gbDrawSpriteTile(int tile, int x,int y,int t, int flags,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
gbLineMix[xxx] = gbColorOption ? gbColorFilter[gbPalette[c] & 0x7FFF] :
|
gbLineMix[xxx] = gbColorOption ? gbColorFilter[gbPalette[c] & 0x7FFF] : gbPalette[c] & 0x7FFF;
|
||||||
gbPalette[c] & 0x7FFF;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue