public Header(MpqFileStream stream) { DeadBeef = stream.ReadInt32(); SnoType = stream.ReadInt32(); unknown1 = stream.ReadInt32(); unknown2 = stream.ReadInt32(); }
public TagMap(MpqFileStream stream) { tagmapsize = stream.ReadInt32(); TagMapEntry = new TagMapEntry[tagmapsize]; for (int i = 0; i < tagmapsize; i++) { TagMapEntry[i] = new TagMapEntry(stream); } }
public Vector2D(MpqFileStream stream) { Field0 = stream.ReadInt32(); FIeld1 = stream.ReadInt32(); }
public SerializeData(MpqFileStream stream) { Offset = stream.ReadInt32(); Size = stream.ReadInt32(); }
public WeightedLook(MpqFileStream stream) { byte[] buf = new byte[64]; stream.Read(buf, 0, 64); LookLink = Encoding.ASCII.GetString(buf); i0 = stream.ReadInt32(); }
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); } }
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(); }
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 } }
public NavMeshSquare(MpqFileStream stream) { f0 = stream.ReadFloat(); Flags = stream.ReadInt32(); }
public Marker(MpqFileStream stream) { byte[] buf = new byte[128]; stream.Read(buf, 0, 128); Name = Encoding.ASCII.GetString(buf); i0 = stream.ReadInt32(); PRTransform = new PRTransform(stream); SNOName = new SNOName(stream); serTagMap = new SerializeData(stream); TagMap = stream.ReadInt32(); i1 = stream.ReadInt32(); i2 = stream.ReadInt32(); serMarkerLinks = new SerializeData(stream); stream.Position += (3 * 4); long x = stream.Position; if (serTagMap.Size > 0) { stream.Position = serTagMap.Offset + 16; TM = new TagMap(stream); } stream.Position = x; }
public TagMapEntry(MpqFileStream stream) { i0 = stream.ReadInt32(); i1 = stream.ReadInt32(); f0 = stream.ReadFloat(); }
public SNOName(MpqFileStream stream) { int0 = stream.ReadInt32(); int1 = stream.ReadInt32(); }