trunk/src/mame/video/deco_zoomspr.c
| r31066 | r31067 | |
| 278 | 278 | 0x01ff - Y block offset |
| 279 | 279 | */ |
| 280 | 280 | |
| 281 | | /* Sprite global disable bit */ |
| 282 | | if (dragngun_sprite_ctrl&0x40000000) |
| 283 | | return; |
| 281 | /* Sprite global disable bit - can't be, it's set in lockload calibration menu where the targets are sprites */ |
| 282 | // if (dragngun_sprite_ctrl&0x40000000) |
| 283 | // return; |
| 284 | 284 | |
| 285 | 285 | for (offs = 0;offs < 0x800;offs += 8) |
| 286 | 286 | { |
| r31066 | r31067 | |
| 293 | 293 | if (!scalex || !scaley) /* Zero pixel size in X or Y - skip block */ |
| 294 | 294 | continue; |
| 295 | 295 | |
| 296 | | if (spritedata[offs+0]&0x400) |
| 297 | | layout_ram = dragngun_sprite_layout_1_ram + ((spritedata[offs+0]&0x1ff)*4); //CHECK! |
| 296 | int layoutram_offset = (spritedata[offs + 0] & 0x1ff) * 4; |
| 297 | |
| 298 | if (spritedata[offs + 0] & 0x400) |
| 299 | layout_ram = dragngun_sprite_layout_1_ram; |
| 298 | 300 | else |
| 299 | | layout_ram = dragngun_sprite_layout_0_ram + ((spritedata[offs+0]&0x1ff)*4); //1ff in drag gun code?? |
| 300 | | h = (layout_ram[1]>>0)&0xf; |
| 301 | | w = (layout_ram[1]>>4)&0xf; |
| 301 | layout_ram = dragngun_sprite_layout_0_ram; |
| 302 | h = (layout_ram[layoutram_offset + 1]>>0)&0xf; |
| 303 | w = (layout_ram[layoutram_offset + 1]>>4)&0xf; |
| 302 | 304 | if (!h || !w) |
| 303 | 305 | continue; |
| 304 | 306 | |
| 305 | 307 | sx = spritedata[offs+2] & 0x3ff; |
| 306 | 308 | sy = spritedata[offs+3] & 0x3ff; |
| 307 | | bx = layout_ram[2] & 0x1ff; |
| 308 | | by = layout_ram[3] & 0x1ff; |
| 309 | bx = layout_ram[layoutram_offset + 2] & 0x1ff; |
| 310 | by = layout_ram[layoutram_offset + 3] & 0x1ff; |
| 309 | 311 | if (bx&0x100) bx=1-(bx&0xff); |
| 310 | 312 | if (by&0x100) by=1-(by&0xff); /* '1 - ' is strange, but correct for Dragongun 'Winners' screen. */ |
| 311 | 313 | if (sx >= 512) sx -= 1024; |
| r31066 | r31067 | |
| 333 | 335 | fx = spritedata[offs+4]&0x8000; |
| 334 | 336 | fy = spritedata[offs+5]&0x8000; |
| 335 | 337 | |
| 338 | int lookupram_offset = layout_ram[layoutram_offset + 0] & 0x1fff; |
| 339 | |
| 336 | 340 | // if (spritedata[offs+0]&0x400) |
| 337 | | if (layout_ram[0]&0x2000) |
| 338 | | lookup_ram = dragngun_sprite_lookup_1_ram + (layout_ram[0]&0x1fff); |
| 341 | if (layout_ram[layoutram_offset + 0] & 0x2000) |
| 342 | lookup_ram = dragngun_sprite_lookup_1_ram; |
| 339 | 343 | else |
| 340 | | lookup_ram = dragngun_sprite_lookup_0_ram + (layout_ram[0]&0x1fff); |
| 344 | lookup_ram = dragngun_sprite_lookup_0_ram; |
| 341 | 345 | |
| 342 | 346 | zoomx=scalex * 0x10000 / (w*16); |
| 343 | 347 | zoomy=scaley * 0x10000 / (h*16); |
| r31066 | r31067 | |
| 356 | 360 | for (x=0; x<w; x++) { |
| 357 | 361 | int bank,sprite; |
| 358 | 362 | |
| 359 | | sprite = ((*(lookup_ram++))&0x3fff); |
| 363 | sprite = lookup_ram[lookupram_offset]; |
| 364 | sprite &= 0x3fff; |
| 360 | 365 | |
| 366 | lookupram_offset++; |
| 367 | |
| 361 | 368 | /* High bits of the sprite reference into the sprite control bits for banking */ |
| 362 | 369 | switch (sprite&0x3000) { |
| 363 | 370 | default: |