mirror of
https://github.com/holub/mame
synced 2025-07-06 10:29:38 +03:00
taito_h.cpp : Reduce duplicates
This commit is contained in:
parent
6f7048ff8a
commit
8a864191e7
@ -67,7 +67,7 @@ private:
|
|||||||
void syvalion_draw_sprites(bitmap_ind16 &bitmap, const rectangle &cliprect);
|
void syvalion_draw_sprites(bitmap_ind16 &bitmap, const rectangle &cliprect);
|
||||||
void recordbr_draw_sprites(bitmap_ind16 &bitmap, const rectangle &cliprect, int priority);
|
void recordbr_draw_sprites(bitmap_ind16 &bitmap, const rectangle &cliprect, int priority);
|
||||||
void dleague_draw_sprites(bitmap_ind16 &bitmap, const rectangle &cliprect, int priority);
|
void dleague_draw_sprites(bitmap_ind16 &bitmap, const rectangle &cliprect, int priority);
|
||||||
inline void draw_single_sprite(bitmap_ind16 &bitmap, const rectangle &cliprect, u32 tile_offs, int x, int y, int zx, int zy);
|
inline void draw_single_sprite(bitmap_ind16 &bitmap, const rectangle &cliprect, u32 tile_offs, int sx, int sy, int ysize, int dx, int dy, int zx, int zy);
|
||||||
void taitoh_log_vram();
|
void taitoh_log_vram();
|
||||||
void dleague_map(address_map &map);
|
void dleague_map(address_map &map);
|
||||||
void recordbr_map(address_map &map);
|
void recordbr_map(address_map &map);
|
||||||
|
@ -66,7 +66,15 @@ static const int zoomy_conv_table[] =
|
|||||||
0x67,0x68,0x6a,0x6b,0x6c,0x6e,0x6f,0x71, 0x72,0x74,0x76,0x78,0x80,0x7b,0x7d,0x7f
|
0x67,0x68,0x6a,0x6b,0x6c,0x6e,0x6f,0x71, 0x72,0x74,0x76,0x78,0x80,0x7b,0x7d,0x7f
|
||||||
};
|
};
|
||||||
|
|
||||||
inline void taitoh_state::draw_single_sprite(bitmap_ind16 &bitmap, const rectangle &cliprect, u32 tile_offs, int x, int y, int zx, int zy)
|
inline void taitoh_state::draw_single_sprite(bitmap_ind16 &bitmap, const rectangle &cliprect, u32 tile_offs, int sx, int sy, int ysize, int dx, int dy, int zx, int zy)
|
||||||
|
{
|
||||||
|
int y = sy;
|
||||||
|
for (int j = 0; j < ysize; j++)
|
||||||
|
{
|
||||||
|
int x = sx;
|
||||||
|
for (int k = 0; k < 4; k++)
|
||||||
|
{
|
||||||
|
if (tile_offs >= 0x1000) /* or dleague pitcher gets blanked */
|
||||||
{
|
{
|
||||||
const u32 tile = m_tc0080vco->cram_0_r(tile_offs) & 0x7fff;
|
const u32 tile = m_tc0080vco->cram_0_r(tile_offs) & 0x7fff;
|
||||||
const u32 color = m_tc0080vco->cram_1_r(tile_offs) & 0x001f;
|
const u32 color = m_tc0080vco->cram_1_r(tile_offs) & 0x001f;
|
||||||
@ -84,7 +92,13 @@ inline void taitoh_state::draw_single_sprite(bitmap_ind16 &bitmap, const rectang
|
|||||||
color,
|
color,
|
||||||
flipx, flipy,
|
flipx, flipy,
|
||||||
x, y,
|
x, y,
|
||||||
zx, zx, 0);
|
zx, zy, 0);
|
||||||
|
}
|
||||||
|
tile_offs++;
|
||||||
|
x += dx;
|
||||||
|
}
|
||||||
|
y += dy;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/***************************************************************************
|
/***************************************************************************
|
||||||
@ -139,21 +153,7 @@ void taitoh_state::syvalion_draw_sprites(bitmap_ind16 &bitmap, const rectangle &
|
|||||||
y0 += 2;
|
y0 += 2;
|
||||||
}
|
}
|
||||||
|
|
||||||
int y = y0;
|
draw_single_sprite(bitmap, cliprect, tile_offs, x0, y0, ysize, dx, dx, zx, zx);
|
||||||
for (int j = 0; j < ysize; j++)
|
|
||||||
{
|
|
||||||
int x = x0;
|
|
||||||
for (int k = 0; k < 4; k++)
|
|
||||||
{
|
|
||||||
if (tile_offs >= 0x1000)
|
|
||||||
{
|
|
||||||
draw_single_sprite(bitmap, cliprect, tile_offs, x, y, zx, zx);
|
|
||||||
}
|
|
||||||
tile_offs++;
|
|
||||||
x += dx;
|
|
||||||
}
|
|
||||||
y += dx;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -225,21 +225,7 @@ void taitoh_state::recordbr_draw_sprites(bitmap_ind16 &bitmap, const rectangle &
|
|||||||
y0 += 2;
|
y0 += 2;
|
||||||
}
|
}
|
||||||
|
|
||||||
int y = y0;
|
draw_single_sprite(bitmap, cliprect, tile_offs, x0, y0, ysize, dx, dy, zx, zy);
|
||||||
for (int j = 0; j < ysize; j++)
|
|
||||||
{
|
|
||||||
int x = x0;
|
|
||||||
for (int k = 0; k < 4; k++)
|
|
||||||
{
|
|
||||||
if (tile_offs >= 0x1000)
|
|
||||||
{
|
|
||||||
draw_single_sprite(bitmap, cliprect, tile_offs, x, y, zx, zy);
|
|
||||||
}
|
|
||||||
tile_offs++;
|
|
||||||
x += dx;
|
|
||||||
}
|
|
||||||
y += dy;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -299,21 +285,7 @@ void taitoh_state::dleague_draw_sprites(bitmap_ind16 &bitmap, const rectangle &c
|
|||||||
|
|
||||||
if (priority == pribit)
|
if (priority == pribit)
|
||||||
{
|
{
|
||||||
int y = y0;
|
draw_single_sprite(bitmap, cliprect, tile_offs, x0, y0, ysize, dx, dx, zx, zx);
|
||||||
for (int j = 0; j < ysize; j++)
|
|
||||||
{
|
|
||||||
int x = x0;
|
|
||||||
for (int k = 0; k < 4; k++)
|
|
||||||
{
|
|
||||||
if (tile_offs >= 0x1000) /* or pitcher gets blanked */
|
|
||||||
{
|
|
||||||
draw_single_sprite(bitmap, cliprect, tile_offs, x, y, zx, zx);
|
|
||||||
}
|
|
||||||
tile_offs++;
|
|
||||||
x += dx;
|
|
||||||
}
|
|
||||||
y += dx;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user