(MESS-specific) snes: fixed 16x16 tiles in 2bpp mode, fixes gfxs in many games, most notably Super Adventure Island.

This commit is contained in:
Angelo Salese 2009-07-19 22:36:56 +00:00
parent 273cb7af50
commit ef478440b0

View File

@ -262,7 +262,7 @@ INLINE void snes_draw_tile_2(UINT8 screen, UINT8 layer, UINT16 tileaddr, INT16 x
for( ii = x; ii < (x + 8); ii++ )
{
register UINT8 colour;
UINT8 colour;
if( flip )
{
colour = (plane[0] & mask ? 1 : 0) | (plane[1] & mask ? 2 : 0);
@ -353,7 +353,7 @@ INLINE void snes_draw_tile_4(UINT8 screen, UINT8 layer, UINT16 tileaddr, INT16 x
for( ii = x; ii < (x + 8); ii++ )
{
register UINT8 colour;
UINT8 colour;
if( flip )
{
colour = (plane[0] & mask ? 1 : 0) | (plane[1] & mask ? 2 : 0) |
@ -450,7 +450,7 @@ INLINE void snes_draw_tile_8(UINT8 screen, UINT8 layer, UINT16 tileaddr, INT16 x
for( ii = x; ii < (x + 8); ii++ )
{
register UINT8 colour;
UINT8 colour;
if( flip )
{
colour = (plane[0] & mask ? 1 : 0) | (plane[1] & mask ? 2 : 0) |
@ -549,7 +549,7 @@ INLINE void snes_draw_tile_object(UINT8 screen, UINT16 tileaddr, INT16 x, UINT8
for( ii = x; ii < (x + 8); ii++ )
{
register UINT8 colour;
UINT8 colour;
if( flip )
{
colour = (plane[0] & mask ? 1 : 0) | (plane[1] & mask ? 2 : 0) |
@ -613,7 +613,7 @@ INLINE void snes_draw_tile_object_w(UINT8 screen, UINT16 tileaddr, INT16 x, UINT
x <<= 1;
for( ii = x; ii < (x + 16); ii += 2 )
{
register UINT8 colour;
UINT8 colour;
if( flip )
{
colour = (plane[0] & mask ? 1 : 0) | (plane[1] & mask ? 2 : 0) |
@ -705,7 +705,7 @@ static void snes_update_line_2(UINT8 screen, UINT8 layer, UINT16 curline )
/* Jump to base map address */
tmap = snes_ppu.layer[layer].map;
/* Offset vertically */
tmap += table_vscroll[snes_ppu.layer[layer].map_size][vtilescroll >> 5];
tmap += table_vscroll[snes_ppu.layer[layer].map_size & 3][(vtilescroll >> 5) & 3];
/* Scroll vertically */
tmap += (vtilescroll & 0x1f) << 6;
/* Remember this position */
@ -730,7 +730,7 @@ static void snes_update_line_2(UINT8 screen, UINT8 layer, UINT16 curline )
priority = table_bgd_pty[snes_ppu.mode > 1][layer][(snes_vram[tmap + ii + 1] & 0x20) >> 5];
pal = (snes_vram[tmap + ii + 1] & 0x1c); /* 8 palettes of 4 colours */
tile = (snes_vram[tmap + ii + 1] & 0x3) << 8;
tile |= snes_vram[tmap + ii];
tile |= (snes_vram[tmap + ii] & 0xff);
/* Mode 0 palettes are layer specific */
if( snes_ppu.mode == 0 )
@ -749,7 +749,7 @@ static void snes_update_line_2(UINT8 screen, UINT8 layer, UINT16 curline )
}
else
{
tile += 32;
tile += 16;
}
}
tile_line = -tile_line + 7;
@ -758,7 +758,7 @@ static void snes_update_line_2(UINT8 screen, UINT8 layer, UINT16 curline )
{
if( line > 7 )
{
tile += 32;
tile += 16;
tile_line -= 8;
}
}
@ -877,7 +877,7 @@ static void snes_update_line_2_hi(UINT8 screen, UINT8 layer, UINT16 curline )
}
else
{
tile += 32;
tile += 16;
}
}
tile_line = -tile_line + 7;
@ -886,7 +886,7 @@ static void snes_update_line_2_hi(UINT8 screen, UINT8 layer, UINT16 curline )
{
if( line > 7 )
{
tile += 32;
tile += 16;
tile_line -= 8;
}
}
@ -1276,7 +1276,7 @@ static void snes_update_line_mode7(UINT8 screen, UINT8 layer, UINT16 curline )
INT16 ma, mb, mc, md;
INT16 xc, yc, tx, ty, sx, sy, hs, vs, xpos, xdir;
UINT8 priority = 0;
register UINT8 colour = 0;
UINT8 colour = 0;
#ifdef SNES_DBG_video
if( debug_options.bg_disabled[0] )