Previous 15994 Revisions Next

r12281 Wednesday 20th July, 2011 at 01:01:36 UTC by Angelo Salese
Fixes a transparency video bug with cottonbm on ST-V, it might fix other video bugs for Sega Saturn as well
[src/mame/video]stvvdp2.c

src/mame/video/stvvdp2.c
r12280r12281
44104410
44114411            if ( x & clipxmask || y & clipymask ) continue;
44124412            pix = *BITMAP_ADDR16(roz_bitmap, y & planerenderedsizey, x & planerenderedsizex);
4413            if(stv2_current_tilemap.fade_control & 1)
4414               stv_vdp2_compute_color_offset_RGB555_UINT16(machine,&pix,stv2_current_tilemap.fade_control & 2);
44154413            switch( stv2_current_tilemap.transparency )
44164414            {
44174415               case STV_TRANSPARENCY_PEN:
4418                  if ( pix != 0x0000 ) line[hcnt] = pix;
4416                  if ( pix != 0x0000 )
4417                  {
4418                     if(stv2_current_tilemap.fade_control & 1)
4419                        stv_vdp2_compute_color_offset_RGB555_UINT16(machine,&pix,stv2_current_tilemap.fade_control & 2);
4420
4421                     line[hcnt] = pix;
4422                  }
44194423                  break;
44204424               case STV_TRANSPARENCY_NONE:
4425                  if(stv2_current_tilemap.fade_control & 1)
4426                     stv_vdp2_compute_color_offset_RGB555_UINT16(machine,&pix,stv2_current_tilemap.fade_control & 2);
4427
44214428                  line[hcnt] = pix;
44224429                  break;
44234430               case STV_TRANSPARENCY_ALPHA:
4424                  if ( pix != 0x000 ) line[hcnt] = alpha_blend_r16( line[hcnt], pix, stv2_current_tilemap.alpha );
4431                  if ( pix != 0x000 )
4432                  {
4433                     if(stv2_current_tilemap.fade_control & 1)
4434                        stv_vdp2_compute_color_offset_RGB555_UINT16(machine,&pix,stv2_current_tilemap.fade_control & 2);
4435
4436                     line[hcnt] = alpha_blend_r16( line[hcnt], pix, stv2_current_tilemap.alpha );
4437                  }
44254438                  break;
44264439               case STV_TRANSPARENCY_ADD_BLEND:
4427                  if ( pix != 0x0000 ) line[hcnt] = stv_add_blend( line[hcnt], pix );
4440                  if ( pix != 0x0000 )
4441                  {
4442                     if(stv2_current_tilemap.fade_control & 1)
4443                        stv_vdp2_compute_color_offset_RGB555_UINT16(machine,&pix,stv2_current_tilemap.fade_control & 2);
4444
4445                     line[hcnt] = stv_add_blend( line[hcnt], pix );
4446                  }
44284447                  break;
44294448            }
44304449
r12280r12281
45024521            if ( x & clipxmask || y & clipymask ) continue;
45034522
45044523            pix = *BITMAP_ADDR16(roz_bitmap, y & planerenderedsizey, x & planerenderedsizex);
4505            if(stv2_current_tilemap.fade_control & 1)
4506               stv_vdp2_compute_color_offset_RGB555_UINT16(machine,&pix,stv2_current_tilemap.fade_control & 2);
45074524            switch( stv2_current_tilemap.transparency )
45084525            {
45094526               case STV_TRANSPARENCY_PEN:
4510                  if ( pix != 0x0000 ) line[hcnt] = pix;
4527                  if ( pix != 0x0000 )
4528                  {
4529                     if(stv2_current_tilemap.fade_control & 1)
4530                        stv_vdp2_compute_color_offset_RGB555_UINT16(machine,&pix,stv2_current_tilemap.fade_control & 2);
4531
4532                     line[hcnt] = pix;
4533                  }
45114534                  break;
45124535               case STV_TRANSPARENCY_NONE:
4536                  if(stv2_current_tilemap.fade_control & 1)
4537                     stv_vdp2_compute_color_offset_RGB555_UINT16(machine,&pix,stv2_current_tilemap.fade_control & 2);
4538
45134539                  line[hcnt] = pix;
45144540                  break;
45154541               case STV_TRANSPARENCY_ALPHA:
4516                  if ( pix != 0x000 ) line[hcnt] = alpha_blend_r16( line[hcnt], pix, stv2_current_tilemap.alpha );
4542                  if ( pix != 0x000 )
4543                  {
4544                     if(stv2_current_tilemap.fade_control & 1)
4545                        stv_vdp2_compute_color_offset_RGB555_UINT16(machine,&pix,stv2_current_tilemap.fade_control & 2);
4546
4547                     line[hcnt] = alpha_blend_r16( line[hcnt], pix, stv2_current_tilemap.alpha );
4548                  }
45174549                  break;
45184550               case STV_TRANSPARENCY_ADD_BLEND:
4519                  if ( pix != 0x0000 ) line[hcnt] = stv_add_blend( line[hcnt], pix );
4551                  if ( pix != 0x0000 )
4552                  {
4553                     if(stv2_current_tilemap.fade_control & 1)
4554                        stv_vdp2_compute_color_offset_RGB555_UINT16(machine,&pix,stv2_current_tilemap.fade_control & 2);
4555
4556                     line[hcnt] = stv_add_blend( line[hcnt], pix );
4557                  }
45204558                  break;
45214559            }
45224560         }

Previous 15994 Revisions Next


© 1998-2018 The MESS Team