Previous 199869 Revisions Next

r31259 Friday 11th July, 2014 at 15:04:52 UTC by Alex Jackson
seta001.c: make data members private, distinguish per-driver configuration from runtime state and only state save the latter (nw)
[src/mame/video]seta001.c seta001.h

trunk/src/mame/video/seta001.c
r31258r31259
8181
8282   m_transpen = 0;
8383   m_colorbase = 0;
84
8584   m_spritelimit = 0x1ff;
8685
87   m_bgflag = 0x00;
88
8986   m_bankcallback = NULL;
9087
91   save_item(NAME(m_spritectrl));
92   save_pointer(NAME(m_spriteylow), 0x300);
93   save_pointer(NAME(m_spritecodelow), 0x2000);
94   save_pointer(NAME(m_spritecodehigh), 0x2000);
95   save_item(NAME(m_bgflag));
96   save_item(NAME(m_fg_flipxoffs));
97   save_item(NAME(m_fg_noflipxoffs));
98   save_item(NAME(m_fg_flipyoffs));
99   save_item(NAME(m_fg_noflipyoffs));
100   save_item(NAME(m_bg_flipyoffs));
101   save_item(NAME(m_bg_noflipyoffs));
102   save_item(NAME(m_bg_flipxoffs));
103   save_item(NAME(m_bg_noflipxoffs));
104   save_item(NAME(m_transpen));
105   save_item(NAME(m_colorbase));
106   save_item(NAME(m_spritelimit));
88   m_bgflag = 0x00;
10789
90   save_item(NAME(m_bgflag));
91   save_item(NAME(m_spritectrl));
92   save_item(NAME(m_spriteylow));
93   save_item(NAME(m_spritecodelow));
94   save_item(NAME(m_spritecodehigh));
10895}
10996
11097void seta001_device::device_reset()
trunk/src/mame/video/seta001.h
r31258r31259
3434   void setac_eof( void );
3535   void tnzs_eof( void );
3636
37   UINT8 m_bgflag;
38
39   UINT8 m_spritectrl[4];
40   UINT8 m_spriteylow[0x300]; // 0x200 low y + 0x100 bg stuff
41
42   UINT8 m_spritecodelow[0x2000]; // tnzs.c stuff only uses half?
43   UINT8 m_spritecodehigh[0x2000]; // ^
44
4537   // position kludges for seta.c & srmp2.c
4638   void set_fg_xoffsets( int flip, int noflip ) { m_fg_flipxoffs = flip; m_fg_noflipxoffs = noflip; };
47   int m_fg_flipxoffs, m_fg_noflipxoffs;
4839   void set_fg_yoffsets( int flip, int noflip ) { m_fg_flipyoffs = flip; m_fg_noflipyoffs = noflip; };
49   int m_fg_flipyoffs, m_fg_noflipyoffs;
5040   void set_bg_yoffsets( int flip, int noflip ) { m_bg_flipyoffs = flip; m_bg_noflipyoffs = noflip; };
51   int m_bg_flipyoffs, m_bg_noflipyoffs;
5241   void set_bg_xoffsets( int flip, int noflip ) { m_bg_flipxoffs = flip; m_bg_noflipxoffs = noflip; };
53   int m_bg_flipxoffs, m_bg_noflipxoffs;
5442
43   void set_colorbase(int base) { m_colorbase = base; };
44   void set_spritelimit(int limit) { m_spritelimit = limit; };
5545   void set_transpen ( int pen ) { m_transpen = pen; };
56   int m_transpen;
5746
5847   int is_flipped() { return ((m_spritectrl[ 0 ] & 0x40) >> 6); };
5948
6049   void set_gfxbank_callback(seta001_gfxbank_callback_func callback) { m_bankcallback = callback; };
61   seta001_gfxbank_callback_func m_bankcallback;
6250
63   void set_colorbase(int base) { m_colorbase = base; };
64   int m_colorbase;
65
66   void set_spritelimit(int limit) { m_spritelimit = limit; };
67   int m_spritelimit;
68
69
7051protected:
7152   virtual void device_start();
7253   virtual void device_reset();
73   private:
7454
7555private:
7656
r31258r31259
7858   void draw_foreground( screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect, int bank_size);
7959   required_device<gfxdecode_device> m_gfxdecode;
8060   required_device<palette_device> m_palette;
61
62   seta001_gfxbank_callback_func m_bankcallback;
63
64   // configuration
65   int m_fg_flipxoffs, m_fg_noflipxoffs;
66   int m_fg_flipyoffs, m_fg_noflipyoffs;
67   int m_bg_flipyoffs, m_bg_noflipyoffs;
68   int m_bg_flipxoffs, m_bg_noflipxoffs;
69   int m_colorbase;
70   int m_spritelimit;
71   int m_transpen;
72
73   // live state
74   UINT8 m_bgflag;
75   UINT8 m_spritectrl[4];
76   UINT8 m_spriteylow[0x300]; // 0x200 low y + 0x100 bg stuff
77   UINT8 m_spritecodelow[0x2000]; // tnzs.c stuff only uses half?
78   UINT8 m_spritecodehigh[0x2000]; // ^
8179};
8280
8381extern const device_type SETA001_SPRITE;

Previous 199869 Revisions Next


© 1997-2024 The MAME Team