Esempio n. 1
0
        public MarkerSet(MpqFile file)
        {
            var stream = file.Open();
            Header = new Header(stream);
            SNO = stream.ReadInt32();
            unknown0 = stream.ReadInt32();
            unknown1 = stream.ReadInt32();
            serMarkers = new SerializeData(stream);
            long x = stream.Position;
            Markers = new Marker[serMarkers.Size / 208];
            stream.Position = serMarkers.Offset + 16;
            for (int i = 0; i < serMarkers.Size / 208; i++)
            {
                Markers[i] = new Marker(stream);
            }
            stream.Position = x;
            stream.Position += (15 * 4); // pad 15
            serNoSpawns = new SerializeData(stream);
            stream.Position += (14 * 4);
            aabb = new AABB_(stream);
            i0 = stream.ReadInt32();
            byte[] buf = new byte[256];
            stream.Read(buf, 0, 256); filename = Encoding.ASCII.GetString(buf);
            nLabel = stream.ReadInt32();
            nSpecialIndexCount = stream.ReadInt32();
            serSpecialIndexList = new SerializeData(stream);

                stream.Close();
        }
Esempio n. 2
0
        public Scene(MpqFile file)
        {
            var stream = file.Open();

            long pos = 0; // x
            DEADBEEF = stream.ReadInt32();
            snoType = stream.ReadInt32();
            unknown1 = stream.ReadInt32();
            unknown2 = stream.ReadInt32();
            SceneSNO = stream.ReadInt32();
            unknown3 = stream.ReadInt32();
            unknown4 = stream.ReadInt32();
            i0 = stream.ReadInt32();
            aabbBounds = new AABB_(stream);
            aabbMarkerSetBounds = new AABB_(stream);

            //load NavMeshDef
            NavMesh = new NavMeshDef(stream);
            // end navmeshdef
            var serExclusions = new SerializeData(stream);
            stream.Position += 56;
            var serInclusions = new SerializeData(stream);
            stream.Position += 56;

            //MarkerSet Time
            var serMarkerSets = new SerializeData(stream);
            pos = stream.Position;
            stream.Position = serMarkerSets.Offset + 16;
            MarkerSets = new int[serMarkerSets.Size/4];
            for (int i = 0; i < serMarkerSets.Size/4; i++)
            {
                MarkerSets[i] = stream.ReadInt32();
            }
            stream.Position = pos + 56;

            //TODO - parse LookLink /dark
            LookLink = new char[64];
            for (int i = 0; i < 64; i++)
            {
                LookLink[i] = (char) stream.ReadByte();
            }

            var sermsgTriggeredEvents = new SerializeData(stream);
            int i1 = stream.ReadInt32();
            stream.Position += 12;

            //navzonedef
            NavZone = new NavZoneDef(stream);

            stream.Close();
        }
Esempio n. 3
0
        // Updated based on BoyC's 010editoer template, looks like some data at the end still isnt parsed - Darklotus
        public Actor(MpqFile file)
        {
            var stream = file.Open();
            Header = new Header(stream);
            this.ActorSNO = stream.ReadInt32();
            stream.Position += 8; // pad 2;
            this.i0 = stream.ReadInt32();
            this.type = stream.ReadInt32();
            this.ApperanceSNO = stream.ReadInt32();
            this.snoPhysMesh = stream.ReadInt32();
            this.Cyl = new AxialCylinder(stream);
            this.s = new Sphere(stream);
            this.aabbBounds = new AABB_(stream);
            this.serTagMap = new SerializeData(stream);
            stream.Position += 8; // pad 2
            this.AnimSetSNO = stream.ReadInt32();
            this.MonsterSNO = stream.ReadInt32();
            this.serMsgTriggeredEvents = new SerializeData(stream);

            this.i1 = stream.ReadInt32();
            stream.Position += 12; // pad 3 int - DarkLotus
            this.v0 = new Vector3D(stream.ReadFloat(), stream.ReadFloat(), stream.ReadFloat());
            this.Looks = new WeightedLook[8];
            for (int i = 0; i < 8; i++)
            {
                this.Looks[i] = new WeightedLook(stream);
            }
            this.PhysicsSNO = stream.ReadInt32();
            this.i2 = stream.ReadInt32(); this.i3 = stream.ReadInt32();
            this.f0 = stream.ReadFloat(); this.f1 = stream.ReadFloat(); this.f2 = stream.ReadFloat();
            this.padActorCollisionData = new int[17]; // Was 68/4 - Darklotus 
            for (int i = 0; i < 17; i++)
            {
                this.padActorCollisionData[i] = stream.ReadInt32();
            }
            this.padInventoryImages = new int[10]; //Was 5*8/4 - Darklotus
            for (int i = 0; i < 10; i++)
            {
                this.padInventoryImages[i] = stream.ReadInt32();
            }
            stream.Close();
        }