diff options
Diffstat (limited to 'src/mame/video/williams.cpp')
-rw-r--r-- | src/mame/video/williams.cpp | 31 |
1 files changed, 15 insertions, 16 deletions
diff --git a/src/mame/video/williams.cpp b/src/mame/video/williams.cpp index ec10b269a3e..0ca0c180aad 100644 --- a/src/mame/video/williams.cpp +++ b/src/mame/video/williams.cpp @@ -209,22 +209,21 @@ void williams2_state::video_start() uint32_t williams_state::screen_update(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect) { rgb_t pens[16]; - int x, y; /* precompute the palette */ - for (x = 0; x < 16; x++) + for (int x = 0; x < 16; x++) pens[x] = m_palette->pen_color(m_paletteram[x]); /* loop over rows */ - for (y = cliprect.min_y; y <= cliprect.max_y; y++) + for (int y = cliprect.min_y; y <= cliprect.max_y; y++) { - uint8_t *source = &m_videoram[y]; - uint32_t *dest = &bitmap.pix32(y); + uint8_t const *const source = &m_videoram[y]; + uint32_t *const dest = &bitmap.pix(y); /* loop over columns */ - for (x = cliprect.min_x & ~1; x <= cliprect.max_x; x += 2) + for (int x = cliprect.min_x & ~1; x <= cliprect.max_x; x += 2) { - int pix = source[(x/2) * 256]; + int const pix = source[(x/2) * 256]; dest[x+0] = pens[pix >> 4]; dest[x+1] = pens[pix & 0x0f]; } @@ -249,8 +248,8 @@ uint32_t blaster_state::screen_update(screen_device &screen, bitmap_rgb32 &bitma for (int y = cliprect.min_y; y <= cliprect.max_y; y++) { int erase_behind = m_video_control & m_scanline_control[y] & 2; - uint8_t *source = &m_videoram[y]; - uint32_t *dest = &bitmap.pix32(y); + uint8_t *const source = &m_videoram[y]; + uint32_t *const dest = &bitmap.pix(y); /* latch a new color0 pen? */ if (m_video_control & m_scanline_control[y] & 1) @@ -259,7 +258,7 @@ uint32_t blaster_state::screen_update(screen_device &screen, bitmap_rgb32 &bitma /* loop over columns */ for (int x = cliprect.min_x & ~1; x <= cliprect.max_x; x += 2) { - int pix = source[(x/2) * 256]; + int const pix = source[(x/2) * 256]; /* clear behind us if requested */ if (erase_behind) @@ -288,13 +287,13 @@ uint32_t williams2_state::screen_update(screen_device &screen, bitmap_rgb32 &bit /* loop over rows */ for (int y = cliprect.min_y; y <= cliprect.max_y; y++) { - uint8_t *source = &m_videoram[y]; - uint32_t *dest = &bitmap.pix32(y); + uint8_t const *const source = &m_videoram[y]; + uint32_t *const dest = &bitmap.pix(y); /* loop over columns */ for (int x = cliprect.min_x & ~1; x <= cliprect.max_x; x += 2) { - int pix = source[(x/2) * 256]; + int const pix = source[(x/2) * 256]; if (pix & 0xf0) dest[x+0] = pens[pix >> 4]; @@ -322,13 +321,13 @@ uint32_t mysticm_state::screen_update(screen_device &screen, bitmap_rgb32 &bitma for (int x = 1; x < 16; x++) pens[x] = m_palette->pen_color(color_decode(m_fg_color, 1, y) * 16 + x); - uint8_t *source = &m_videoram[y]; - uint32_t *dest = &bitmap.pix32(y); + uint8_t const *const source = &m_videoram[y]; + uint32_t *const dest = &bitmap.pix(y); /* loop over columns */ for (int x = cliprect.min_x & ~1; x <= cliprect.max_x; x += 2) { - int pix = source[(x/2) * 256]; + int const pix = source[(x/2) * 256]; if (pix & 0xf0) dest[x+0] = pens[pix >> 4]; |