summaryrefslogtreecommitdiffstatshomepage
path: root/src/mame/video/chaknpop.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/mame/video/chaknpop.c')
-rw-r--r--src/mame/video/chaknpop.c23
1 files changed, 10 insertions, 13 deletions
diff --git a/src/mame/video/chaknpop.c b/src/mame/video/chaknpop.c
index 01b0dec70dd..d36e678ed84 100644
--- a/src/mame/video/chaknpop.c
+++ b/src/mame/video/chaknpop.c
@@ -25,9 +25,8 @@
PALETTE_INIT_MEMBER(chaknpop_state, chaknpop)
{
const UINT8 *color_prom = memregion("proms")->base();
- int i;
-
- for (i = 0; i < 1024; i++)
+
+ for (int i = 0; i < 1024; i++)
{
int col, r, g, b;
int bit0, bit1, bit2;
@@ -66,12 +65,12 @@ void chaknpop_state::tx_tilemap_mark_all_dirty()
m_tx_tilemap->set_flip(m_flip_x | m_flip_y);
}
-READ8_MEMBER(chaknpop_state::chaknpop_gfxmode_r)
+READ8_MEMBER(chaknpop_state::gfxmode_r)
{
return m_gfxmode;
}
-WRITE8_MEMBER(chaknpop_state::chaknpop_gfxmode_w)
+WRITE8_MEMBER(chaknpop_state::gfxmode_w)
{
if (m_gfxmode != data)
{
@@ -97,13 +96,13 @@ WRITE8_MEMBER(chaknpop_state::chaknpop_gfxmode_w)
}
}
-WRITE8_MEMBER(chaknpop_state::chaknpop_txram_w)
+WRITE8_MEMBER(chaknpop_state::txram_w)
{
m_tx_ram[offset] = data;
m_tx_tilemap->mark_tile_dirty(offset);
}
-WRITE8_MEMBER(chaknpop_state::chaknpop_attrram_w)
+WRITE8_MEMBER(chaknpop_state::attrram_w)
{
if (m_attr_ram[offset] != data)
{
@@ -123,7 +122,7 @@ WRITE8_MEMBER(chaknpop_state::chaknpop_attrram_w)
* I'm not sure how to handle attributes about color
*/
-TILE_GET_INFO_MEMBER(chaknpop_state::chaknpop_get_tx_tile_info)
+TILE_GET_INFO_MEMBER(chaknpop_state::get_tx_tile_info)
{
int tile = m_tx_ram[tile_index];
int tile_h_bank = (m_gfxmode & GFX_TX_BANK2) << 2; /* 0x00-0xff -> 0x200-0x2ff */
@@ -150,7 +149,7 @@ void chaknpop_state::video_start()
UINT8 *RAM = memregion("maincpu")->base();
/* info offset type w h col row */
- m_tx_tilemap = &machine().tilemap().create(m_gfxdecode, tilemap_get_info_delegate(FUNC(chaknpop_state::chaknpop_get_tx_tile_info),this), TILEMAP_SCAN_ROWS, 8, 8, 32, 32);
+ m_tx_tilemap = &machine().tilemap().create(m_gfxdecode, tilemap_get_info_delegate(FUNC(chaknpop_state::get_tx_tile_info),this), TILEMAP_SCAN_ROWS, 8, 8, 32, 32);
m_vram1 = &RAM[0x10000];
m_vram2 = &RAM[0x12000];
@@ -175,10 +174,8 @@ void chaknpop_state::video_start()
void chaknpop_state::draw_sprites( bitmap_ind16 &bitmap, const rectangle &cliprect )
{
- int offs;
-
/* Draw the sprites */
- for (offs = 0; offs < m_spr_ram.bytes(); offs += 4)
+ for (int offs = 0; offs < m_spr_ram.bytes(); offs += 4)
{
int sx = m_spr_ram[offs + 3];
int sy = 256 - 15 - m_spr_ram[offs];
@@ -246,7 +243,7 @@ void chaknpop_state::draw_bitmap( bitmap_ind16 &bitmap, const rectangle &cliprec
}
}
-UINT32 chaknpop_state::screen_update_chaknpop(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect)
+UINT32 chaknpop_state::screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect)
{
m_tx_tilemap->draw(screen, bitmap, cliprect, 0, 0);
draw_sprites(bitmap, cliprect);