summaryrefslogtreecommitdiffstatshomepage
path: root/src/mame/video/kaneko_spr.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/mame/video/kaneko_spr.h')
-rw-r--r--src/mame/video/kaneko_spr.h21
1 files changed, 13 insertions, 8 deletions
diff --git a/src/mame/video/kaneko_spr.h b/src/mame/video/kaneko_spr.h
index 69540575e94..00ea0c7640f 100644
--- a/src/mame/video/kaneko_spr.h
+++ b/src/mame/video/kaneko_spr.h
@@ -15,20 +15,20 @@ struct priority_t
struct tempsprite_t
{
- int code,color;
+ u32 code,color;
int x,y;
int xoffs,yoffs;
- int flipx,flipy;
+ bool flipx,flipy;
int priority;
};
-class kaneko16_sprite_device : public device_t, public device_video_interface
+class kaneko16_sprite_device : public device_t, public device_gfx_interface, public device_video_interface
{
public:
// configuration
- template <typename T> void set_gfxdecode_tag(T &&tag) { m_gfxdecode.set_tag(std::forward<T>(tag)); }
+ void set_color_base(u16 base) { m_colbase = base; }
void set_fliptype(int fliptype) { m_sprite_fliptype = fliptype; }
void set_offsets(int xoffs, int yoffs)
{
@@ -85,6 +85,8 @@ protected:
// them in a different order
virtual void get_sprite_attributes(struct tempsprite_t *s, u16 attr) =0;
+ required_memory_region m_gfx_region;
+ u16 m_colbase;
private:
// registers
@@ -103,16 +105,13 @@ private:
template<class _BitmapClass>
void draw_sprites_custom(_BitmapClass &dest_bmp,const rectangle &clip,gfx_element *gfx,
- u32 code,u32 color,int flipx,int flipy,int sx,int sy,
+ u32 code,u32 color,bool flipx,bool flipy,int sx,int sy,
bitmap_ind8 &priority_bitmap, int priority);
int parse_sprite_type012(int i, struct tempsprite_t *s, u16* spriteram16, int spriteram16_bytes);
void copybitmap(bitmap_ind16 &bitmap, const rectangle &cliprect);
void copybitmap(bitmap_rgb32 &bitmap, const rectangle &cliprect);
-
- required_device<gfxdecode_device> m_gfxdecode;
-
};
//extern const device_type KANEKO16_SPRITE;
@@ -130,6 +129,9 @@ public:
kaneko_vu002_sprite_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock);
void get_sprite_attributes(struct tempsprite_t *s, u16 attr) override;
int get_sprite_type(void) override{ return 0; };
+
+protected:
+ virtual void device_start() override;
};
DECLARE_DEVICE_TYPE(KANEKO_VU002_SPRITE, kaneko_vu002_sprite_device)
@@ -146,6 +148,9 @@ public:
kaneko_kc002_sprite_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock);
void get_sprite_attributes(struct tempsprite_t *s, u16 attr) override;
int get_sprite_type(void) override{ return 1; };
+
+protected:
+ virtual void device_start() override;
};
DECLARE_DEVICE_TYPE(KANEKO_KC002_SPRITE, kaneko_kc002_sprite_device)