mirror of
https://github.com/holub/mame
synced 2025-07-02 08:39:21 +03:00
funtech/supracan.cpp: higher layer number wins on priority collisions
* Cleanup tilemap enabled check
This commit is contained in:
parent
7b567246b5
commit
37c8f20eb1
@ -998,33 +998,29 @@ uint32_t supracan_state::screen_update(screen_device &screen, bitmap_ind16 &bitm
|
||||
|
||||
for (int pri = 7; pri >= 0; pri--)
|
||||
{
|
||||
for (int layer = 3; layer >=0; layer--)
|
||||
// Wanted like this by speedyd, formduel and magipool at very least
|
||||
for (int layer = 0; layer < 4; layer ++)
|
||||
{
|
||||
// popmessage("%04x\n",m_video_flags);
|
||||
int enabled = 0;
|
||||
|
||||
if (m_video_flags & 0x04)
|
||||
if (layer==3) enabled = 1;
|
||||
|
||||
if (m_video_flags & 0x80)
|
||||
if (layer==0) enabled = 1;
|
||||
|
||||
if (m_video_flags & 0x40)
|
||||
if (layer==1) enabled = 1;
|
||||
|
||||
if (m_video_flags & 0x20)
|
||||
if (layer==2) enabled = 1;
|
||||
|
||||
|
||||
// ROZ
|
||||
if (layer == 3)
|
||||
priority = ((m_roz_mode >> 13) & 7); // roz case
|
||||
{
|
||||
enabled = BIT(m_video_flags, 2);
|
||||
if (!enabled)
|
||||
continue;
|
||||
priority = ((m_roz_mode >> 13) & 7);
|
||||
}
|
||||
else
|
||||
priority = ((m_tilemap_flags[layer] >> 13) & 7); // normal cases
|
||||
|
||||
{
|
||||
enabled = BIT(m_video_flags, 7 - layer);
|
||||
if (!enabled)
|
||||
continue;
|
||||
priority = ((m_tilemap_flags[layer] >> 13) & 7);
|
||||
}
|
||||
|
||||
if (priority == pri)
|
||||
{
|
||||
// tilemap_num = layer;
|
||||
int which_tilemap_size = get_tilemap_dimensions(xsize, ysize, layer);
|
||||
bitmap_ind16 &src_bitmap = m_tilemap_sizes[layer][which_tilemap_size]->pixmap();
|
||||
int gfx_region = get_tilemap_region(layer);
|
||||
@ -1039,8 +1035,6 @@ uint32_t supracan_state::screen_update(screen_device &screen, bitmap_ind16 &bitm
|
||||
case 4: transmask = 0x01; break;
|
||||
}
|
||||
|
||||
if (enabled)
|
||||
{
|
||||
if (layer != 3) // standard layers, NOT roz
|
||||
{
|
||||
int wrap = (m_tilemap_flags[layer] & 0x20);
|
||||
@ -1151,14 +1145,14 @@ uint32_t supracan_state::screen_update(screen_device &screen, bitmap_ind16 &bitm
|
||||
draw_roz_layer(bitmap, cliprect, m_tilemap_sizes[layer][which_tilemap_size], scrollx<<8, scrolly<<8, incxx<<8, incxy<<8, incyx<<8, incyy<<8, wrap, transmask);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// combine sprites
|
||||
if (m_video_flags & 0x08)
|
||||
if (BIT(m_video_flags, 3))
|
||||
{
|
||||
for (int y = cliprect.min_y; y <= cliprect.max_y; y++)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user