trunk/src/mame/video/deco_mlc.c
| r21883 | r21884 | |
| 158 | 158 | } |
| 159 | 159 | |
| 160 | 160 | |
| 161 | | void deco_mlc_state::draw_sprites( bitmap_rgb32 &bitmap,const rectangle &cliprect, int scanline) |
| 161 | void deco_mlc_state::draw_sprites( const rectangle &cliprect, int scanline, UINT32* dest) |
| 162 | 162 | { |
| 163 | 163 | UINT32 *index_ptr=0; |
| 164 | 164 | int offs,fx=0,fy=0,x,y,color,colorOffset,sprite,indx,h,w,bx,by,fx1,fy1; |
| r21883 | r21884 | |
| 244 | 244 | however there are space for 8 clipping windows, where is the high bit? (Or is it ~0x400?) */ |
| 245 | 245 | clipper=((clipper&2)>>1)|((clipper&1)<<1); // Swap low two bits |
| 246 | 246 | |
| 247 | | user_clip.min_y=m_mlc_clip_ram[(clipper*4)+0]; |
| 248 | | user_clip.max_y=m_mlc_clip_ram[(clipper*4)+1]; |
| 247 | int min_y = m_mlc_clip_ram[(clipper*4)+0]; |
| 248 | int max_y = m_mlc_clip_ram[(clipper*4)+1]; |
| 249 | |
| 250 | if (scanline<min_y) |
| 251 | continue; |
| 252 | |
| 253 | if (scanline>max_y) |
| 254 | continue; |
| 255 | |
| 256 | |
| 249 | 257 | user_clip.min_x=m_mlc_clip_ram[(clipper*4)+2]; |
| 250 | 258 | user_clip.max_x=m_mlc_clip_ram[(clipper*4)+3]; |
| 251 | 259 | |
| r21883 | r21884 | |
| 383 | 391 | |
| 384 | 392 | by = srcline >> 4; |
| 385 | 393 | |
| 386 | | int y = (full_realybase>>16)+bby; |
| 387 | 394 | |
| 388 | | rectangle myclip; |
| 389 | | myclip = user_clip; |
| 390 | | myclip &= bitmap.cliprect(); |
| 391 | | |
| 392 | | if( y < myclip.min_y ) |
| 393 | | continue; |
| 394 | | |
| 395 | | if( y > myclip.max_y+1 ) |
| 396 | | continue; |
| 397 | | |
| 398 | | UINT32 *dest = &bitmap.pix32(y); |
| 399 | | |
| 400 | 395 | srcline &=0xf; |
| 401 | 396 | if( fy ) |
| 402 | 397 | { |
| r21883 | r21884 | |
| 507 | 502 | // temp_bitmap->fill(0, cliprect); |
| 508 | 503 | bitmap.fill(machine().pens[0], cliprect); /* Pen 0 fill colour confirmed from Skull Fang level 2 */ |
| 509 | 504 | |
| 510 | | for (int i=0;i<256;i++) |
| 505 | |
| 506 | |
| 507 | |
| 508 | |
| 509 | for (int i=cliprect.min_y;i<=cliprect.max_y;i++) |
| 511 | 510 | { |
| 512 | | draw_sprites(bitmap,cliprect, i); |
| 511 | UINT32 *dest = &bitmap.pix32(i); |
| 512 | |
| 513 | draw_sprites(cliprect, i, dest); |
| 513 | 514 | } |
| 514 | 515 | return 0; |
| 515 | 516 | } |
trunk/src/mame/includes/deco_mlc.h
| r21883 | r21884 | |
| 40 | 40 | void screen_eof_mlc(screen_device &screen, bool state); |
| 41 | 41 | TIMER_DEVICE_CALLBACK_MEMBER(interrupt_gen); |
| 42 | 42 | void blitRaster(bitmap_rgb32 &bitmap, int rasterMode); |
| 43 | | void draw_sprites( bitmap_rgb32 &bitmap,const rectangle &cliprect, int scanline); |
| 43 | void draw_sprites( const rectangle &cliprect, int scanline, UINT32* dest); |
| 44 | 44 | void descramble_sound( ); |
| 45 | 45 | }; |
trunk/src/mame/drivers/deco_mlc.c
| r21883 | r21884 | |
| 395 | 395 | |
| 396 | 396 | MCFG_GFXDECODE(deco_mlc) |
| 397 | 397 | MCFG_PALETTE_LENGTH(2048) |
| 398 | | // MCFG_VIDEO_ATTRIBUTES(VIDEO_UPDATE_SCANLINE) |
| 398 | MCFG_VIDEO_ATTRIBUTES(VIDEO_UPDATE_SCANLINE) |
| 399 | 399 | |
| 400 | 400 | MCFG_VIDEO_START_OVERRIDE(deco_mlc_state,mlc) |
| 401 | 401 | |
| r21883 | r21884 | |
| 428 | 428 | |
| 429 | 429 | MCFG_GFXDECODE(deco_mlc) |
| 430 | 430 | MCFG_PALETTE_LENGTH(2048) |
| 431 | | // MCFG_VIDEO_ATTRIBUTES(VIDEO_UPDATE_SCANLINE) |
| 431 | MCFG_VIDEO_ATTRIBUTES(VIDEO_UPDATE_SCANLINE) |
| 432 | 432 | |
| 433 | 433 | MCFG_VIDEO_START_OVERRIDE(deco_mlc_state,mlc) |
| 434 | 434 | |