Esempio n. 1
0
        private void ClearBsaLists()
        {
            InitBsaLists();

            Type0.Clear();
            Type1.Clear();
            Type2.Clear();
            Type3.Clear();
            Type4.Clear();
            Type6.Clear();
            Type7.Clear();
            Type8.Clear();
        }
Esempio n. 2
0
            public AIChunk(BinaryReader reader)
            {
                type = reader.ReadInt16();

                switch (type)
                {
                case 1:
                    type1Data = new Type1();
                    type1Data.ReadFromFile(reader);
                    break;

                case 4:
                    type4Data = new Type4();
                    type4Data.ReadFromFile(reader);
                    break;

                case 7:
                    type7Data = new Type7();
                    type7Data.ReadFromFile(reader);
                    break;

                case 8:
                    type8Data = new Type8();
                    type8Data.ReadFromFile(reader);
                    type8Int = reader.ReadInt32();
                    break;

                case 9:
                    type8Data = new Type8();
                    type8Data.ReadFromFile(reader);
                    break;

                case 11:
                    type11Data = new Type11();
                    type11Data.ReadFromFile(reader);
                    break;

                default:
                    throw new Exception("Unknown type");
                }
            }
Esempio n. 3
0
        public void SaveIBsaTypes()
        {
            ClearBsaLists();

            foreach (var bsaEntry in IBsaTypes)
            {
                if (bsaEntry is BSA_Type0 type)
                {
                    Type0.Add(type);
                }
                else if (bsaEntry is BSA_Type1 type1)
                {
                    Type1.Add(type1);
                }
                else if (bsaEntry is BSA_Type2 type2)
                {
                    Type2.Add(type2);
                }
                else if (bsaEntry is BSA_Type3 type3)
                {
                    Type3.Add(type3);
                }
                else if (bsaEntry is BSA_Type4 type4)
                {
                    Type4.Add(type4);
                }
                else if (bsaEntry is BSA_Type6 type6)
                {
                    Type6.Add(type6);
                }
                else if (bsaEntry is BSA_Type7 type7)
                {
                    Type7.Add(type7);
                }
                else if (bsaEntry is BSA_Type8 type8)
                {
                    Type8.Add(type8);
                }
            }
        }
Esempio n. 4
0
 private class Requires8 { public Requires8(Type1 p1, Type2 p2, Type3 p3, Type4 p4, Type5 p5, Type6 p6, Type7 p7, Type8 p8)
                           {
                           }