tatsumi.cpp: added preliminary row/colscroll_enable for tilemaps, fixes background scrolling and foreground text in Cycle Warriors [Angelo Salese]
This commit is contained in:
parent
6014e8fc13
commit
decf1fd1fa
@ -224,5 +224,5 @@ private:
|
|||||||
uint16_t m_bigfight_last_bank;
|
uint16_t m_bigfight_last_bank;
|
||||||
|
|
||||||
void tile_expand();
|
void tile_expand();
|
||||||
void draw_bg(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect, tilemap_t *src, const uint16_t* scrollx, const uint16_t* scrolly, int xscroll_offset, int yscroll_offset);
|
void draw_bg(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect, tilemap_t *src, const uint16_t* scrollx, const uint16_t* scrolly, int xscroll_offset, int yscroll_offset, bool rowscroll_enable);
|
||||||
};
|
};
|
||||||
|
@ -899,7 +899,8 @@ void tatsumi_state::update_cluts(int fake_palette_offset, int object_base, int l
|
|||||||
|
|
||||||
/**********************************************************************/
|
/**********************************************************************/
|
||||||
|
|
||||||
void cyclwarr_state::draw_bg(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect, tilemap_t *src, const uint16_t* scrollx, const uint16_t* scrolly, int xscroll_offset, int yscroll_offset)
|
// TODO: rowscroll_enable might be selectable somehow
|
||||||
|
void cyclwarr_state::draw_bg(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect, tilemap_t *src, const uint16_t* scrollx, const uint16_t* scrolly, int xscroll_offset, int yscroll_offset, bool rowscroll_enable)
|
||||||
{
|
{
|
||||||
rectangle clip;
|
rectangle clip;
|
||||||
clip.min_x = cliprect.min_x;
|
clip.min_x = cliprect.min_x;
|
||||||
@ -907,8 +908,8 @@ void cyclwarr_state::draw_bg(screen_device &screen, bitmap_rgb32 &bitmap, const
|
|||||||
for (int y=cliprect.min_y; y<=cliprect.max_y; y++)
|
for (int y=cliprect.min_y; y<=cliprect.max_y; y++)
|
||||||
{
|
{
|
||||||
clip.min_y = clip.max_y = y;
|
clip.min_y = clip.max_y = y;
|
||||||
int src_x = scrollx[y] + xscroll_offset;
|
int src_x = scrollx[rowscroll_enable ? y : 0] + xscroll_offset;
|
||||||
int src_y = scrolly[y] + yscroll_offset;
|
int src_y = scrolly[rowscroll_enable ? y : 0] + yscroll_offset;
|
||||||
src->set_scrollx(0,src_x);
|
src->set_scrollx(0,src_x);
|
||||||
src->set_scrolly(0,src_y);
|
src->set_scrolly(0,src_y);
|
||||||
src->draw(screen, bitmap, clip, 0, 0);
|
src->draw(screen, bitmap, clip, 0, 0);
|
||||||
@ -1029,12 +1030,12 @@ uint32_t cyclwarr_state::screen_update_cyclwarr(screen_device &screen, bitmap_rg
|
|||||||
|
|
||||||
bitmap.fill(m_palette->pen(0), cliprect);
|
bitmap.fill(m_palette->pen(0), cliprect);
|
||||||
|
|
||||||
draw_bg(screen, bitmap, cliprect, m_layer[3], &m_cyclwarr_videoram[1][0x000], &m_cyclwarr_videoram[1][0x100], 8, -0x80);
|
draw_bg(screen, bitmap, cliprect, m_layer[3], &m_cyclwarr_videoram[1][0x000], &m_cyclwarr_videoram[1][0x100], 8, -0x80,false);
|
||||||
draw_bg(screen, bitmap, cliprect, m_layer[2], &m_cyclwarr_videoram[1][0x200], &m_cyclwarr_videoram[1][0x300], 8, -0x80);
|
draw_bg(screen, bitmap, cliprect, m_layer[2], &m_cyclwarr_videoram[1][0x200], &m_cyclwarr_videoram[1][0x300], 8, -0x80,false);
|
||||||
draw_bg(screen, bitmap, cliprect, m_layer[1], &m_cyclwarr_videoram[0][0x000], &m_cyclwarr_videoram[0][0x100], 8, -0x40);
|
draw_bg(screen, bitmap, cliprect, m_layer[1], &m_cyclwarr_videoram[0][0x000], &m_cyclwarr_videoram[0][0x100], 8, -0x40,true);
|
||||||
update_cluts(8192, 4096, 8192);
|
update_cluts(8192, 4096, 8192);
|
||||||
draw_sprites(bitmap,cliprect,0,(m_sprite_control_ram[0xe0]&0x1000) ? 0x1000 : 0);
|
draw_sprites(bitmap,cliprect,0,(m_sprite_control_ram[0xe0]&0x1000) ? 0x1000 : 0);
|
||||||
draw_bg(screen, bitmap, cliprect, m_layer[0], &m_cyclwarr_videoram[0][0x200], &m_cyclwarr_videoram[0][0x300], 0x10, -0x80);
|
draw_bg(screen, bitmap, cliprect, m_layer[0], &m_cyclwarr_videoram[0][0x200], &m_cyclwarr_videoram[0][0x300], 0x10, -0x80,false);
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
@ -1052,12 +1053,12 @@ uint32_t cyclwarr_state::screen_update_bigfight(screen_device &screen, bitmap_rg
|
|||||||
}
|
}
|
||||||
|
|
||||||
bitmap.fill(m_palette->pen(0), cliprect);
|
bitmap.fill(m_palette->pen(0), cliprect);
|
||||||
draw_bg(screen, bitmap, cliprect, m_layer[3], &m_cyclwarr_videoram[1][0x000], &m_cyclwarr_videoram[1][0x100], 8, -0x40);
|
draw_bg(screen, bitmap, cliprect, m_layer[3], &m_cyclwarr_videoram[1][0x000], &m_cyclwarr_videoram[1][0x100], 8, -0x40,true);
|
||||||
draw_bg(screen, bitmap, cliprect, m_layer[2], &m_cyclwarr_videoram[1][0x200], &m_cyclwarr_videoram[1][0x300], 8, -0x40);
|
draw_bg(screen, bitmap, cliprect, m_layer[2], &m_cyclwarr_videoram[1][0x200], &m_cyclwarr_videoram[1][0x300], 8, -0x40,true);
|
||||||
draw_bg(screen, bitmap, cliprect, m_layer[1], &m_cyclwarr_videoram[0][0x000], &m_cyclwarr_videoram[0][0x100], 8, -0x40);
|
draw_bg(screen, bitmap, cliprect, m_layer[1], &m_cyclwarr_videoram[0][0x000], &m_cyclwarr_videoram[0][0x100], 8, -0x40,true);
|
||||||
update_cluts(8192, 4096, 8192);
|
update_cluts(8192, 4096, 8192);
|
||||||
draw_sprites(bitmap,cliprect,0,(m_sprite_control_ram[0xe0]&0x1000) ? 0x1000 : 0);
|
draw_sprites(bitmap,cliprect,0,(m_sprite_control_ram[0xe0]&0x1000) ? 0x1000 : 0);
|
||||||
draw_bg(screen, bitmap, cliprect, m_layer[0], &m_cyclwarr_videoram[0][0x200], &m_cyclwarr_videoram[0][0x300], 0x10, -0x40);
|
draw_bg(screen, bitmap, cliprect, m_layer[0], &m_cyclwarr_videoram[0][0x200], &m_cyclwarr_videoram[0][0x300], 0x10, -0x40,true);
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user