trunk/src/mame/drivers/raiden2.c
| r32136 | r32137 | |
| 1238 | 1238 | sprite_prot_src_addr[1] = data; |
| 1239 | 1239 | UINT32 src = (sprite_prot_src_addr[0]<<4)+sprite_prot_src_addr[1]; |
| 1240 | 1240 | |
| 1241 | | int x = ((space.read_dword(src+0x08) >> 16) - (sprite_prot_x)) & 0xffff; |
| 1242 | | int y = ((space.read_dword(src+0x04) >> 16) - (sprite_prot_y)) & 0xffff; |
| 1241 | int x = INT16((space.read_dword(src+0x08) >> 16) - (sprite_prot_x)); |
| 1242 | int y = INT16((space.read_dword(src+0x04) >> 16) - (sprite_prot_y)); |
| 1243 | 1243 | |
| 1244 | 1244 | UINT16 head1 = space.read_word(src+cop_spr_off); |
| 1245 | 1245 | UINT16 head2 = space.read_word(src+cop_spr_off+2); |
| 1246 | 1246 | |
| 1247 | | int w = (((head1 >> 8 ) & 7) + 1) << 3; |
| 1248 | | int h = (((head1 >> 12) & 7) + 1) << 3; |
| 1247 | int w = (((head1 >> 8 ) & 7) + 1) << 4; |
| 1248 | int h = (((head1 >> 12) & 7) + 1) << 4; |
| 1249 | 1249 | |
| 1250 | | UINT16 flag = x-w > -w && x-w < cop_spr_maxx+w && y-h > -h && y-h < 240+h ? 1 : 0; |
| 1251 | | |
| 1250 | UINT16 flag = x-w/2 > -w && x-w/2 < cop_spr_maxx+w && y-h/2 > -h && y-h/2 < 256+h ? 1 : 0; |
| 1251 | |
| 1252 | 1252 | flag = (space.read_word(src) & 0xfffe) | flag; |
| 1253 | 1253 | space.write_word(src, flag); |
| 1254 | 1254 | |
| r32136 | r32137 | |
| 1256 | 1256 | { |
| 1257 | 1257 | space.write_word(dst1, head1); |
| 1258 | 1258 | space.write_word(dst1+2, head2); |
| 1259 | | space.write_word(dst1+4, x-w); |
| 1260 | | space.write_word(dst1+6, y-h); |
| 1259 | space.write_word(dst1+4, x-w/2); |
| 1260 | space.write_word(dst1+6, y-h/2); |
| 1261 | 1261 | |
| 1262 | 1262 | dst1 += 8; |
| 1263 | 1263 | } |