summaryrefslogtreecommitdiffstatshomepage
path: root/src/mame/video/zaxxon.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/mame/video/zaxxon.cpp')
-rw-r--r--src/mame/video/zaxxon.cpp17
1 files changed, 7 insertions, 10 deletions
diff --git a/src/mame/video/zaxxon.cpp b/src/mame/video/zaxxon.cpp
index b85421f90e8..b9985fd4d41 100644
--- a/src/mame/video/zaxxon.cpp
+++ b/src/mame/video/zaxxon.cpp
@@ -304,7 +304,6 @@ void zaxxon_state::draw_background(bitmap_ind16 &bitmap, const rectangle &clipre
int ymask = pixmap.height() - 1;
int flipmask = m_flip_screen ? 0xff : 0x00;
int flipoffs = m_flip_screen ? 0x38 : 0x40;
- int x, y;
/* the starting X value is offset by 1 pixel (normal) or 7 pixels */
/* (flipped) due to a delay in the loading */
@@ -314,25 +313,23 @@ void zaxxon_state::draw_background(bitmap_ind16 &bitmap, const rectangle &clipre
flipoffs += 7;
/* loop over visible rows */
- for (y = cliprect.min_y; y <= cliprect.max_y; y++)
+ for (int y = cliprect.min_y; y <= cliprect.max_y; y++)
{
- uint16_t *dst = &bitmap.pix16(y);
- int srcx, srcy, vf;
- uint16_t *src;
+ uint16_t *const dst = &bitmap.pix(y);
/* VF = flipped V signals */
- vf = y ^ flipmask;
+ int vf = y ^ flipmask;
/* base of the source row comes from VF plus the scroll value */
/* this is done by the 3 4-bit adders at U56, U74, U75 */
- srcy = vf + ((m_bg_position << 1) ^ 0xfff) + 1;
- src = &pixmap.pix16(srcy & ymask);
+ int srcy = vf + ((m_bg_position << 1) ^ 0xfff) + 1;
+ uint16_t const *src = &pixmap.pix(srcy & ymask);
/* loop over visible columns */
- for (x = cliprect.min_x; x <= cliprect.max_x; x++)
+ for (int x = cliprect.min_x; x <= cliprect.max_x; x++)
{
/* start with HF = flipped H signals */
- srcx = x ^ flipmask;
+ int srcx = x ^ flipmask;
if (skew)
{
/* position within source row is a two-stage addition */