mirror of
https://github.com/holub/mame
synced 2025-10-06 17:08:28 +03:00
Merge pull request #2990 from agiri-san/nd1
ygv608: Add mosaic effect for Galaga Arrangement Ending/Staffroll
This commit is contained in:
commit
985d0044fe
@ -1030,6 +1030,26 @@ inline void ygv608_device::draw_layer_roz(screen_device &screen, bitmap_ind16 &b
|
|||||||
source_tilemap->draw(screen, bitmap, cliprect, 0, 0 );
|
source_tilemap->draw(screen, bitmap, cliprect, 0, 0 );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void ygv608_device::ygv608_draw_mosaic(bitmap_ind16 &bitmap, const rectangle &cliprect, int n)
|
||||||
|
{
|
||||||
|
int x, y, mask;
|
||||||
|
|
||||||
|
if (n <= 0)
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
// mask to drop the lowest n-bits
|
||||||
|
mask = ~((1 << n) - 1);
|
||||||
|
|
||||||
|
for (y = cliprect.min_y; y <= cliprect.max_y; y++)
|
||||||
|
{
|
||||||
|
for (x = cliprect.min_x; x <= cliprect.max_x; x++)
|
||||||
|
{
|
||||||
|
bitmap.pix16(y, x) = bitmap.pix16(y & mask, x & mask);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
uint32_t ygv608_device::update_screen(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect)
|
uint32_t ygv608_device::update_screen(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect)
|
||||||
{
|
{
|
||||||
@ -1175,6 +1195,8 @@ uint32_t ygv608_device::update_screen(screen_device &screen, bitmap_ind16 &bitma
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
draw_layer_roz(screen, m_work_bitmap, finalclip, m_tilemap_B);
|
draw_layer_roz(screen, m_work_bitmap, finalclip, m_tilemap_B);
|
||||||
|
if(m_mosaic_bplane > 0)
|
||||||
|
ygv608_draw_mosaic(m_work_bitmap, finalclip, m_mosaic_bplane);
|
||||||
|
|
||||||
if(m_planeB_trans_enable == true)
|
if(m_planeB_trans_enable == true)
|
||||||
copybitmap_trans( bitmap, m_work_bitmap, 0, 0, 0, 0, finalclip, 0);
|
copybitmap_trans( bitmap, m_work_bitmap, 0, 0, 0, 0, finalclip, 0);
|
||||||
@ -1192,6 +1214,8 @@ uint32_t ygv608_device::update_screen(screen_device &screen, bitmap_ind16 &bitma
|
|||||||
draw_sprites(bitmap, finalclip);
|
draw_sprites(bitmap, finalclip);
|
||||||
|
|
||||||
draw_layer_roz(screen, m_work_bitmap, finalclip, m_tilemap_A);
|
draw_layer_roz(screen, m_work_bitmap, finalclip, m_tilemap_A);
|
||||||
|
if(m_mosaic_aplane > 0)
|
||||||
|
ygv608_draw_mosaic(m_work_bitmap, finalclip, m_mosaic_aplane);
|
||||||
|
|
||||||
if(m_planeA_trans_enable == true)
|
if(m_planeA_trans_enable == true)
|
||||||
copybitmap_trans( bitmap, m_work_bitmap, 0, 0, 0, 0, finalclip, 0);
|
copybitmap_trans( bitmap, m_work_bitmap, 0, 0, 0, 0, finalclip, 0);
|
||||||
@ -1941,8 +1965,8 @@ WRITE8_MEMBER( ygv608_device::screen_ctrl_10_w )
|
|||||||
// check mosaic
|
// check mosaic
|
||||||
m_mosaic_bplane = (data & 0xc) >> 2;
|
m_mosaic_bplane = (data & 0xc) >> 2;
|
||||||
m_mosaic_aplane = data & 3;
|
m_mosaic_aplane = data & 3;
|
||||||
if(m_mosaic_aplane || m_mosaic_bplane)
|
// if(m_mosaic_aplane || m_mosaic_bplane)
|
||||||
popmessage("Mosaic effect %02x %02x",m_mosaic_aplane,m_mosaic_bplane);
|
// popmessage("Mosaic effect %02x %02x",m_mosaic_aplane,m_mosaic_bplane);
|
||||||
}
|
}
|
||||||
|
|
||||||
// R#11R - screen control 11
|
// R#11R - screen control 11
|
||||||
|
@ -127,6 +127,7 @@ private:
|
|||||||
void register_state_save();
|
void register_state_save();
|
||||||
void draw_sprites(bitmap_ind16 &bitmap, const rectangle &cliprect);
|
void draw_sprites(bitmap_ind16 &bitmap, const rectangle &cliprect);
|
||||||
void draw_layer_roz(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect, tilemap_t *source_tilemap);
|
void draw_layer_roz(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect, tilemap_t *source_tilemap);
|
||||||
|
void ygv608_draw_mosaic(bitmap_ind16 &bitmap, const rectangle &cliprect, int n);
|
||||||
|
|
||||||
uint8_t m_namcond1_gfxbank;
|
uint8_t m_namcond1_gfxbank;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user