summaryrefslogtreecommitdiffstats
path: root/src/mame/includes/bosco.h
blob: 5ec8e0d5685d331e8782716f95efc8ae111c37e3 (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
52
53
54
55
56
57
// license:BSD-3-Clause
// copyright-holders:Nicola Salmoria
#ifndef MAME_INCLUDES_BOSCO_H
#define MAME_INCLUDES_BOSCO_H

#pragma once

#include "galaga.h"
#include "tilemap.h"

class bosco_state : public galaga_state
{
public:
	bosco_state(const machine_config &mconfig, device_type type, const char *tag)
		: galaga_state(mconfig, type, tag)
		, m_bosco_radarattr(*this, "bosco_radarattr")
		, m_bosco_starcontrol(*this, "starcontrol")
	{
	}

	void bosco(machine_config &config);

protected:
	virtual void video_start() override;

private:
	required_shared_ptr<uint8_t> m_bosco_radarattr;

	required_shared_ptr<uint8_t> m_bosco_starcontrol;

	uint8_t *m_bosco_radarx = nullptr;
	uint8_t *m_bosco_radary = nullptr;

	uint8_t m_bosco_starclr = 0U;

	uint8_t *m_spriteram = nullptr;
	uint8_t *m_spriteram2 = nullptr;
	uint32_t m_spriteram_size = 0U;
	TILEMAP_MAPPER_MEMBER(fg_tilemap_scan);
	TILE_GET_INFO_MEMBER(bg_get_tile_info);
	TILE_GET_INFO_MEMBER(fg_get_tile_info);
	void bosco_palette(palette_device &palette) const;
	uint32_t screen_update_bosco(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
	DECLARE_WRITE_LINE_MEMBER(screen_vblank_bosco);

	inline void get_tile_info_bosco(tile_data &tileinfo,int tile_index,int ram_offs);
	void draw_sprites(bitmap_ind16 &bitmap, const rectangle &cliprect, int flip);
	void draw_bullets(bitmap_ind16 &bitmap, const rectangle &cliprect, int flip);
	void draw_stars(bitmap_ind16 &bitmap, const rectangle &cliprect, int flip);
	void bosco_videoram_w(offs_t offset, uint8_t data);
	void bosco_scrollx_w(uint8_t data);
	void bosco_scrolly_w(uint8_t data);
	void bosco_starclr_w(uint8_t data);
	void bosco_map(address_map &map);
};

#endif // MAME_INCLUDES_BOSCO_H