Ejemplo n.º 1
0
 public static void Copy(finalvert_t src, finalvert_t dst)
 {
     for (int kk = 0; kk < 6; kk++)
     {
         dst.v[kk] = src.v[kk];
     }
     dst.flags    = src.flags;
     dst.reserved = src.reserved;
 }
Ejemplo n.º 2
0
            public int[] v = new int[6]; // u, v, s, t, l, 1/z

            #endregion Fields

            #region Methods

            public static void Copy(finalvert_t src, finalvert_t dst)
            {
                for (int kk = 0; kk < 6; kk++) dst.v[kk] = src.v[kk];
                dst.flags = src.flags;
                dst.reserved = src.reserved;
            }
Ejemplo n.º 3
0
        /*
        ================
        D_PolysetDrawFinalVerts
        ================
        */
        public static void D_PolysetDrawFinalVerts(finalvert_t[] pfv, int numverts)
        {
            int		i, z;
            int	    zbuf;

            for (i=0 ; i<numverts ; i++)
            {
                finalvert_t fv = pfv[i];
            // valid triangle coordinates for filling can include the bottom and
            // right clip edges, due to the fill rule; these shouldn't be drawn
                if ((fv.v[0] < render.r_refdef.vrectright) &&
                    (fv.v[1] < render.r_refdef.vrectbottom))
                {
                    z = fv.v[5]>>16;
                    zbuf = zspantable[fv.v[1]] + fv.v[0];
                    if (z >= d_pzbuffer[zbuf])
                    {
                        int		pix;

                        d_pzbuffer[zbuf] = (short)z;
                        pix = skinstart[skintable[fv.v[3]>>16] + (fv.v[2]>>16)];
                        pix = render.acolormap[pix + (fv.v[4] & 0xFF00) ];
                        d_viewbuffer[d_scantable[fv.v[1]] + fv.v[0]] = (byte)pix;
                    }
                }
            }
        }