Previous 199869 Revisions Next

r30608 Thursday 22nd May, 2014 at 22:22:31 UTC by David Haywood
prepare more (nw)
[src/mame/drivers]gaiden.c
[src/mame/video]tecmo_mix.c tecmo_mix.h

trunk/src/mame/drivers/gaiden.c
r30607r30608
771771   MCFG_TECMO_SPRITE_GFX_REGION(3)
772772
773773   MCFG_DEVICE_ADD("mixer", TECMO_MIXER, 0)
774   MCFG_TECMO_MIXER_SHIFTS(8,10,4) // wrong
774   MCFG_TECMO_MIXER_SHIFTS(10,9,4) // wrong
775775   MCFG_TECMO_MIXER_BLENDCOLS(   0x0400 + 0x300, 0x0400 + 0x200, 0x0400 + 0x100, 0x0400 + 0x000 )
776776   MCFG_TECMO_MIXER_REGULARCOLS( 0x0000 + 0x300, 0x0000 + 0x200, 0x0000 + 0x100, 0x0000 + 0x000 )
777777   MCFG_TECMO_MIXER_BLENDSOUCE( 0x0800 + 0x000, 0x0800 + 0x200)
778   MCFG_TECMO_MIXER_REVSPRITETILE
778779
779
780780   MCFG_VIDEO_START_OVERRIDE(gaiden_state,gaiden)
781781
782782   /* sound hardware */
trunk/src/mame/video/tecmo_mix.c
r30607r30608
2323      m_bgregular_comp(0),
2424      m_fgregular_comp(0),
2525      m_txregular_comp(0),
26      m_spregular_comp(0)
26      m_spregular_comp(0),
2727
28      m_revspritetile(0)
29
2830{
2931}
3032
r30607r30608
7880   dev.m_fgblend_source = fgblend_source;
7981}
8082
83void tecmo_mix_device::set_revspritetile(device_t &device)
84{
85   tecmo_mix_device &dev = downcast<tecmo_mix_device &>(device);
86   dev.m_revspritetile = 3;
87}
88
8189void tecmo_mix_device::mix_bitmaps(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect, palette_device* palette, bitmap_ind16* bitmap_bg, bitmap_ind16* bitmap_fg, bitmap_ind16* bitmap_tx, bitmap_ind16* bitmap_sp)
8290{
8391   //int frame = (screen.frame_number()) & 1;
r30607r30608
115123
116124         if (sprpixel&0xf)
117125         {
118            switch (m_sprpri)
126            if (m_sprpri == (0 ^ m_revspritetile)) // behind all
119127            {
120            case 0: // behind all
121           
122128
123129               if (fgpixel & 0xf) // is the fg used?
124130               {
r30607r30608
150156                  }
151157
152158               }
153         
154               break;
155
156            case 1: // above bg, behind tx, fg
157           
159            }
160            else  if (m_sprpri == (1 ^ m_revspritetile)) // above bg, behind tx, fg
161            {
158162               if (fgpixel & 0xf) // is the fg used?
159163               {
160164                  if (fgbln)
r30607r30608
194198                     dd[x] = paldata[sprpixel + m_spregular_comp];
195199                  }
196200               }
197         
198           
199               break;
200201
201            case 2: // above bg,fg, behind tx
202           
202
203            }
204            else if (m_sprpri == (2 ^ m_revspritetile)) // above bg,fg, behind tx
205            {
203206               if (m_sprbln)
204207               {
205208                  // unusued by this game?
r30607r30608
211214                  dd[x] = paldata[sprpixel + m_spregular_comp];
212215                  //dd[x] = rand();
213216               }
214               break;
217            }
215218
216            case 3: // above all?
217           
219            else if (m_sprpri == (3 ^ m_revspritetile)) // above all?
220            {
218221               if (m_sprbln)
219222               {
220223                  // unusued by this game?
r30607r30608
224227               {
225228                  dd[x] = paldata[sprpixel + m_spregular_comp];
226229               }
227           
228               break;
229230
230231            }
231232         }
trunk/src/mame/video/tecmo_mix.h
r30607r30608
1313   static void set_blendcols(device_t &device, int bgblend_comp, int fgblend_comp, int txblend_comp, int spblend_comp);
1414   static void set_regularcols(device_t &device, int bgregular_comp, int fgregular_comp, int txregular_comp, int spregular_comp);
1515   static void set_blendsource(device_t &device, int spblend_source, int fgblend_source);
16   static void set_revspritetile(device_t &device);
1617
1718protected:
1819   virtual void device_start();
r30607r30608
3839   int m_txregular_comp;
3940   int m_spregular_comp;
4041
42   int m_revspritetile;
4143
4244private:
4345
r30607r30608
6163#define MCFG_TECMO_MIXER_BLENDSOUCE(_spblend_source, _fgblend_source) \
6264   tecmo_mix_device::set_blendsource(*device, _spblend_source, _fgblend_source);
6365
66#define MCFG_TECMO_MIXER_REVSPRITETILE \
67   tecmo_mix_device::set_revspritetile(*device);
6468
6569
6670
71

Previous 199869 Revisions Next


© 1997-2024 The MAME Team