Beispiel #1
0
        public UnrealObject(byte[] mem, string Uclass, PCCFile pcc)
        {
            objectclass = Uclass;
            names       = pcc.names;
            switch (objectclass)
            {
            case "Level":
                ULv = new ULevel(mem, pcc);
                break;

            case "StaticMeshCollectionActor":
                UStatCA = new UStaticMeshCollectionActor(mem, pcc);
                break;

            default:
                UUkn = new UnknownObject(mem, objectclass, names);
                break;
            }
        }
Beispiel #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");
        }