summaryrefslogtreecommitdiffstatshomepage
path: root/src/mame/video/tecmo_spr.h
blob: e20d8c918b871a50db0645a2a9e7e2a0a4bc7710 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
// license:BSD-3-Clause
// copyright-holders:David Haywood
/* Tecmo Sprites */
#ifndef MAME_VIDEO_TECMO_SPR_H
#define MAME_VIDEO_TECMO_SPR_H

#pragma once


class tecmo_spr_device : public device_t
{
public:
	tecmo_spr_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
	void set_gfx_region(int gfxregion);
	void set_bootleg(int bootleg);
	void set_yoffset(int yoffset);

	// gaiden.c / spbactn.c / tecmo16.c sprites
	void gaiden_draw_sprites(screen_device &screen, gfxdecode_device *gfxdecode, const rectangle &cliprect, uint16_t* spriteram, int sprite_sizey, int spr_offset_y, int flip_screen, bitmap_ind16 &sprite_bitmap);

	// tecmo.c sprites
	void draw_sprites_8bit(screen_device &screen, bitmap_ind16 &bitmap, gfxdecode_device *gfxdecode, const rectangle &cliprect, uint8_t* spriteram, int size, int video_type, int flip_screen);

	// wc90.c sprites
	void draw_wc90_sprites(bitmap_ind16 &bitmap, const rectangle &cliprect, gfxdecode_device *gfxdecode, uint8_t* spriteram, int size, int priority);

	// tbowl.c sprites
	void tbowl_draw_sprites(bitmap_ind16 &bitmap, const rectangle &cliprect, gfxdecode_device *gfxdecode, int xscroll, uint8_t* spriteram);

protected:
	virtual void device_start() override;
	virtual void device_reset() override;

	uint8_t m_gfxregion;
	int m_bootleg; // for Gals Pinball / Hot Pinball
	int m_yoffset;
};

DECLARE_DEVICE_TYPE(TECMO_SPRITE, tecmo_spr_device)


#define MCFG_TECMO_SPRITE_GFX_REGION(_region) \
	downcast<tecmo_spr_device &>(*device).set_gfx_region(_region);

#define MCFG_TECMO_SPRITE_BOOTLEG(_bootleg) \
	downcast<tecmo_spr_device &>(*device).set_bootleg(_bootleg);

#define MCFG_TECMO_SPRITE_YOFFSET(_yoffset) \
	downcast<tecmo_spr_device &>(*device).set_yoffset(_yoffset);

#endif // MAME_VIDEO_TECMO_SPR_H