diff options
Diffstat (limited to 'src/mame/drivers/missile.cpp')
-rw-r--r-- | src/mame/drivers/missile.cpp | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/mame/drivers/missile.cpp b/src/mame/drivers/missile.cpp index 0cb8247b342..ceb7416cab1 100644 --- a/src/mame/drivers/missile.cpp +++ b/src/mame/drivers/missile.cpp @@ -685,8 +685,8 @@ uint32_t missile_state::screen_update_missile(screen_device &screen, bitmap_ind1 uint8_t *videoram = m_videoram; int x, y; - /* draw the bitmap to the screen, looping over Y */ - for (y = cliprect.min_y; y <= cliprect.max_y; y++) + // draw the bitmap to the screen, looping over Y + for (y = cliprect.top(); y <= cliprect.bottom(); y++) { uint16_t *dst = &bitmap.pix16(y); @@ -694,18 +694,18 @@ uint32_t missile_state::screen_update_missile(screen_device &screen, bitmap_ind1 uint8_t *src = &videoram[effy * 64]; uint8_t *src3 = nullptr; - /* compute the base of the 3rd pixel row */ + // compute the base of the 3rd pixel row if (effy >= 224) src3 = &videoram[get_bit3_addr(effy << 8)]; - /* loop over X */ - for (x = cliprect.min_x; x <= cliprect.max_x; x++) + // loop over X + for (x = cliprect.left(); x <= cliprect.right(); x++) { uint8_t pix = src[x / 4] >> (x & 3); pix = ((pix >> 2) & 4) | ((pix << 1) & 2); - /* if we're in the lower region, get the 3rd bit */ - if (src3 != nullptr) + // if we're in the lower region, get the 3rd bit + if (src3) pix |= (src3[(x / 8) * 2] >> (x & 7)) & 1; dst[x] = pix; |