Contains() public static method

Checks to see if body is contained within the mapping table.
public static Contains ( int body ) : bool
body int
return bool
        private static void LoadTable()
        {
            int length = 400 + ((int)Animations.m_FileIndex.Index.Length - 35000) / 175;

            Animations.m_Table = new int[length];
            for (int i = 0; i < length; i++)
            {
                object item = BodyTable.m_Entries[i];
                if (item == null || BodyConverter.Contains(i))
                {
                    Animations.m_Table[i] = i;
                }
                else
                {
                    BodyTableEntry bodyTableEntry = (BodyTableEntry)item;
                    Animations.m_Table[i] = bodyTableEntry.m_OldID | -2147483648 | ((bodyTableEntry.m_NewHue ^ 32768) & 65535) << 15;
                }
            }
        }
Example #2
0
        private static void LoadTable()
        {
            int count = 400 + ((_fileIndex.Index.Length - 35000) / 175);

            _table = new int[count];

            for (int i = 0; i < count; ++i)
            {
                var bodyTableEntryExist = BodyTable.Entries.TryGetValue(i, out BodyTableEntry bodyTableEntry);
                if (!bodyTableEntryExist || BodyConverter.Contains(i))
                {
                    _table[i] = i;
                }
                else
                {
                    _table[i] = bodyTableEntry.OldId | (1 << 31) | ((bodyTableEntry.NewHue & 0xFFFF) << 15);
                }
            }
        }
        private static void LoadTable()
        {
            int length = 400 + (Animations.m_FileIndex.Index.Length - 35000) / 175;

            Animations.m_Table = new int[length];
            for (int body = 0; body < length; ++body)
            {
                object obj = BodyTable.m_Entries[(object)body];
                if (obj == null || BodyConverter.Contains(body))
                {
                    Animations.m_Table[body] = body;
                }
                else
                {
                    BodyTableEntry bodyTableEntry = (BodyTableEntry)obj;
                    Animations.m_Table[body] = bodyTableEntry.m_OldID | int.MinValue | ((bodyTableEntry.m_NewHue ^ 32768) & (int)ushort.MaxValue) << 15;
                }
            }
        }
Example #4
0
        private static void LoadTable()
        {
            // TODO: check why it was fixed at max 1697. Probably old code for anim.mul?
            //int count = 400 + ((_fileIndex.Index.Length - 35000) / 175);

            _table = new int[_maxAnimationValue + 1];

            for (int i = 0; i < _table.Length; ++i)
            {
                var bodyTableEntryExist = BodyTable.Entries.TryGetValue(i, out BodyTableEntry bodyTableEntry);
                if (!bodyTableEntryExist || BodyConverter.Contains(i))
                {
                    _table[i] = i;
                }
                else
                {
                    _table[i] = bodyTableEntry.OldId | (1 << 31) | ((bodyTableEntry.NewHue & 0xFFFF) << 15);
                }
            }
        }
Example #5
0
        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
                {
                    var bte = (BodyTableEntry)o;

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