diff options
Diffstat (limited to 'src/mame/video/sidearms.cpp')
-rw-r--r-- | src/mame/video/sidearms.cpp | 23 |
1 files changed, 11 insertions, 12 deletions
diff --git a/src/mame/video/sidearms.cpp b/src/mame/video/sidearms.cpp index 20fef5fa3b4..01d4dddeea1 100644 --- a/src/mame/video/sidearms.cpp +++ b/src/mame/video/sidearms.cpp @@ -207,17 +207,16 @@ void sidearms_state::draw_sprites_region(bitmap_ind16 &bitmap, const rectangle & void sidearms_state::draw_starfield( bitmap_ind16 &bitmap ) { - int x, y, i; uint32_t hadd_283, vadd_283, _hflop_74a_n, _hcount_191, _vcount_191; uint8_t *sf_rom; uint16_t *lineptr; int pixadv, lineadv; // clear starfield background - lineptr = &bitmap.pix16(16, 64); + lineptr = &bitmap.pix(16, 64); lineadv = bitmap.rowpixels(); - for (i=224; i; i--) { memset(lineptr, 0, 768); lineptr += lineadv; } + for (int i=224; i; i--) { memset(lineptr, 0, 768); lineptr += lineadv; } // bail if not Side Arms or the starfield has been disabled if (m_gameid || !m_staron) return; @@ -240,16 +239,16 @@ void sidearms_state::draw_starfield( bitmap_ind16 &bitmap ) } else { - lineptr = &bitmap.pix16(255, 512 - 1); + lineptr = &bitmap.pix(255, 512 - 1); pixadv = -1; lineadv = -lineadv + 512; } - for (y=0; y<256; y++) // 8-bit V-clock input + for (int y=0; y<256; y++) // 8-bit V-clock input { - for (x=0; x<512; lineptr+=pixadv,x++) // 9-bit H-clock input + for (int x=0; x<512; lineptr+=pixadv,x++) // 9-bit H-clock input { - i = hadd_283; // store horizontal adder's previous state in i + int i = hadd_283; // store horizontal adder's previous state in i hadd_283 = _hcount_191 + (x & 0xff); // add lower 8 bits and preserve carry if (x<64 || x>447 || y<16 || y>239) continue; // clip rejection @@ -277,31 +276,31 @@ void sidearms_state::draw_starfield( bitmap_ind16 &bitmap ) #else // optimized loop if (!m_flipon) { - lineptr = &bitmap.pix16(16, 64); + lineptr = &bitmap.pix(16, 64); pixadv = 1; lineadv = lineadv - 384; } else { - lineptr = &bitmap.pix16(239, 512 - 64 - 1); + lineptr = &bitmap.pix(239, 512 - 64 - 1); pixadv = -1; lineadv = -lineadv + 384; } - for (y=16; y<240; y++) // 8-bit V-clock input (clipped against vertical visible area) + for (int y=16; y<240; y++) // 8-bit V-clock input (clipped against vertical visible area) { // inner loop pre-entry conditioning hadd_283 = (_hcount_191 + 64) & ~0x1f; vadd_283 = _vcount_191 + y; - i = vadd_283<<4 & 0xff0; // to starfield EPROM A04-A11 (8 bits) + int i = vadd_283<<4 & 0xff0; // to starfield EPROM A04-A11 (8 bits) i |= (_hflop_74a_n^(hadd_283>>8)) << 3; // to starfield EPROM A03 (1 bit) i |= hadd_283>>5 & 7; // to starfield EPROM A00-A02 (3 bits) m_latch_374 = sf_rom[i + 0x3000]; // lines A12-A13 are always high hadd_283 = _hcount_191 + 63; - for (x=64; x<448; lineptr+=pixadv,x++) // 9-bit H-clock input (clipped against horizontal visible area) + for (int x=64; x<448; lineptr+=pixadv,x++) // 9-bit H-clock input (clipped against horizontal visible area) { i = hadd_283; // store horizontal adder's previous state in i hadd_283 = _hcount_191 + (x & 0xff); // add lower 8 bits and preserve carry |