deco_mlc - checkpoint

This commit is contained in:
David Haywood 2013-03-16 08:39:28 +00:00
parent 86b48108c2
commit a2db6d1509
3 changed files with 100 additions and 100 deletions

View File

@ -395,6 +395,7 @@ static MACHINE_CONFIG_START( avengrgs, deco_mlc_state )
MCFG_GFXDECODE(deco_mlc)
MCFG_PALETTE_LENGTH(2048)
// MCFG_VIDEO_ATTRIBUTES(VIDEO_UPDATE_SCANLINE)
MCFG_VIDEO_START_OVERRIDE(deco_mlc_state,mlc)
@ -427,6 +428,7 @@ static MACHINE_CONFIG_START( mlc, deco_mlc_state )
MCFG_GFXDECODE(deco_mlc)
MCFG_PALETTE_LENGTH(2048)
// MCFG_VIDEO_ATTRIBUTES(VIDEO_UPDATE_SCANLINE)
MCFG_VIDEO_START_OVERRIDE(deco_mlc_state,mlc)

View File

@ -40,6 +40,6 @@ public:
void screen_eof_mlc(screen_device &screen, bool state);
TIMER_DEVICE_CALLBACK_MEMBER(interrupt_gen);
void blitRaster(bitmap_rgb32 &bitmap, int rasterMode);
void draw_sprites( bitmap_rgb32 &bitmap,const rectangle &cliprect);
void draw_sprites( bitmap_rgb32 &bitmap,const rectangle &cliprect, int scanline);
void descramble_sound( );
};

View File

@ -158,7 +158,7 @@ static void mlc_drawgfxzoomline(
}
void deco_mlc_state::draw_sprites( bitmap_rgb32 &bitmap,const rectangle &cliprect)
void deco_mlc_state::draw_sprites( bitmap_rgb32 &bitmap,const rectangle &cliprect, int scanline)
{
UINT32 *index_ptr=0;
int offs,fx=0,fy=0,x,y,color,colorOffset,sprite,indx,h,w,bx,by,fx1,fy1;
@ -368,8 +368,17 @@ void deco_mlc_state::draw_sprites( bitmap_rgb32 &bitmap,const rectangle &cliprec
if (!ratio)
continue;
for (int bby=0; bby<full_sprite_screen_height>>16; bby++)
{
int bby = scanline - (full_realybase>>16);
if (bby < 0)
continue;
if (bby >= full_sprite_screen_height>>16)
continue;
int srcline = ((bby<<16) / ratio);
by = srcline >> 4;
@ -465,9 +474,6 @@ void deco_mlc_state::draw_sprites( bitmap_rgb32 &bitmap,const rectangle &cliprec
}
}
mlc_drawgfxzoomline(
dest,user_clip,machine().gfx[0],
tile,tile2,
@ -477,18 +483,6 @@ void deco_mlc_state::draw_sprites( bitmap_rgb32 &bitmap,const rectangle &cliprec
}
}
// if (lastRasterMode!=0 && rasterDirty)
// {
// blitRaster(machine, bitmap, rasterMode);
// temp_bitmap->fill(0, cliprect);
// rasterDirty=0;
// }
// lastRasterMode=rasterMode;
if (use8bppMode)
offs-=8;
}
@ -512,6 +506,10 @@ UINT32 deco_mlc_state::screen_update_mlc(screen_device &screen, bitmap_rgb32 &bi
{
// temp_bitmap->fill(0, cliprect);
bitmap.fill(machine().pens[0], cliprect); /* Pen 0 fill colour confirmed from Skull Fang level 2 */
draw_sprites(bitmap,cliprect);
for (int i=0;i<256;i++)
{
draw_sprites(bitmap,cliprect, i);
}
return 0;
}