summaryrefslogtreecommitdiffstatshomepage
path: root/src/mame/video/slapfght.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/mame/video/slapfght.c')
-rw-r--r--src/mame/video/slapfght.c44
1 files changed, 22 insertions, 22 deletions
diff --git a/src/mame/video/slapfght.c b/src/mame/video/slapfght.c
index add16556bee..8349cdc451d 100644
--- a/src/mame/video/slapfght.c
+++ b/src/mame/video/slapfght.c
@@ -60,7 +60,7 @@ VIDEO_START_MEMBER(slapfght_state, slapfight)
{
m_pf1_tilemap = &machine().tilemap().create(m_gfxdecode, tilemap_get_info_delegate(FUNC(slapfght_state::get_pf1_tile_info), this), TILEMAP_SCAN_ROWS, 8, 8, 64, 32);
m_fix_tilemap = &machine().tilemap().create(m_gfxdecode, tilemap_get_info_delegate(FUNC(slapfght_state::get_fix_tile_info), this), TILEMAP_SCAN_ROWS, 8, 8, 64, 32);
-
+
m_fix_tilemap->set_scrolldy(0, 15);
m_pf1_tilemap->set_scrolldy(0, 14);
@@ -135,34 +135,34 @@ WRITE8_MEMBER(slapfght_state::palette_bank_w)
void slapfght_state::draw_perfrman_sprites(bitmap_ind16 &bitmap, const rectangle &cliprect, int layer)
{
UINT8 *src = m_spriteram->buffer();
-
+
for (int offs = 0; offs < m_spriteram->bytes(); offs += 4)
{
/*
- 0: xxxxxxxx - code
- 1: xxxxxxxx - x
- 2: x....... - priority over backdrop
- .x...... - sprite-sprite priority (see point-pop sprites)
- ..x..... - ?
- ...xx... - no function?
- .....xxx - color
- 3: xxxxxxxx - y
+ 0: xxxxxxxx - code
+ 1: xxxxxxxx - x
+ 2: x....... - priority over backdrop
+ .x...... - sprite-sprite priority (see point-pop sprites)
+ ..x..... - ?
+ ...xx... - no function?
+ .....xxx - color
+ 3: xxxxxxxx - y
*/
-
+
int code = src[offs + 0];
int sy = src[offs + 3] - 1;
int sx = src[offs + 1] - 13;
int pri = src[offs + 2] >> 6 & 3;
int color = (src[offs + 2] >> 1 & 3) | (src[offs + 2] << 2 & 4) | (m_palette_bank << 3);
int fx = 0, fy = 0;
-
+
if (flip_screen())
{
sy = 256 - sy;
sx = 240 - sx;
fx = fy = 1;
}
-
+
if (layer == pri)
m_gfxdecode->gfx(1)->transpen(bitmap, cliprect, code, color, fx, fy, sx, sy, 0);
}
@@ -189,15 +189,15 @@ void slapfght_state::draw_slapfight_sprites(bitmap_ind16 &bitmap, const rectangl
for (int offs = 0; offs < m_spriteram->bytes(); offs += 4)
{
/*
- 0: xxxxxxxx - code low
- 1: xxxxxxxx - x low
- 2: xx...... - code high
- ..x..... - no function?
- ...xxxx. - color
- .......x - x high
- 3: xxxxxxxx - y
+ 0: xxxxxxxx - code low
+ 1: xxxxxxxx - x low
+ 2: xx...... - code high
+ ..x..... - no function?
+ ...xxxx. - color
+ .......x - x high
+ 3: xxxxxxxx - y
*/
-
+
int code = src[offs + 0] | ((src[offs + 2] & 0xc0) << 2);
int sy = src[offs + 3];
int sx = (src[offs + 1] | (src[offs + 2] << 8 & 0x100)) - 13;
@@ -210,7 +210,7 @@ void slapfght_state::draw_slapfight_sprites(bitmap_ind16 &bitmap, const rectangl
sx = 284 - sx;
fx = fy = 1;
}
-
+
m_gfxdecode->gfx(2)->transpen(bitmap, cliprect, code, color, fx, fy, sx, sy, 0);
}
}