Esempio n. 1
0
        static void TestLights( )
        {
            Int32    i, j;
            Single   f, r;
            dlight_t dl;

            r_numdlights = 32;
            for (i = 0; i < r_dlights.Length; i++)
            {
                r_dlights[i] = new dlight_t();
            }
            for (i = 0; i < r_numdlights; i++)
            {
                dl = r_dlights[i];
                r  = 64 * ((i % 4) - 1.5F);
                f  = 64 * (i / 4) + 128;
                for (j = 0; j < 3; j++)
                {
                    dl.origin[j] = cl.refdef.vieworg[j] + cl.v_forward[j] * f + cl.v_right[j] * r;
                }
                dl.color[0]  = ((i % 6) + 1) & 1;
                dl.color[1]  = (((i % 6) + 1) & 2) >> 1;
                dl.color[2]  = (((i % 6) + 1) & 4) >> 2;
                dl.intensity = 200;
            }
        }
Esempio n. 2
0
 static V( )
 {
     for (var i = 0; i < r_dlights.Length; i++)
     {
         r_dlights[i] = new dlight_t();
     }
     for (var i = 0; i < r_entities.Length; i++)
     {
         r_entities[i] = new entity_t();
     }
     for (var i = 0; i < r_lightstyles.Length; i++)
     {
         r_lightstyles[i] = new lightstyle_t();
     }
 }