mirror of
https://github.com/holub/mame
synced 2025-07-04 17:38:08 +03:00
toypop.cpp: Simplified coordinate calculation of fg
This commit is contained in:
parent
0e9fc60364
commit
b9ed20b60a
@ -219,47 +219,26 @@ void namcos16_state::legacy_fg_draw(bitmap_ind16 &bitmap,const rectangle &clipre
|
|||||||
int x;// = (count % 32);
|
int x;// = (count % 32);
|
||||||
int y; //= count / 32;
|
int y; //= count / 32;
|
||||||
|
|
||||||
if (!flip)
|
if (count < 64)
|
||||||
{
|
{
|
||||||
if (count < 64)
|
x = 34 + xoffs;
|
||||||
{
|
y = yoffs - 2;
|
||||||
x = 34 + xoffs;
|
}
|
||||||
y = yoffs - 2;
|
else if (count >= 32*30)
|
||||||
}
|
{
|
||||||
else if (count >= 32*30)
|
x = xoffs - 30;
|
||||||
{
|
y = yoffs - 2;
|
||||||
x = xoffs - 30;
|
|
||||||
y = yoffs - 2;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
x = 2 + yoffs;
|
|
||||||
y = xoffs - 2;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if (count < 64)
|
x = 2 + yoffs;
|
||||||
{
|
y = xoffs - 2;
|
||||||
x = 1 - xoffs;
|
|
||||||
y = 29 - yoffs;
|
|
||||||
}
|
|
||||||
else if (count >= 32*30)
|
|
||||||
{
|
|
||||||
x = 65 - xoffs;
|
|
||||||
y = 29 - yoffs;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
x = 33 - yoffs;
|
|
||||||
y = 29 - xoffs;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
uint16_t tile = m_fgvram[count];
|
uint16_t tile = m_fgvram[count];
|
||||||
uint8_t color = (m_fgattr[count] & 0x3f) + (m_pal_bank << 6);
|
uint8_t color = (m_fgattr[count] & 0x3f) + (m_pal_bank << 6);
|
||||||
|
|
||||||
gfx_0->transpen(bitmap, cliprect, tile, color, flip, flip, x*8, y*8, 0);
|
gfx_0->transpen(bitmap, cliprect, tile, color, flip, flip, (flip ? 35-x : x)*8, (flip ? 27-y : y)*8, 0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user