diff options
Diffstat (limited to 'src/mame/gaelco/gaelco_wrally_sprites.h')
| -rw-r--r-- | src/mame/gaelco/gaelco_wrally_sprites.h | 20 |
1 files changed, 16 insertions, 4 deletions
diff --git a/src/mame/gaelco/gaelco_wrally_sprites.h b/src/mame/gaelco/gaelco_wrally_sprites.h index 0198dc4ad74..037cd7ccaa4 100644 --- a/src/mame/gaelco/gaelco_wrally_sprites.h +++ b/src/mame/gaelco/gaelco_wrally_sprites.h @@ -7,12 +7,18 @@ #include "screen.h" -class gaelco_wrally_sprites_device : public device_t, public device_video_interface +class gaelco_wrally_sprites_device : public device_t, public device_gfx_interface, public device_video_interface { public: gaelco_wrally_sprites_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); - template <typename T> void set_gfxdecode_tag(T &&tag) { m_gfxdecode.set_tag(std::forward<T>(tag)); } + template <typename T> + gaelco_wrally_sprites_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock, T &&palette_tag, const gfx_decode_entry *gfxinfo) + : gaelco_wrally_sprites_device(mconfig, tag, owner, clock) + { + set_palette(std::forward<T>(palette_tag)); + set_info(gfxinfo); + } void draw_sprites(const rectangle &cliprect, uint16_t* spriteram, int flip_screen); void mix_sprites(bitmap_ind16 &bitmap, const rectangle &cliprect, int priority); @@ -26,8 +32,6 @@ protected: virtual void get_sprites_info(uint16_t* spriteram, int& sx, int& sy, int& number, int& color, int& color_effect, int& attr, int& high_priotiy, int &end); private: - required_device<gfxdecode_device> m_gfxdecode; - bitmap_ind16 m_temp_bitmap_sprites; }; @@ -36,6 +40,14 @@ class blmbycar_sprites_device : public gaelco_wrally_sprites_device public: blmbycar_sprites_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + template <typename T> + blmbycar_sprites_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock, T &&palette_tag, const gfx_decode_entry *gfxinfo) + : blmbycar_sprites_device(mconfig, tag, owner, clock) + { + set_palette(std::forward<T>(palette_tag)); + set_info(gfxinfo); + } + protected: virtual void get_sprites_info(uint16_t* spriteram, int& sx, int& sy, int& number, int& color, int& color_effect, int& attr, int& high_priotiy, int &end) override; }; |
