Exemplo n.º 1
0
 public AABB(MpqFileStream stream)
 {
     this.Min = new Vector3D(stream.ReadFloat(), stream.ReadFloat(), stream.ReadFloat());
     this.Max = new Vector3D(stream.ReadFloat(), stream.ReadFloat(), stream.ReadFloat());
 }
Exemplo n.º 2
0
 public Sphere(MpqFileStream stream)
 {
     Position = new Vector3D(stream.ReadFloat(), stream.ReadFloat(), stream.ReadFloat());
     Radius = stream.ReadFloat();
 }
Exemplo n.º 3
0
 public AxialCylinder(MpqFileStream stream)
 {
     this.Position = new Vector3D(stream.ReadFloat(), stream.ReadFloat(), stream.ReadFloat());
     ax1 = stream.ReadFloat();
     ax2 = stream.ReadFloat();
 }
Exemplo n.º 4
0
 public NavCell(MpqFileStream stream)
 {
     Min = new Vector3D(stream.ReadFloat(), stream.ReadFloat(), stream.ReadFloat());
     Max = new Vector3D(stream.ReadFloat(), stream.ReadFloat(), stream.ReadFloat());
     Flags = stream.ReadInt16();
     NeighbourCount = stream.ReadInt16();
     NeighborsIndex = stream.ReadInt32();
 }
Exemplo n.º 5
0
            public NavZoneDef(MpqFileStream stream)
            {
                long x;
                int NavCellCount = stream.ReadInt32();
                stream.Position += 12;

                var serNavCells = new SerializeData(stream);
                x = stream.Position;
                stream.Position = serNavCells.Offset + 16;

                //Navcells
                NavCells = new NavCell[NavCellCount];
                for (int i = 0; i < NavCellCount; i++)
                {
                    NavCells[i] = new NavCell(stream);
                }
                stream.Position = x;

                //NavCellLookups
                int NeighbourCount = stream.ReadInt32();
                stream.Position += 12;
                var serNavCellNeighbours = new SerializeData(stream);
                x = stream.Position;
                stream.Position = serNavCellNeighbours.Offset + 16;
                NavCellNeighbours = new NavCellLookup[NeighbourCount];
                for (int i = 0; i < NeighbourCount; i++)
                {
                    NavCellNeighbours[i] = new NavCellLookup(stream);
                }
                stream.Position = x;

                //NavGridSquares
                float f0 = stream.ReadFloat();
                float f1 = stream.ReadFloat();
                int i2 = stream.ReadInt32();
                var v0 = new Vector2D(stream);
                stream.Position += 12;
                var serGridSquares = new SerializeData(stream);
                x = stream.Position;
                stream.Position = serGridSquares.Offset + 16;
                GridSquares = new NavGridSquare[serGridSquares.Size/6];
                for (int i = 0; i < serGridSquares.Size/6; i++)
                {
                    GridSquares[i] = new NavGridSquare(stream);
                }
                stream.Position = x;

                //cell lookups
                int i3 = stream.ReadInt32();
                stream.Position += 12;
                var serCellLookups = new SerializeData(stream);
                x = stream.Position;
                stream.Position = serCellLookups.Offset + 16;
                CellLookups = new NavCellLookup[serCellLookups.Size/4];
                for (int i = 0; i < serCellLookups.Size/4; i++)
                {
                    CellLookups[i] = new NavCellLookup(stream);
                }
                stream.Position = x;

                //borderdata
                int i4 = stream.ReadInt32();
                stream.Position += 12;
                var serBorderData = new SerializeData(stream);
                x = stream.Position;
                stream.Position = serBorderData.Offset + 16;
                BorderData = new NavCellBorderData[serBorderData.Size/4];
                for (int i = 0; i < serBorderData.Size/4; i++)
                {
                    BorderData[i] = new NavCellBorderData(stream);
                }
            }
Exemplo n.º 6
0
            public NavMeshDef(MpqFileStream stream)
            {
                SquaresCountX = stream.ReadInt32();
                SquaresCoountY = stream.ReadInt32();
                i0 = stream.ReadInt32();
                NavMeshSquareCount = stream.ReadInt32();
                f0 = stream.ReadFloat();
                serNavMeshArraySquares = new SerializeData(stream);
                long x = stream.Position;
                stream.Position = serNavMeshArraySquares.Offset + 16;

                NavMeshArraySquares = new NavMeshSquare[NavMeshSquareCount];
                for (int i = 0; i < NavMeshSquareCount; i++)
                {
                    NavMeshArraySquares[i] = new NavMeshSquare(stream);
                }

                stream.Position = x;
                stream.Position += 12;
                filename = new char[256];

                for (int i = 0; i < 256; i++)
                {
                    filename[i] = (char) stream.ReadByte(); // fix me / dark
                }
            }
Exemplo n.º 7
0
 public NavMeshSquare(MpqFileStream stream)
 {
     f0 = stream.ReadFloat();
     Flags = stream.ReadInt32();
 }
Exemplo n.º 8
0
		   public TagMapEntry(MpqFileStream stream)
		   {
			   i0 = stream.ReadInt32();
			   i1 = stream.ReadInt32();
			   f0 = stream.ReadFloat();
		   }
Exemplo n.º 9
0
		public PRTransform(MpqFileStream stream)
		{
			Quaternion0 = new Quaternion(stream);
			Vector3D1 = new Vector3D(stream.ReadFloat(), stream.ReadFloat(), stream.ReadFloat());
		}
Exemplo n.º 10
0
		public Quaternion(MpqFileStream stream)
		{
			float0 = stream.ReadFloat();
			Vector3D1 = new Vector3D(stream.ReadFloat(), stream.ReadFloat(), stream.ReadFloat());
		}