trunk/src/mame/video/homerun.c
| r31457 | r31458 | |
| 13 | 13 | CUSTOM_INPUT_MEMBER(homerun_state::homerun_sprite0_r) |
| 14 | 14 | { |
| 15 | 15 | // 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; |
| 17 | 17 | } |
| 18 | 18 | |
| 19 | 19 | WRITE8_MEMBER(homerun_state::homerun_scrollhi_w) |
| r31457 | r31458 | |
| 115 | 115 | |
| 116 | 116 | for (offs = m_spriteram.bytes() - 4; offs >= 0; offs -= 4) |
| 117 | 117 | { |
| 118 | if (spriteram[offs + 0] == 0) |
| 119 | continue; |
| 120 | |
| 121 | int sy = spriteram[offs + 0] - 16 + 1; |
| 118 | 122 | int sx = spriteram[offs + 3]; |
| 119 | | int sy = spriteram[offs + 0] - 15; |
| 120 | 123 | int code = (spriteram[offs + 1]) | ((spriteram[offs + 2] & 0x8) << 5) | ((m_gfx_ctrl & 3) << 9); |
| 121 | 124 | int color = (spriteram[offs + 2] & 0x07) | 8; |
| 122 | 125 | int flipx = (spriteram[offs + 2] & 0x40) >> 6; |
| 123 | 126 | int flipy = (spriteram[offs + 2] & 0x80) >> 7; |
| 124 | 127 | |
| 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); |
| 130 | 131 | |
| 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 | } |
| 137 | 135 | } |
| 138 | 136 | } |
| 139 | 137 | |