diff options
Diffstat (limited to 'src/mame/atari/atarig1_v.cpp')
-rw-r--r-- | src/mame/atari/atarig1_v.cpp | 34 |
1 files changed, 16 insertions, 18 deletions
diff --git a/src/mame/atari/atarig1_v.cpp b/src/mame/atari/atarig1_v.cpp index 8534bf4a867..1e817652e07 100644 --- a/src/mame/atari/atarig1_v.cpp +++ b/src/mame/atari/atarig1_v.cpp @@ -20,20 +20,20 @@ TILE_GET_INFO_MEMBER(atarig1_state::get_alpha_tile_info) { - uint16_t data = m_alpha_tilemap->basemem_read(tile_index); - int code = data & 0xfff; - int color = (data >> 12) & 0x0f; - int opaque = data & 0x8000; + uint16_t const data = m_alpha_tilemap->basemem_read(tile_index); + int const code = data & 0xfff; + int const color = (data >> 12) & 0x0f; + bool const opaque = BIT(data, 15); tileinfo.set(1, code, color, opaque ? TILE_FORCE_LAYER0 : 0); } TILE_GET_INFO_MEMBER(atarig1_state::get_playfield_tile_info) { - uint16_t data = m_playfield_tilemap->basemem_read(tile_index); - int code = (m_playfield_tile_bank << 12) | (data & 0xfff); - int color = (data >> 12) & 7; - tileinfo.set(0, code, color, (data >> 15) & 1); + uint16_t const data = m_playfield_tilemap->basemem_read(tile_index); + int const code = (m_playfield_tile_bank << 12) | (data & 0xfff); + int const color = (data >> 12) & 7; + tileinfo.set(0, code, color, BIT(data, 15)); } @@ -69,7 +69,7 @@ void atarig1_state::video_start() TIMER_DEVICE_CALLBACK_MEMBER(atarig1_state::scanline_update) { - int scanline = param; + int const scanline = param; //if (scanline == 0) logerror("-------\n"); @@ -82,13 +82,11 @@ TIMER_DEVICE_CALLBACK_MEMBER(atarig1_state::scanline_update) /* update the playfield scrolls */ for (int i = 0; i < 8; i++) { - uint16_t word; - /* first word controls horizontal scroll */ - word = m_alpha_tilemap->basemem_read(offset++); - if (word & 0x8000) + uint16_t word = m_alpha_tilemap->basemem_read(offset++); + if (BIT(word, 15)) { - int newscroll = ((word >> 6) + m_pfscroll_xoffset) & 0x1ff; + int const newscroll = ((word >> 6) + m_pfscroll_xoffset) & 0x1ff; if (newscroll != m_playfield_xscroll) { m_screen->update_partial(std::max(scanline + i - 1, 0)); @@ -99,10 +97,10 @@ TIMER_DEVICE_CALLBACK_MEMBER(atarig1_state::scanline_update) /* second word controls vertical scroll and tile bank */ word = m_alpha_tilemap->basemem_read(offset++); - if (word & 0x8000) + if (BIT(word, 15)) { - int newscroll = ((word >> 6) - (scanline + i)) & 0x1ff; - int newbank = word & 7; + int const newscroll = ((word >> 6) - (scanline + i)) & 0x1ff; + int const newbank = word & 7; if (newscroll != m_playfield_yscroll) { m_screen->update_partial(std::max(scanline + i - 1, 0)); @@ -127,7 +125,7 @@ TIMER_DEVICE_CALLBACK_MEMBER(atarig1_state::scanline_update) * *************************************/ -uint32_t atarig1_state::screen_update_atarig1(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) +uint32_t atarig1_state::screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) { /* draw the playfield */ m_playfield_tilemap->draw(screen, bitmap, cliprect, 0, 0); |