Previous 199869 Revisions Next

r31458 Monday 28th July, 2014 at 15:29:17 UTC by hap
fix garbage at top of screen?
[src/mame/video]homerun.c

trunk/src/mame/video/homerun.c
r31457r31458
1313CUSTOM_INPUT_MEMBER(homerun_state::homerun_sprite0_r)
1414{
1515   // sprite-0 vs background collision status, similar to NES
16   return (m_screen->vpos() > (m_spriteram[0] - 15)) ? 1 : 0;
16   return (m_screen->vpos() > (m_spriteram[0] - 16 + 1)) ? 1 : 0;
1717}
1818
1919WRITE8_MEMBER(homerun_state::homerun_scrollhi_w)
r31457r31458
115115
116116   for (offs = m_spriteram.bytes() - 4; offs >= 0; offs -= 4)
117117   {
118      if (spriteram[offs + 0] == 0)
119         continue;
120
121      int sy = spriteram[offs + 0] - 16 + 1;
118122      int sx = spriteram[offs + 3];
119      int sy = spriteram[offs + 0] - 15;
120123      int code = (spriteram[offs + 1]) | ((spriteram[offs + 2] & 0x8) << 5) | ((m_gfx_ctrl & 3) << 9);
121124      int color = (spriteram[offs + 2] & 0x07) | 8;
122125      int flipx = (spriteram[offs + 2] & 0x40) >> 6;
123126      int flipy = (spriteram[offs + 2] & 0x80) >> 7;
124127
125      m_gfxdecode->gfx(1)->transpen(bitmap,cliprect,
126            code,
127            color,
128            flipx,flipy,
129            sx,sy,0);
128      if (sy >= 0)
129      {
130         m_gfxdecode->gfx(1)->transpen(bitmap, cliprect, code, color, flipx, flipy, sx, sy, 0);
130131
131      // wraparound
132      m_gfxdecode->gfx(1)->transpen(bitmap,cliprect,
133            code,
134            color,
135            flipx,flipy,
136            sx-256,sy,0);
132         // wraparound x
133         m_gfxdecode->gfx(1)->transpen(bitmap, cliprect, code, color, flipx, flipy, sx - 256 , sy, 0);
134      }
137135   }
138136}
139137

Previous 199869 Revisions Next


© 1997-2024 The MAME Team