1 // license:BSD-3-Clause
2 // copyright-holders:Luca Elia, David Haywood
3 #ifndef MAME_VIDEO_FUUKIFH_H
4 #define MAME_VIDEO_FUUKIFH_H
5 
6 #pragma once
7 
8 class fuukivid_device : public device_t, public device_gfx_interface, public device_video_interface
9 {
10 public:
11 	typedef device_delegate<void (u32 &code)> tile_delegate;
12 	typedef device_delegate<void (u32 &colour, u32 &pri_mask)> colpri_cb_delegate;
13 
14 	fuukivid_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock);
15 
16 	// configuration
set_color_base(u16 base)17 	void set_color_base(u16 base) { m_colbase = base; }
set_color_num(u16 num)18 	void set_color_num(u16 num) { m_colnum = num; }
set_tile_callback(T &&...args)19 	template <typename... T> void set_tile_callback(T &&... args) { m_tile_cb.set(std::forward<T>(args)...); }
set_colpri_callback(T &&...args)20 	template <typename... T> void set_colpri_callback(T &&... args) { m_colpri_cb.set(std::forward<T>(args)...); }
21 
22 	void draw_sprites(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect, bool flip_screen, u16 *spriteram, u32 size);
23 
24 protected:
25 	virtual void device_start() override;
26 	virtual void device_reset() override;
27 
28 private:
29 	tile_delegate m_tile_cb;
30 	colpri_cb_delegate m_colpri_cb;
31 	required_memory_region m_gfx_region;
32 	u16 m_colbase;
33 	u16 m_colnum;
34 };
35 
36 DECLARE_DEVICE_TYPE(FUUKI_VIDEO, fuukivid_device)
37 
38 #endif // MAME_VIDEO_FUUKIFH_H
39