mirror of
https://github.com/holub/mame
synced 2025-04-22 08:22:15 +03:00
namco*: no need for offs variable in tilemap mappers
This commit is contained in:
parent
8cd1eac323
commit
2675960a82
@ -254,16 +254,12 @@ void baraduke_state::palette(palette_device &palette) const
|
||||
// convert from 32x32 to 36x28
|
||||
TILEMAP_MAPPER_MEMBER(baraduke_state::tx_tilemap_scan)
|
||||
{
|
||||
int offs;
|
||||
|
||||
row += 2;
|
||||
col -= 2;
|
||||
if (col & 0x20)
|
||||
offs = row + ((col & 0x1f) << 5);
|
||||
return row + ((col & 0x1f) << 5);
|
||||
else
|
||||
offs = col + (row << 5);
|
||||
|
||||
return offs;
|
||||
return col + (row << 5);
|
||||
}
|
||||
|
||||
TILE_GET_INFO_MEMBER(baraduke_state::tx_get_tile_info)
|
||||
|
@ -75,16 +75,12 @@ void digdug_state::digdug_palette(palette_device &palette) const
|
||||
/* convert from 32x32 to 36x28 */
|
||||
TILEMAP_MAPPER_MEMBER(digdug_state::tilemap_scan)
|
||||
{
|
||||
int offs;
|
||||
|
||||
row += 2;
|
||||
col -= 2;
|
||||
if (col & 0x20)
|
||||
offs = row + ((col & 0x1f) << 5);
|
||||
return row + ((col & 0x1f) << 5);
|
||||
else
|
||||
offs = col + (row << 5);
|
||||
|
||||
return offs;
|
||||
return col + (row << 5);
|
||||
}
|
||||
|
||||
|
||||
|
@ -100,16 +100,12 @@ void galaga_state::galaga_palette(palette_device &palette) const
|
||||
/* convert from 32x32 to 36x28 */
|
||||
TILEMAP_MAPPER_MEMBER(galaga_state::tilemap_scan)
|
||||
{
|
||||
int offs;
|
||||
|
||||
row += 2;
|
||||
col -= 2;
|
||||
if (col & 0x20)
|
||||
offs = row + ((col & 0x1f) << 5);
|
||||
return row + ((col & 0x1f) << 5);
|
||||
else
|
||||
offs = col + (row << 5);
|
||||
|
||||
return offs;
|
||||
return col + (row << 5);
|
||||
}
|
||||
|
||||
|
||||
|
@ -224,23 +224,17 @@ void mappy_state::phozon_palette(palette_device &palette) const
|
||||
/* convert from 32x32 to 36x28 */
|
||||
TILEMAP_MAPPER_MEMBER(mappy_state::superpac_tilemap_scan)
|
||||
{
|
||||
int offs;
|
||||
|
||||
row += 2;
|
||||
col -= 2;
|
||||
if (col & 0x20)
|
||||
offs = row + ((col & 0x1f) << 5);
|
||||
return row + ((col & 0x1f) << 5);
|
||||
else
|
||||
offs = col + (row << 5);
|
||||
|
||||
return offs;
|
||||
return col + (row << 5);
|
||||
}
|
||||
|
||||
/* tilemap is a composition of a 32x60 scrolling portion and two 2x28 fixed portions on the sides */
|
||||
TILEMAP_MAPPER_MEMBER(mappy_state::mappy_tilemap_scan)
|
||||
{
|
||||
int offs;
|
||||
|
||||
col -= 2;
|
||||
if (col & 0x20)
|
||||
{
|
||||
@ -248,14 +242,12 @@ TILEMAP_MAPPER_MEMBER(mappy_state::mappy_tilemap_scan)
|
||||
mapping from logical to hardware coordinates, which is true to the hardware.
|
||||
Not doing it that way would cause missing tiles in motos and todruaga */
|
||||
if (row & 0x20)
|
||||
offs = 0x7ff; // outside visible area
|
||||
return 0x7ff; // outside visible area
|
||||
else
|
||||
offs = ((row + 2) & 0x0f) + (row & 0x10) + ((col & 3) << 5) + 0x780;
|
||||
return ((row + 2) & 0x0f) + (row & 0x10) + ((col & 3) << 5) + 0x780;
|
||||
}
|
||||
else
|
||||
offs = col + (row << 5);
|
||||
|
||||
return offs;
|
||||
return col + (row << 5);
|
||||
}
|
||||
|
||||
TILE_GET_INFO_MEMBER(mappy_state::superpac_get_tile_info)
|
||||
|
@ -165,16 +165,12 @@ void skykid_state::palette(palette_device &palette) const
|
||||
// convert from 32x32 to 36x28
|
||||
TILEMAP_MAPPER_MEMBER(skykid_state::tx_tilemap_scan)
|
||||
{
|
||||
int offs;
|
||||
|
||||
row += 2;
|
||||
col -= 2;
|
||||
if (col & 0x20)
|
||||
offs = row + ((col & 0x1f) << 5);
|
||||
return row + ((col & 0x1f) << 5);
|
||||
else
|
||||
offs = col + (row << 5);
|
||||
|
||||
return offs;
|
||||
return col + (row << 5);
|
||||
}
|
||||
|
||||
TILE_GET_INFO_MEMBER(skykid_state::tx_get_tile_info)
|
||||
|
@ -151,16 +151,12 @@ void warpwarp_state::warpwarp_palette(palette_device &palette) const
|
||||
/* convert from 32x32 to 34x28 */
|
||||
TILEMAP_MAPPER_MEMBER(warpwarp_state::tilemap_scan)
|
||||
{
|
||||
int offs;
|
||||
|
||||
row += 2;
|
||||
col--;
|
||||
if (col & 0x20)
|
||||
offs = row + ((col & 1) << 5);
|
||||
return row + ((col & 1) << 5);
|
||||
else
|
||||
offs = col + (row << 5);
|
||||
|
||||
return offs;
|
||||
return col + (row << 5);
|
||||
}
|
||||
|
||||
TILE_GET_INFO_MEMBER(warpwarp_state::geebee_get_tile_info)
|
||||
|
@ -169,16 +169,12 @@ void pacman_state::pacman_rbg_palette(palette_device &palette) const
|
||||
|
||||
TILEMAP_MAPPER_MEMBER(pacman_state::pacman_scan_rows)
|
||||
{
|
||||
int offs;
|
||||
|
||||
row += 2;
|
||||
col -= 2;
|
||||
if (col & 0x20)
|
||||
offs = row + ((col & 0x1f) << 5);
|
||||
return row + ((col & 0x1f) << 5);
|
||||
else
|
||||
offs = col + (row << 5);
|
||||
|
||||
return offs;
|
||||
return col + (row << 5);
|
||||
}
|
||||
|
||||
TILE_GET_INFO_MEMBER(pacman_state::pacman_get_tile_info)
|
||||
@ -543,17 +539,17 @@ Jr. Pac-Man
|
||||
|
||||
TILEMAP_MAPPER_MEMBER(pacman_state::jrpacman_scan_rows)
|
||||
{
|
||||
int offs;
|
||||
|
||||
row += 2;
|
||||
col -= 2;
|
||||
if ((col & 0x20) && (row & 0x20))
|
||||
offs = 0;
|
||||
else if (col & 0x20)
|
||||
offs = row + (((col&0x3) | 0x38)<< 5);
|
||||
if (col & 0x20)
|
||||
{
|
||||
if (row & 0x20)
|
||||
return 0x77f; // outside visible area
|
||||
else
|
||||
return row + (((col & 0x3) | 0x38) << 5);
|
||||
}
|
||||
else
|
||||
offs = col + (row << 5);
|
||||
return offs;
|
||||
return col + (row << 5);
|
||||
}
|
||||
|
||||
TILE_GET_INFO_MEMBER(pacman_state::jrpacman_get_tile_info)
|
||||
@ -579,8 +575,7 @@ void pacman_state::jrpacman_mark_tile_dirty(int offset)
|
||||
if (offset < 0x20)
|
||||
{
|
||||
/* line color - mark whole line as dirty */
|
||||
int i;
|
||||
for (i = 2 * 0x20; i < 56 * 0x20; i += 0x20)
|
||||
for (int i = 2 * 0x20; i < 56 * 0x20; i += 0x20)
|
||||
{
|
||||
m_bg_tilemap->mark_tile_dirty(offset + i);
|
||||
}
|
||||
|
@ -164,16 +164,12 @@ void schick_state::machine_start()
|
||||
|
||||
TILEMAP_MAPPER_MEMBER(schick_state::schick_scan_rows)
|
||||
{
|
||||
int offs;
|
||||
|
||||
row += 2;
|
||||
col -= 2;
|
||||
if (col & 0x20)
|
||||
offs = row + ((col & 0x1f) << 5);
|
||||
return row + ((col & 0x1f) << 5);
|
||||
else
|
||||
offs = col + (row << 5);
|
||||
|
||||
return offs;
|
||||
return col + (row << 5);
|
||||
}
|
||||
|
||||
TILE_GET_INFO_MEMBER(schick_state::schick_get_tile_info)
|
||||
|
Loading…
Reference in New Issue
Block a user