diff options
author | cam900 <dbtlrchl@naver.com> | 2019-12-07 11:45:33 +0900 |
---|---|---|
committer | R. Belmont <rb6502@users.noreply.github.com> | 2019-12-06 21:45:33 -0500 |
commit | 4d9d74ef933e7ead1034cf41a13784ba8bed92bb (patch) | |
tree | 6612ecedfeb07a6a5f4e046367e101c15ac009cc /src/mame/video | |
parent | cec18b863511cc4e475c395c87e6551ae168c82f (diff) |
namco_c355spr.cpp : Fix priority when pri 0 sprite isn't drawed first (#6011)
* namco_c355spr.cpp : Convert vblank handler into register_vblank_callback
* namco_c355spr.cpp : Revert vblank related commits
Diffstat (limited to 'src/mame/video')
-rw-r--r-- | src/mame/video/namco_c355spr.cpp | 10 | ||||
-rw-r--r-- | src/mame/video/namco_c355spr.h | 4 |
2 files changed, 10 insertions, 4 deletions
diff --git a/src/mame/video/namco_c355spr.cpp b/src/mame/video/namco_c355spr.cpp index 7a484d86973..42944cebafd 100644 --- a/src/mame/video/namco_c355spr.cpp +++ b/src/mame/video/namco_c355spr.cpp @@ -25,6 +25,7 @@ namco_c355spr_device::namco_c355spr_device(const machine_config &mconfig, const device_video_interface(mconfig, *this), m_palxor(0), m_buffer(0), + m_external_prifill(false), m_gfx_region(*this, DEVICE_SELF), m_colbase(0) { @@ -452,9 +453,12 @@ void namco_c355spr_device::draw_sprites(screen_device &screen, BitmapClass &bitm // int offs = spriteram16[0x18000/2]; /* end-of-sprite-list */ if (pri == 0) { - screen.priority().fill(0, cliprect); - if (m_buffer == 0) // not buffered sprites - get_sprites(); + if (!m_external_prifill) + { + screen.priority().fill(0, cliprect); + if (m_buffer == 0) // not buffered sprites + get_sprites(); + } } for (int no = 0; no < 2; no++) diff --git a/src/mame/video/namco_c355spr.h b/src/mame/video/namco_c355spr.h index 1de6e07f4af..0a5bb554780 100644 --- a/src/mame/video/namco_c355spr.h +++ b/src/mame/video/namco_c355spr.h @@ -19,6 +19,7 @@ public: //void set_ram_words(u32 size) { m_ramsize = size; } void set_palxor(int palxor) { m_palxor = palxor; } void set_buffer(int buffer) { m_buffer = buffer; } + void set_external_prifill(bool external) { m_external_prifill = external; } u16 spriteram_r(offs_t offset); void spriteram_w(offs_t offset, u16 data, u16 mem_mask = ~0); @@ -37,6 +38,7 @@ public: void draw(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect, int pri); void draw(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect, int pri); + void get_sprites(); protected: @@ -71,7 +73,6 @@ private: // C355 Motion Object internals void get_single_sprite(const u16 *pSource, c355_sprite *sprite_ptr); void get_list(int no, const u16 *pSpriteList16, const u16 *pSpriteTable); - void get_sprites(); template<class BitmapClass> void draw_sprites(screen_device &screen, BitmapClass &bitmap, const rectangle &cliprect, int pri); std::unique_ptr<c355_sprite []> m_spritelist[2]; @@ -84,6 +85,7 @@ private: int m_scrolloffs[2]; //u32 m_ramsize; int m_buffer; + bool m_external_prifill; required_memory_region m_gfx_region; u16 m_colbase; |