summaryrefslogtreecommitdiffstatshomepage
path: root/src/mame/includes/mainsnk.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/mame/includes/mainsnk.h')
-rw-r--r--src/mame/includes/mainsnk.h19
1 files changed, 14 insertions, 5 deletions
diff --git a/src/mame/includes/mainsnk.h b/src/mame/includes/mainsnk.h
index 8f9ca97a1f1..4711e811236 100644
--- a/src/mame/includes/mainsnk.h
+++ b/src/mame/includes/mainsnk.h
@@ -1,5 +1,9 @@
// license:BSD-3-Clause
// copyright-holders:David Haywood, Tomasz Slanina
+#ifndef MAME_INCLUDES_MAINSNK_H
+#define MAME_INCLUDES_MAINSNK_H
+
+#pragma once
#include "machine/gen_latch.h"
#include "emupal.h"
@@ -7,8 +11,8 @@
class mainsnk_state : public driver_device
{
public:
- mainsnk_state(const machine_config &mconfig, device_type type, const char *tag)
- : driver_device(mconfig, type, tag),
+ mainsnk_state(const machine_config &mconfig, device_type type, const char *tag) :
+ driver_device(mconfig, type, tag),
m_maincpu(*this, "maincpu"),
m_audiocpu(*this, "audiocpu"),
m_gfxdecode(*this, "gfxdecode"),
@@ -16,10 +20,14 @@ public:
m_soundlatch(*this, "soundlatch"),
m_bgram(*this, "bgram"),
m_spriteram(*this, "spriteram"),
- m_fgram(*this, "fgram") { }
+ m_fgram(*this, "fgram")
+ { }
void mainsnk(machine_config &config);
+protected:
+ virtual void video_start() override;
+
private:
required_device<cpu_device> m_maincpu;
required_device<cpu_device> m_audiocpu;
@@ -45,8 +53,7 @@ private:
TILE_GET_INFO_MEMBER(get_tx_tile_info);
TILE_GET_INFO_MEMBER(get_bg_tile_info);
- virtual void video_start() override;
- DECLARE_PALETTE_INIT(mainsnk);
+ void mainsnk_palette(palette_device &palette) const;
uint32_t screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
void draw_sprites(bitmap_ind16 &bitmap, const rectangle &cliprect, int scrollx, int scrolly );
@@ -54,3 +61,5 @@ private:
void sound_map(address_map &map);
void sound_portmap(address_map &map);
};
+
+#endif // MAME_INCLUDES_MAINSNK_H