예제 #1
0
        public void LoadBodySetup(int setup)
        {
            if (setup == -1)
            {
                return;
            }
            BodySetup = setup - 1;
            if (BodySetup < 0 || BodySetup >= Pcc.Header.ExportCount)
            {
                return;
            }
            byte[]       buff = Pcc.EntryToBuff(BodySetup);
            string       c    = Pcc.getClassName(Pcc.Export[BodySetup].Class);
            UnrealObject UOb  = new UnrealObject(buff, c, Pcc.names);
            string       l    = Path.GetDirectoryName(Application.ExecutablePath);

            if (File.Exists(l + "\\exec\\DefaultProp.xml"))
            {
                UOb.UUkn.UPR.ImportDefinitionsXML(l + "\\exec\\DefaultProp.xml");
            }
            List <UPropertyReader.Property> p = UOb.UUkn.Properties;

            for (int i = 0; i < p.Count; i++)
            {
            }
        }
예제 #2
0
        public void LoadLevelObjects(Device d, RichTextBox Rtb = null)
        {
            rtb         = Rtb;
            device      = d;
            UStatComp   = new List <UStaticMeshComponent>();
            UStatActors = new List <UStaticMeshActor>();
            UStatColl   = new List <UStaticMeshCollectionActor>();
            UIntAct     = new List <UInterpActor>();
            UStat       = new List <UStaticMesh>();
            Tex         = new List <TextureEntry>();
            TextOut("Loading Level Objects...\n");
            for (int i = 0; i < LObjects.Count; i++)
            {
                switch (LObjects[i].cls)
                {
                case "StaticMeshActor":
                    UStaticMeshActor t = new UStaticMeshActor(pcc.EntryToBuff(LObjects[i].entry), pcc.names);
                    t.UPR = UPR;
                    t.Deserialize();
                    LevelProperties LP = new LevelProperties();
                    LP.source      = 0;
                    LP.sourceentry = LObjects[i].entry;
                    t.LP           = LP;
                    UStatActors.Add(t);
                    break;

                case "StaticMeshCollectionActor":
                    UStaticMeshCollectionActor t2 = new UStaticMeshCollectionActor(pcc.EntryToBuff(LObjects[i].entry), pcc);
                    t2.UPR = UPR;
                    t2.Deserialize();
                    LevelProperties LP2 = new LevelProperties();
                    LP2.source      = 1;
                    LP2.sourceentry = LObjects[i].entry;
                    t2.LP           = LP2;
                    UStatColl.Add(t2);
                    break;

                case "InterpActor":
                    UInterpActor t3 = new UInterpActor(pcc.EntryToBuff(LObjects[i].entry), pcc.names);
                    t3.UPR = UPR;
                    t3.Deserialize();
                    LevelProperties LP3 = new LevelProperties();
                    LP3.source      = 2;
                    LP3.sourceentry = LObjects[i].entry;
                    t3.LP           = LP3;
                    UIntAct.Add(t3);
                    break;
                }
            }
            TextOut("Loading Static Mesh Actors...\n");
            LoadStaticMeshActors();
            TextOut("Loading Static Mesh Collection Actors...\n");
            LoadStaticMeshCollectionActors();
            TextOut("Loading Interp Actors...\n");
            LoadInterpActors();
            TextOut("Loading Static Mesh Components...\n");
            LoadStaticMeshComponents();
            TextOut("Loading Static Meshes...\n");
            LoadStaticMesh();
            TextOut("Loading Textures...\n");
            LoadTextures();
            TextOut("\nDone");
        }