Ultima.Animations.LoadTable C# (CSharp) Method

LoadTable() private static method

private static LoadTable ( ) : void
return void
        private static void LoadTable()
        {
            int count = 400 + ((m_FileIndex.Index.Length - 35000) / 175);

            m_Table = new int[count];

            for (int i = 0; i < count; ++i)
            {
                object o = BodyTable.m_Entries[i];

                if (o == null || BodyConverter.Contains(i))
                {
                    m_Table[i] = i;
                }
                else
                {
                    BodyTableEntry bte = (BodyTableEntry)o;

                    m_Table[i] = bte.OldID | (1 << 31) | ((bte.NewHue & 0xFFFF) << 15);
                }
            }
        }

Usage Example

 public static void Translate(ref int body, ref int hue)
 {
     if (Animations.m_Table == null)
     {
         Animations.LoadTable();
     }
     if (body <= 0 || body >= Animations.m_Table.Length)
     {
         body = 0;
     }
     else
     {
         int num1 = Animations.m_Table[body];
         if ((num1 & int.MinValue) == 0)
         {
             return;
         }
         body = num1 & (int)short.MaxValue;
         int num2 = (hue & 16383) - 1;
         if (num2 >= 0 && num2 < Hues.List.Length)
         {
             return;
         }
         hue = num1 >> 15 & (int)ushort.MaxValue;
     }
 }
All Usage Examples Of Ultima.Animations::LoadTable