diff options
author | Alex W. Jackson <alex.w.jackson@gmail.com> | 2014-03-10 09:58:31 +0000 |
---|---|---|
committer | Alex W. Jackson <alex.w.jackson@gmail.com> | 2014-03-10 09:58:31 +0000 |
commit | 95aafe03e51a9d111db7ebddca10b63291e14567 (patch) | |
tree | 67b35596135a2640e5149e7916d640a30190c68d /src/mame/video/cps1.c | |
parent | 69e33bcb5ed9a375db6e7f3bc5a266f6731cc8d0 (diff) |
You now specify a gfxdecode device once when you create a tilemap, rather than each time in the tile info callback. Updated all drivers accordingly [Alex Jackson]
Diffstat (limited to 'src/mame/video/cps1.c')
-rw-r--r-- | src/mame/video/cps1.c | 15 |
1 files changed, 6 insertions, 9 deletions
diff --git a/src/mame/video/cps1.c b/src/mame/video/cps1.c index cf6b6ba0f09..7519b6b4aec 100644 --- a/src/mame/video/cps1.c +++ b/src/mame/video/cps1.c @@ -2012,8 +2012,7 @@ TILE_GET_INFO_MEMBER(cps_state::get_tile0_info) should alternate between the left and right side of the 16x16 tiles */ gfxset = (tile_index & 0x20) >> 5; - SET_TILE_INFO_MEMBER(m_gfxdecode, - gfxset, + SET_TILE_INFO_MEMBER(gfxset, code, (attr & 0x1f) + 0x20, TILE_FLIPYX((attr & 0x60) >> 5)); @@ -2032,8 +2031,7 @@ TILE_GET_INFO_MEMBER(cps_state::get_tile1_info) code = gfxrom_bank_mapper(GFXTYPE_SCROLL2, code); - SET_TILE_INFO_MEMBER(m_gfxdecode, - 2, + SET_TILE_INFO_MEMBER(2, code, (attr & 0x1f) + 0x40, TILE_FLIPYX((attr & 0x60) >> 5)); @@ -2051,8 +2049,7 @@ TILE_GET_INFO_MEMBER(cps_state::get_tile2_info) code = gfxrom_bank_mapper(GFXTYPE_SCROLL3, code); - SET_TILE_INFO_MEMBER(m_gfxdecode, - 3, + SET_TILE_INFO_MEMBER(3, code, (attr & 0x1f) + 0x60, TILE_FLIPYX((attr & 0x60) >> 5)); @@ -2102,9 +2099,9 @@ VIDEO_START_MEMBER(cps_state,cps) m_stars_rom_size = 0x2000; /* first 0x4000 of gfx ROM are used, but 0x0000-0x1fff is == 0x2000-0x3fff */ /* create tilemaps */ - m_bg_tilemap[0] = &machine().tilemap().create(tilemap_get_info_delegate(FUNC(cps_state::get_tile0_info),this), tilemap_mapper_delegate(FUNC(cps_state::tilemap0_scan),this), 8, 8, 64, 64); - m_bg_tilemap[1] = &machine().tilemap().create(tilemap_get_info_delegate(FUNC(cps_state::get_tile1_info),this), tilemap_mapper_delegate(FUNC(cps_state::tilemap1_scan),this), 16, 16, 64, 64); - m_bg_tilemap[2] = &machine().tilemap().create(tilemap_get_info_delegate(FUNC(cps_state::get_tile2_info),this), tilemap_mapper_delegate(FUNC(cps_state::tilemap2_scan),this), 32, 32, 64, 64); + m_bg_tilemap[0] = &machine().tilemap().create(m_gfxdecode, tilemap_get_info_delegate(FUNC(cps_state::get_tile0_info),this), tilemap_mapper_delegate(FUNC(cps_state::tilemap0_scan),this), 8, 8, 64, 64); + m_bg_tilemap[1] = &machine().tilemap().create(m_gfxdecode, tilemap_get_info_delegate(FUNC(cps_state::get_tile1_info),this), tilemap_mapper_delegate(FUNC(cps_state::tilemap1_scan),this), 16, 16, 64, 64); + m_bg_tilemap[2] = &machine().tilemap().create(m_gfxdecode, tilemap_get_info_delegate(FUNC(cps_state::get_tile2_info),this), tilemap_mapper_delegate(FUNC(cps_state::tilemap2_scan),this), 32, 32, 64, 64); /* create empty tiles */ memset(m_empty_tile, 0x0f, sizeof(m_empty_tile)); |