diff options
Diffstat (limited to 'src/mame/video/namcos2_sprite.h')
-rw-r--r-- | src/mame/video/namcos2_sprite.h | 35 |
1 files changed, 29 insertions, 6 deletions
diff --git a/src/mame/video/namcos2_sprite.h b/src/mame/video/namcos2_sprite.h index 9e824273c71..4b9e4a03040 100644 --- a/src/mame/video/namcos2_sprite.h +++ b/src/mame/video/namcos2_sprite.h @@ -18,27 +18,50 @@ public: template <typename T> void set_gfxdecode_tag(T &&tag) { m_gfxdecode.set_tag(std::forward<T>(tag)); } template <typename T> void set_spriteram_tag(T &&tag) { m_spriteram.set_tag(std::forward<T>(tag)); } - void draw_sprites(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect, int pri, int control ); - void draw_sprites_metalhawk(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect, int pri ); - - void force_32x32_sprites(bool force) { m_force_32x32 = force; } + virtual void draw_sprites(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect, int pri, int control ); protected: + namcos2_sprite_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock); + // device-level overrides virtual void device_start() override; -private: // general void zdrawgfxzoom(screen_device &screen, bitmap_ind16 &dest_bmp, const rectangle &clip, gfx_element *gfx, u32 code, u32 color, bool flipx, bool flipy, int sx, int sy, int scalex, int scaley, int zpos); void zdrawgfxzoom(screen_device &screen, bitmap_rgb32 &dest_bmp, const rectangle &clip, gfx_element *gfx, u32 code, u32 color, bool flipx, bool flipy, int sx, int sy, int scalex, int scaley, int zpos); + virtual void get_tilenum_and_size(const u16 word0, const u16 word1, u32 &sprn, bool &is_32); + required_device<gfxdecode_device> m_gfxdecode; required_shared_ptr<u16> m_spriteram; - bool m_force_32x32; }; +class namcos2_sprite_finallap_device : public namcos2_sprite_device +{ +public: + // construction/destruction + namcos2_sprite_finallap_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + +protected: + virtual void get_tilenum_and_size(const u16 word0, const u16 word1, u32& sprn, bool& is_32) override; +}; + + +class namcos2_sprite_metalhawk_device : public namcos2_sprite_device +{ +public: + // construction/destruction + namcos2_sprite_metalhawk_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + + virtual void draw_sprites(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect, int pri, int control ) override; +}; + + + // device type definition DECLARE_DEVICE_TYPE(NAMCOS2_SPRITE, namcos2_sprite_device) +DECLARE_DEVICE_TYPE(NAMCOS2_SPRITE_FINALLAP, namcos2_sprite_finallap_device) +DECLARE_DEVICE_TYPE(NAMCOS2_SPRITE_METALHAWK, namcos2_sprite_metalhawk_device) #endif // MAME_VIDEO_NAMCOS2_SPRITE_H |