Previous 15994 Revisions Next

r7688 Saturday 3rd April, 2010 at 23:07:57 UTC by MooglyGuy
Improved Rectangle drawing in the RDP core. [Harmony]
[src/mame/video]n64.c rdpfrect.c rdptrect.c

src/mame/video/rdpfrect.c
r7687r7688
4949   UINT8* hb = &m_rdp->GetHiddenBits()[m_misc_state->m_fb_address >> 1];
5050
5151   int index, i, j;
52   int x1 = m_xh;
53   int x2 = m_xl;
54   int y1 = m_yh;
55   int y2 = m_yl;
52   int x1 = m_xh >> 2;
53   int x2 = m_xl >> 2;
54   int y1 = m_yh >> 2;
55   int y2 = m_yl >> 2;
5656   UINT16 fill_color1 = (m_rdp->GetFillColor32() >> 16) & 0xffff;
5757   UINT16 fill_color2 = (m_rdp->GetFillColor32() >>  0) & 0xffff;
5858   int fill_cvg1 = (fill_color1 & 1) ? 8 : 1;
r7687r7688
196196   UINT8* hb = &m_rdp->GetHiddenBits()[m_misc_state->m_fb_address >> 1];
197197
198198   int index, i, j;
199   int x1 = m_xh;
200   int x2 = m_xl;
201   int y1 = m_yh;
202   int y2 = m_yl;
199   int x1 = m_xh >> 2;
200   int x2 = m_xl >> 2;
201   int y1 = m_yh >> 2;
202   int y2 = m_yl >> 2;
203203   UINT16 fill_color1;
204204   UINT16 fill_color2;
205205   int fill_cvg1;
r7687r7688
410410   UINT8* hb = &m_rdp->GetHiddenBits()[m_misc_state->m_fb_address >> 1];
411411
412412   int index, i, j;
413   int x1 = m_xh;
414   int x2 = m_xl;
415   int y1 = m_yh;
416   int y2 = m_yl;
413   int x1 = m_xh >> 2;
414   int x2 = m_xl >> 2;
415   int y1 = m_yh >> 2;
416   int y2 = m_yl >> 2;
417417   UINT16 fill_color1;
418418   UINT16 fill_color2;
419419   int fill_cvg1;
src/mame/video/rdptrect.c
r7687r7688
5151   UINT32 tilenum2 = 0;
5252   N64::RDP::Tile *tex_tile2 = NULL;
5353
54   int x1 = m_xh;
55   int x2 = m_xl;
56   int y1 = m_yh;
57   int y2 = m_yl;
54   int x1 = m_xh >> 2;
55   int x2 = m_xl >> 2;
56   int y1 = m_yh >> 2;
57   int y2 = m_yl >> 2;
5858
5959   if (x2 <= x1)
6060   {
r7687r7688
366366
367367   N64::RDP::Tile *tex_tile = &m_rdp->GetTiles()[m_tilenum];
368368
369   int x1 = m_xh;
370   int x2 = m_xl;
371   int y1 = m_yh;
372   int y2 = m_yl;
369   int x1 = m_xh >> 2;
370   int x2 = m_xl >> 2;
371   int y1 = m_yh >> 2;
372   int y2 = m_yl >> 2;
373373
374374   if (x2 <= x1)
375375   {
src/mame/video/n64.c
r7687r7688
745745   {
746746      case 0: // Opaque
747747         return (max || (overflow ? infront : nearer));
748         break;
749748      case 1: // Interpenetrating
750749         return (max || (overflow ? infront : nearer));
751         break;
752750      case 2: // Transparent
753751         return (infront || max);
754         break;
755752      case 3: // Decal
756753         return (farther && nearer && !max);
757         break;
758754      default:
759755         fatalerror( "z_mode = %d", m_other_modes.z_mode);
760756         break;
r7687r7688
17621758
17631759void N64::RDP::Rectangle::InitFromBuffer(UINT32 *data)
17641760{
1765   m_xl      = ((data[0] >> 12) & 0xfff) >> 2;
1766   m_yl      = ((data[0] >>  0) & 0xfff) >> 2;
1767   m_xh      = ((data[1] >> 12) & 0xfff) >> 2;
1768   m_yh      = ((data[1] >>  0) & 0xfff) >> 2;
1761   m_xl      = (data[0] >> 12) & 0xfff;
1762   m_yl      = (data[0] >>  0) & 0xfff;
1763   m_xh      = (data[1] >> 12) & 0xfff;
1764   m_yh      = (data[1] >>  0) & 0xfff;
17691765}
17701766
17711767void N64::RDP::TexRectangle::InitFromBuffer(UINT32 *data)
17721768{
17731769   m_tilenum   = (data[1] >> 24) & 0x7;
1774   m_xl      = ((data[0] >> 12) & 0xfff) >> 2;
1775   m_yl      = ((data[0] >>  0) & 0xfff) >> 2;
1776   m_xh      = ((data[1] >> 12) & 0xfff) >> 2;
1777   m_yh      = ((data[1] >>  0) & 0xfff) >> 2;
1770   m_xl      = (data[0] >> 12) & 0xfff;
1771   m_yl      = (data[0] >>  0) & 0xfff;
1772   m_xh      = (data[1] >> 12) & 0xfff;
1773   m_yh      = (data[1] >>  0) & 0xfff;
17781774   m_s         = (data[2] >> 16) & 0xffff;
17791775   m_t         = (data[2] >>  0) & 0xffff;
17801776   m_dsdx      = (data[3] >> 16) & 0xffff;

Previous 15994 Revisions Next


© 1998-2018 The MESS Team