trunk/src/mame/video/seta001.c
| r31258 | r31259 | |
| 81 | 81 | |
| 82 | 82 | m_transpen = 0; |
| 83 | 83 | m_colorbase = 0; |
| 84 | | |
| 85 | 84 | m_spritelimit = 0x1ff; |
| 86 | 85 | |
| 87 | | m_bgflag = 0x00; |
| 88 | | |
| 89 | 86 | m_bankcallback = NULL; |
| 90 | 87 | |
| 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; |
| 107 | 89 | |
| 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)); |
| 108 | 95 | } |
| 109 | 96 | |
| 110 | 97 | void seta001_device::device_reset() |
trunk/src/mame/video/seta001.h
| r31258 | r31259 | |
| 34 | 34 | void setac_eof( void ); |
| 35 | 35 | void tnzs_eof( void ); |
| 36 | 36 | |
| 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 | | |
| 45 | 37 | // position kludges for seta.c & srmp2.c |
| 46 | 38 | void set_fg_xoffsets( int flip, int noflip ) { m_fg_flipxoffs = flip; m_fg_noflipxoffs = noflip; }; |
| 47 | | int m_fg_flipxoffs, m_fg_noflipxoffs; |
| 48 | 39 | void set_fg_yoffsets( int flip, int noflip ) { m_fg_flipyoffs = flip; m_fg_noflipyoffs = noflip; }; |
| 49 | | int m_fg_flipyoffs, m_fg_noflipyoffs; |
| 50 | 40 | void set_bg_yoffsets( int flip, int noflip ) { m_bg_flipyoffs = flip; m_bg_noflipyoffs = noflip; }; |
| 51 | | int m_bg_flipyoffs, m_bg_noflipyoffs; |
| 52 | 41 | void set_bg_xoffsets( int flip, int noflip ) { m_bg_flipxoffs = flip; m_bg_noflipxoffs = noflip; }; |
| 53 | | int m_bg_flipxoffs, m_bg_noflipxoffs; |
| 54 | 42 | |
| 43 | void set_colorbase(int base) { m_colorbase = base; }; |
| 44 | void set_spritelimit(int limit) { m_spritelimit = limit; }; |
| 55 | 45 | void set_transpen ( int pen ) { m_transpen = pen; }; |
| 56 | | int m_transpen; |
| 57 | 46 | |
| 58 | 47 | int is_flipped() { return ((m_spritectrl[ 0 ] & 0x40) >> 6); }; |
| 59 | 48 | |
| 60 | 49 | void set_gfxbank_callback(seta001_gfxbank_callback_func callback) { m_bankcallback = callback; }; |
| 61 | | seta001_gfxbank_callback_func m_bankcallback; |
| 62 | 50 | |
| 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 | | |
| 70 | 51 | protected: |
| 71 | 52 | virtual void device_start(); |
| 72 | 53 | virtual void device_reset(); |
| 73 | | private: |
| 74 | 54 | |
| 75 | 55 | private: |
| 76 | 56 | |
| r31258 | r31259 | |
| 78 | 58 | void draw_foreground( screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect, int bank_size); |
| 79 | 59 | required_device<gfxdecode_device> m_gfxdecode; |
| 80 | 60 | 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]; // ^ |
| 81 | 79 | }; |
| 82 | 80 | |
| 83 | 81 | extern const device_type SETA001_SPRITE; |