summaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
author ajrhacker <ajrhacker@users.noreply.github.com>2018-11-26 16:25:38 -0500
committer GitHub <noreply@github.com>2018-11-26 16:25:38 -0500
commit358cdc3cffe4bd9ba7ed5011ff59175b616ef45e (patch)
tree311c3b0105d5fc78b343f7c97efdbc1d8e0f3def
parenta9dda4ca0dd66424c2dc9ab82344b587474e0804 (diff)
parentab19fc61b42d154ed066d5175a79b49b81d26fd6 (diff)
Merge pull request #4343 from kunikunijp/toypop-patch
toypop.cpp: Simplified coordinate calculation of fg
-rw-r--r--src/mame/drivers/toypop.cpp43
1 files changed, 11 insertions, 32 deletions
diff --git a/src/mame/drivers/toypop.cpp b/src/mame/drivers/toypop.cpp
index 30b26b46094..a09a5ba2c9f 100644
--- a/src/mame/drivers/toypop.cpp
+++ b/src/mame/drivers/toypop.cpp
@@ -219,47 +219,26 @@ void namcos16_state::legacy_fg_draw(bitmap_ind16 &bitmap,const rectangle &clipre
int x;// = (count % 32);
int y; //= count / 32;
- if (!flip)
+ if (count < 64)
{
- if (count < 64)
- {
- x = 34 + xoffs;
- y = yoffs - 2;
- }
- else if (count >= 32*30)
- {
- x = xoffs - 30;
- y = yoffs - 2;
- }
- else
- {
- x = 2 + yoffs;
- y = xoffs - 2;
- }
+ x = 34 + xoffs;
+ y = yoffs - 2;
+ }
+ else if (count >= 32*30)
+ {
+ x = xoffs - 30;
+ y = yoffs - 2;
}
else
{
- if (count < 64)
- {
- x = 1 - xoffs;
- y = 29 - yoffs;
- }
- else if (count >= 32*30)
- {
- x = 65 - xoffs;
- y = 29 - yoffs;
- }
- else
- {
- x = 33 - yoffs;
- y = 29 - xoffs;
- }
+ x = 2 + yoffs;
+ y = xoffs - 2;
}
uint16_t tile = m_fgvram[count];
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);
}
}