summaryrefslogtreecommitdiffstatshomepage
path: root/src/mame/video/excellent_spr.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/mame/video/excellent_spr.h')
-rw-r--r--src/mame/video/excellent_spr.h20
1 files changed, 14 insertions, 6 deletions
diff --git a/src/mame/video/excellent_spr.h b/src/mame/video/excellent_spr.h
index 36c3d002a29..bd9ecabfba0 100644
--- a/src/mame/video/excellent_spr.h
+++ b/src/mame/video/excellent_spr.h
@@ -5,24 +5,32 @@
#pragma once
+typedef device_delegate<void (u32 &colour, u32 &pri_mask)> excellent_spr_colpri_cb_delegate;
-class excellent_spr_device : public device_t, public device_video_interface
+class excellent_spr_device : public device_t, public device_gfx_interface, public device_video_interface
{
public:
excellent_spr_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
- DECLARE_READ8_MEMBER(read);
- DECLARE_WRITE8_MEMBER(write);
+ void set_color_base(u16 base) { m_colbase = base; }
+ template <typename... T> void set_colpri_callback(T &&... args) { m_colpri_cb = excellent_spr_colpri_cb_delegate(std::forward<T>(args)...); }
- void aquarium_draw_sprites(bitmap_ind16 &bitmap, const rectangle &cliprect, gfxdecode_device *gfxdecode, int y_offs);
- void gcpinbal_draw_sprites(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect, gfxdecode_device *gfxdecode, int y_offs, int priority);
+ u8 read(offs_t offset);
+ void write(offs_t offset, u8 data);
+
+ void aquarium_draw_sprites(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect, int y_offs);
+ void gcpinbal_draw_sprites(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect, int y_offs);
protected:
- std::unique_ptr<uint8_t[]> m_ram;
+ std::unique_ptr<u8[]> m_ram;
virtual void device_start() override;
virtual void device_reset() override;
+
private:
+ excellent_spr_colpri_cb_delegate m_colpri_cb;
+ required_memory_region m_gfx_region;
+ u16 m_colbase;
};
DECLARE_DEVICE_TYPE(EXCELLENT_SPRITE, excellent_spr_device)