seta001.c: make data members private, distinguish per-driver configuration from runtime state and only state save the latter (nw)
This commit is contained in:
parent
a3ff93c233
commit
e1da86fee5
@ -81,30 +81,17 @@ void seta001_device::device_start()
|
||||
|
||||
m_transpen = 0;
|
||||
m_colorbase = 0;
|
||||
|
||||
m_spritelimit = 0x1ff;
|
||||
|
||||
m_bgflag = 0x00;
|
||||
|
||||
m_bankcallback = NULL;
|
||||
|
||||
save_item(NAME(m_spritectrl));
|
||||
save_pointer(NAME(m_spriteylow), 0x300);
|
||||
save_pointer(NAME(m_spritecodelow), 0x2000);
|
||||
save_pointer(NAME(m_spritecodehigh), 0x2000);
|
||||
save_item(NAME(m_bgflag));
|
||||
save_item(NAME(m_fg_flipxoffs));
|
||||
save_item(NAME(m_fg_noflipxoffs));
|
||||
save_item(NAME(m_fg_flipyoffs));
|
||||
save_item(NAME(m_fg_noflipyoffs));
|
||||
save_item(NAME(m_bg_flipyoffs));
|
||||
save_item(NAME(m_bg_noflipyoffs));
|
||||
save_item(NAME(m_bg_flipxoffs));
|
||||
save_item(NAME(m_bg_noflipxoffs));
|
||||
save_item(NAME(m_transpen));
|
||||
save_item(NAME(m_colorbase));
|
||||
save_item(NAME(m_spritelimit));
|
||||
m_bgflag = 0x00;
|
||||
|
||||
save_item(NAME(m_bgflag));
|
||||
save_item(NAME(m_spritectrl));
|
||||
save_item(NAME(m_spriteylow));
|
||||
save_item(NAME(m_spritecodelow));
|
||||
save_item(NAME(m_spritecodehigh));
|
||||
}
|
||||
|
||||
void seta001_device::device_reset()
|
||||
|
@ -34,43 +34,23 @@ public:
|
||||
void setac_eof( void );
|
||||
void tnzs_eof( void );
|
||||
|
||||
UINT8 m_bgflag;
|
||||
|
||||
UINT8 m_spritectrl[4];
|
||||
UINT8 m_spriteylow[0x300]; // 0x200 low y + 0x100 bg stuff
|
||||
|
||||
UINT8 m_spritecodelow[0x2000]; // tnzs.c stuff only uses half?
|
||||
UINT8 m_spritecodehigh[0x2000]; // ^
|
||||
|
||||
// position kludges for seta.c & srmp2.c
|
||||
void set_fg_xoffsets( int flip, int noflip ) { m_fg_flipxoffs = flip; m_fg_noflipxoffs = noflip; };
|
||||
int m_fg_flipxoffs, m_fg_noflipxoffs;
|
||||
void set_fg_yoffsets( int flip, int noflip ) { m_fg_flipyoffs = flip; m_fg_noflipyoffs = noflip; };
|
||||
int m_fg_flipyoffs, m_fg_noflipyoffs;
|
||||
void set_bg_yoffsets( int flip, int noflip ) { m_bg_flipyoffs = flip; m_bg_noflipyoffs = noflip; };
|
||||
int m_bg_flipyoffs, m_bg_noflipyoffs;
|
||||
void set_bg_xoffsets( int flip, int noflip ) { m_bg_flipxoffs = flip; m_bg_noflipxoffs = noflip; };
|
||||
int m_bg_flipxoffs, m_bg_noflipxoffs;
|
||||
|
||||
void set_colorbase(int base) { m_colorbase = base; };
|
||||
void set_spritelimit(int limit) { m_spritelimit = limit; };
|
||||
void set_transpen ( int pen ) { m_transpen = pen; };
|
||||
int m_transpen;
|
||||
|
||||
int is_flipped() { return ((m_spritectrl[ 0 ] & 0x40) >> 6); };
|
||||
|
||||
void set_gfxbank_callback(seta001_gfxbank_callback_func callback) { m_bankcallback = callback; };
|
||||
seta001_gfxbank_callback_func m_bankcallback;
|
||||
|
||||
void set_colorbase(int base) { m_colorbase = base; };
|
||||
int m_colorbase;
|
||||
|
||||
void set_spritelimit(int limit) { m_spritelimit = limit; };
|
||||
int m_spritelimit;
|
||||
|
||||
|
||||
protected:
|
||||
virtual void device_start();
|
||||
virtual void device_reset();
|
||||
private:
|
||||
|
||||
private:
|
||||
|
||||
@ -78,6 +58,24 @@ private:
|
||||
void draw_foreground( screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect, int bank_size);
|
||||
required_device<gfxdecode_device> m_gfxdecode;
|
||||
required_device<palette_device> m_palette;
|
||||
|
||||
seta001_gfxbank_callback_func m_bankcallback;
|
||||
|
||||
// configuration
|
||||
int m_fg_flipxoffs, m_fg_noflipxoffs;
|
||||
int m_fg_flipyoffs, m_fg_noflipyoffs;
|
||||
int m_bg_flipyoffs, m_bg_noflipyoffs;
|
||||
int m_bg_flipxoffs, m_bg_noflipxoffs;
|
||||
int m_colorbase;
|
||||
int m_spritelimit;
|
||||
int m_transpen;
|
||||
|
||||
// live state
|
||||
UINT8 m_bgflag;
|
||||
UINT8 m_spritectrl[4];
|
||||
UINT8 m_spriteylow[0x300]; // 0x200 low y + 0x100 bg stuff
|
||||
UINT8 m_spritecodelow[0x2000]; // tnzs.c stuff only uses half?
|
||||
UINT8 m_spritecodehigh[0x2000]; // ^
|
||||
};
|
||||
|
||||
extern const device_type SETA001_SPRITE;
|
||||
|
Loading…
Reference in New Issue
Block a user