1 // license:BSD-3-Clause
2 // copyright-holders:Quench
3 /* toaplan SCU */
4 #ifndef MAME_VIDEO_TOAPLAN_SCU_H
5 #define MAME_VIDEO_TOAPLAN_SCU_H
6 
7 #pragma once
8 
9 
10 class toaplan_scu_device : public device_t, public device_gfx_interface
11 {
12 public:
13 	toaplan_scu_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock);
14 
15 	// configuration
set_xoffsets(int xoffs,int xoffs_flipped)16 	void set_xoffsets(int xoffs, int xoffs_flipped)
17 	{
18 		m_xoffs = xoffs;
19 		m_xoffs_flipped = xoffs_flipped;
20 	}
21 
22 	void draw_sprites_to_tempbitmap(const rectangle &cliprect, u16* spriteram, u32 bytes);
23 	void copy_sprites_from_tempbitmap(bitmap_rgb32 &bitmap, const rectangle &cliprect, int priority);
24 	void alloc_sprite_bitmap(screen_device &screen);
25 
26 protected:
27 	virtual void device_start() override;
28 	virtual void device_reset() override;
29 
30 private:
31 	static const gfx_layout spritelayout;
32 	DECLARE_GFXDECODE_MEMBER(gfxinfo);
33 
34 	bitmap_ind16 m_temp_spritebitmap;
35 	int m_xoffs;
36 	int m_xoffs_flipped;
37 };
38 
39 DECLARE_DEVICE_TYPE(TOAPLAN_SCU, toaplan_scu_device)
40 
41 
42 #endif // MAME_VIDEO_TOAPLAN_SCU_H
43