summaryrefslogtreecommitdiffstatshomepage
path: root/src/mame/drivers/missile.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/mame/drivers/missile.cpp')
-rw-r--r--src/mame/drivers/missile.cpp17
1 files changed, 7 insertions, 10 deletions
diff --git a/src/mame/drivers/missile.cpp b/src/mame/drivers/missile.cpp
index ca2f756d1c4..b4c1d9c0823 100644
--- a/src/mame/drivers/missile.cpp
+++ b/src/mame/drivers/missile.cpp
@@ -683,24 +683,21 @@ uint8_t missile_state::read_vram(address_space &space, offs_t address)
uint32_t missile_state::screen_update_missile(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect)
{
- uint8_t *videoram = m_videoram;
- int x, y;
-
// draw the bitmap to the screen, looping over Y
- for (y = cliprect.top(); y <= cliprect.bottom(); y++)
+ for (int y = cliprect.top(); y <= cliprect.bottom(); y++)
{
- uint16_t *dst = &bitmap.pix16(y);
+ uint16_t *const dst = &bitmap.pix(y);
- int effy = m_flipscreen ? ((256+24 - y) & 0xff) : y;
- uint8_t *src = &videoram[effy * 64];
- uint8_t *src3 = nullptr;
+ int const effy = m_flipscreen ? ((256+24 - y) & 0xff) : y;
+ uint8_t const *const src = &m_videoram[effy * 64];
+ uint8_t const *src3 = nullptr;
// compute the base of the 3rd pixel row
if (effy >= 224)
- src3 = &videoram[get_bit3_addr(effy << 8)];
+ src3 = &m_videoram[get_bit3_addr(effy << 8)];
// loop over X
- for (x = cliprect.left(); x <= cliprect.right(); x++)
+ for (int x = cliprect.left(); x <= cliprect.right(); x++)
{
uint8_t pix = src[x / 4] >> (x & 3);
pix = ((pix >> 2) & 4) | ((pix << 1) & 2);