mirror of
https://github.com/holub/mame
synced 2025-07-04 17:38:08 +03:00
ygv608.cpp: Add scrolling-by-row (used in NCV1 Xevious Arrangement)
This commit is contained in:
parent
6e0c1465b1
commit
a1a767de1f
@ -1005,6 +1005,9 @@ uint32_t ygv608_device::update_screen(screen_device &screen, bitmap_ind16 &bitma
|
|||||||
#endif
|
#endif
|
||||||
#ifdef _ENABLE_SCROLLY
|
#ifdef _ENABLE_SCROLLY
|
||||||
int col;
|
int col;
|
||||||
|
#endif
|
||||||
|
#ifdef _ENABLE_SCROLLX
|
||||||
|
int row;
|
||||||
#endif
|
#endif
|
||||||
rectangle finalclip;
|
rectangle finalclip;
|
||||||
const rectangle &visarea = screen.visible_area();
|
const rectangle &visarea = screen.visible_area();
|
||||||
@ -1048,8 +1051,15 @@ uint32_t ygv608_device::update_screen(screen_device &screen, bitmap_ind16 &bitma
|
|||||||
m_tilemap_A->mark_all_dirty();
|
m_tilemap_A->mark_all_dirty();
|
||||||
|
|
||||||
m_tilemap_A->set_transparent_pen(0);
|
m_tilemap_A->set_transparent_pen(0);
|
||||||
// for NCV1 it's sufficient to scroll only columns
|
|
||||||
m_tilemap_A->set_scroll_cols(m_page_x);
|
if (m_h_div_size == 0) {
|
||||||
|
m_tilemap_A->set_scroll_cols(m_page_x);
|
||||||
|
m_tilemap_A->set_scroll_rows(1);
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
m_tilemap_A->set_scroll_cols(1);
|
||||||
|
m_tilemap_A->set_scroll_rows(m_page_y);
|
||||||
|
}
|
||||||
|
|
||||||
if (m_pattern_size == PTS_8X8 )
|
if (m_pattern_size == PTS_8X8 )
|
||||||
m_tilemap_B = m_tilemap_B_cache_8[index];
|
m_tilemap_B = m_tilemap_B_cache_8[index];
|
||||||
@ -1057,8 +1067,14 @@ uint32_t ygv608_device::update_screen(screen_device &screen, bitmap_ind16 &bitma
|
|||||||
m_tilemap_B = m_tilemap_B_cache_16[index];
|
m_tilemap_B = m_tilemap_B_cache_16[index];
|
||||||
m_tilemap_B->mark_all_dirty();
|
m_tilemap_B->mark_all_dirty();
|
||||||
|
|
||||||
// for NCV1 it's sufficient to scroll only columns
|
if (m_h_div_size == 0) {
|
||||||
m_tilemap_B->set_scroll_cols(m_page_x);
|
m_tilemap_B->set_scroll_cols(m_page_x);
|
||||||
|
m_tilemap_B->set_scroll_rows(1);
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
m_tilemap_B->set_scroll_cols(1);
|
||||||
|
m_tilemap_B->set_scroll_rows(m_page_y);
|
||||||
|
}
|
||||||
|
|
||||||
// now clear the screen in case we change to 1-plane mode
|
// now clear the screen in case we change to 1-plane mode
|
||||||
m_work_bitmap.fill(0, finalclip );
|
m_work_bitmap.fill(0, finalclip );
|
||||||
@ -1086,13 +1102,31 @@ uint32_t ygv608_device::update_screen(screen_device &screen, bitmap_ind16 &bitma
|
|||||||
|
|
||||||
#ifdef _ENABLE_SCROLLX
|
#ifdef _ENABLE_SCROLLX
|
||||||
|
|
||||||
m_tilemap_B->set_scrollx(0,
|
if (m_h_div_size == 0) {
|
||||||
( (int)m_scroll_data_table[1][0x80] +
|
|
||||||
|
m_tilemap_B->set_scrollx(0,
|
||||||
|
( (int)m_scroll_data_table[1][0x80] +
|
||||||
( (int)m_scroll_data_table[1][0x81] << 8 ) ) );
|
( (int)m_scroll_data_table[1][0x81] << 8 ) ) );
|
||||||
|
|
||||||
m_tilemap_A->set_scrollx(0,
|
m_tilemap_A->set_scrollx(0,
|
||||||
( (int)m_scroll_data_table[0][0x80] +
|
( (int)m_scroll_data_table[0][0x80] +
|
||||||
( (int)m_scroll_data_table[0][0x81] << 8 ) ) );
|
( (int)m_scroll_data_table[0][0x81] << 8 ) ) );
|
||||||
|
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
|
||||||
|
for( row=0; row<m_page_y; row++ )
|
||||||
|
{
|
||||||
|
m_tilemap_B->set_scrollx(row,
|
||||||
|
( (int)m_scroll_data_table[1][0x80 + ((row & (m_page_y/2 - 1)) << 1)] +
|
||||||
|
( (int)m_scroll_data_table[1][0x81 + ((row & (m_page_y/2 - 1)) << 1)] << 8 ) ) );
|
||||||
|
|
||||||
|
m_tilemap_A->set_scrollx(row,
|
||||||
|
( (int)m_scroll_data_table[0][0x80 + ((row & (m_page_y/2 - 1)) << 1)] +
|
||||||
|
( (int)m_scroll_data_table[0][0x81 + ((row & (m_page_y/2 - 1)) << 1)] << 8 ) ) );
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user