Exemplo n.º 1
0
        public void GetCurrentTime(out Rational time, out float[] levels)
        {
            var rs = new RationalStruct();
            var pl = new PrivateLevel();

            napalm_get_current_time(_player, ref rs, ref pl);
            time = ToRational(rs);
            if (pl.level_count == 0)
            {
                levels = null;
            }
            else
            {
                levels = new float[pl.level_count];
                var temp = new float[16];
                temp[0]  = pl.level_00;
                temp[1]  = pl.level_01;
                temp[2]  = pl.level_02;
                temp[3]  = pl.level_03;
                temp[4]  = pl.level_04;
                temp[5]  = pl.level_05;
                temp[6]  = pl.level_06;
                temp[7]  = pl.level_07;
                temp[8]  = pl.level_08;
                temp[9]  = pl.level_09;
                temp[10] = pl.level_10;
                temp[11] = pl.level_11;
                temp[12] = pl.level_12;
                temp[13] = pl.level_13;
                temp[14] = pl.level_14;
                temp[15] = pl.level_15;
                for (int i = 0; i < pl.level_count; i++)
                {
                    levels[i] = temp[i];
                }
            }
        }
Exemplo n.º 2
0
 private static extern void napalm_get_current_time(IntPtr player, ref RationalStruct time, ref PrivateLevel level);