I still don't know where it is, but I know where it's not (nw)

This commit is contained in:
smf- 2018-01-27 17:52:50 +00:00
parent df32deeb6a
commit 663e08afd9

View File

@ -451,10 +451,12 @@ uint32_t popeye_state::screen_update_tnx1(screen_device &screen, bitmap_ind16 &b
sy ^= 0x1ff;
sy -= 0x200 - (2 * m_background_pos[1]);
if (sy < 0)
sy = 0; // TODO: find out exactly where the data is fetched from
for (int x = cliprect.min_x; x <= cliprect.max_x; x++)
{
if (sy < 0)
bitmap.pix16(y, x) = m_bitmapram[0x3f] & 0xf; // TODO: find out exactly where the data is fetched from
else
{
// TODO: confirm the memory layout
int sx = x + (2 * (m_background_pos[0] | ((m_background_pos[2] & 1) << 8))) + 0x70;
@ -463,6 +465,7 @@ uint32_t popeye_state::screen_update_tnx1(screen_device &screen, bitmap_ind16 &b
bitmap.pix16(y, x) = (m_bitmapram[((sx / 8) & 0x3f) + ((sy / 8) * 0x40)] >> shift) & 0xf;
}
}
}
draw_sprites(bitmap, cliprect);
m_fg_tilemap->draw(screen, bitmap, cliprect, 0, 0);
@ -483,10 +486,12 @@ uint32_t popeye_state::screen_update_tpp1(screen_device &screen, bitmap_ind16 &b
sy ^= 0x1ff;
sy -= 0x200 - (2 * m_background_pos[1]);
if (sy < 0)
sy = 0; // TODO: find out exactly where the data is fetched from
for (int x = cliprect.min_x; x <= cliprect.max_x; x++)
{
if (sy < 0)
bitmap.pix16(y, x) = m_bitmapram[0x3f] & 0xf; // TODO: find out exactly where the data is fetched from
else
{
// TODO: confirm the memory layout
int sx = x + (2 * m_background_pos[0]) + 0x70;
@ -495,6 +500,7 @@ uint32_t popeye_state::screen_update_tpp1(screen_device &screen, bitmap_ind16 &b
bitmap.pix16(y, x) = (m_bitmapram[((sx / 8) & 0x3f) + ((sy / 8) * 0x40)] >> shift) & 0xf;
}
}
}
draw_sprites(bitmap, cliprect);
m_fg_tilemap->draw(screen, bitmap, cliprect, 0, 0);