Previous 15994 Revisions Next

r6948 Wednesday 6th January, 2010 at 01:23:18 UTC by Barry Rodewald
[FMTOWNS] Small fix for X-axis flipped sprites.
[src/mess/video]fmtowns.c

src/mess/video/fmtowns.c
r6947r6948
655655      for(xpos=xstart;xpos!=xend;xpos+=xdir)
656656      {
657657         voffset = 0;
658         if(xflip)
659            pixel = towns_sprram[poffset] & 0x0f;
660         else
661            pixel = (towns_sprram[poffset] & 0xf0) >> 4;
658         pixel = (towns_sprram[poffset] & 0xf0) >> 4;
662659         col = towns_sprram[coffset+(pixel*2)] | (towns_sprram[coffset+(pixel*2)+1] << 8);
663660         voffset += (towns_crtc_reg[24] * 4) * ypos;  // scanline size in bytes * y pos
664661         voffset += (xpos & 0x1ff) * 2;
r6947r6948
670667            towns_gfxvram[voffset] = col & 0x00ff;
671668         }
672669         if(xflip)
673         {
674670            voffset+=2;
675            pixel = (towns_sprram[poffset] & 0xf0) >> 4;
676         }
677671         else
678         {
679672            voffset-=2;
680            pixel = towns_sprram[poffset] & 0x0f;
681         }
673         pixel = towns_sprram[poffset] & 0x0f;
682674         col = towns_sprram[coffset+(pixel*2)] | (towns_sprram[coffset+(pixel*2)+1] << 8);
683675         voffset &= 0x3ffff;
684676         voffset += (towns_sprite_reg[6] & 0x10) ? 0x60000 : 0x40000;

Previous 15994 Revisions Next


© 1998-2018 The MESS Team