public void Read(BinaryReader reader) { this.mapHeaderSignature = reader.ReadInt32(); this.engineVersion = reader.ReadInt32(); this.fileSize = reader.ReadInt32(); this.scenarioPointer = reader.ReadInt32(); this.indexOffset = reader.ReadInt32(); this.indexSize = reader.ReadInt32(); this.metaTableSize = reader.ReadInt32(); this.nonRawSize = reader.ReadInt32(); this.padding1 = reader.ReadBytes(PaddingAttribute.GetPaddingFieldSize(this.GetType(), "padding1")); this.buildDate = reader.ReadString32(); this.mapType = (MapType)reader.ReadInt32(); this.padding2 = reader.ReadBytes(PaddingAttribute.GetPaddingFieldSize(this.GetType(), "padding2")); this.crazyOffset = reader.ReadInt32(); this.crazySize = reader.ReadInt32(); this.stringIdPaddedTableOffset = reader.ReadInt32(); this.stringIdCount = reader.ReadInt32(); this.stringIdTableSize = reader.ReadInt32(); this.stringIdIndexOffset = reader.ReadInt32(); this.stringIdTableOffset = reader.ReadInt32(); this.padding3 = reader.ReadBytes(PaddingAttribute.GetPaddingFieldSize(this.GetType(), "padding3")); this.mapName = reader.ReadString32(); this.padding4 = reader.ReadInt32(); this.mapScenario = reader.ReadString256(); this.padding5 = reader.ReadInt32(); this.tagCount = reader.ReadInt32(); this.fileTableOffset = reader.ReadInt32(); this.fileTableSize = reader.ReadInt32(); this.fileTableIndexOffset = reader.ReadInt32(); this.checksum = reader.ReadInt32(); this.padding6 = reader.ReadBytes(PaddingAttribute.GetPaddingFieldSize(this.GetType(), "padding6")); this.mapFooterSignature = reader.ReadInt32(); }
public static String256 ReadString256(this BinaryReader reader) { // Read a String256 object from the stream. String256 @string = new String256(); @string.value = reader.ReadChars(String256.kSizeOf); return(@string); }
public static void Write(this BinaryWriter writer, String256 @string) { // Write a String256 object to the stream. writer.Write(@string.value); }
public GlobalUiMultiplayerLevelBlock(BinaryReader binaryReader) { this.mapID = binaryReader.ReadInt32(); this.bitmap = binaryReader.ReadTagReference(); this.skip = binaryReader.ReadBytes(576); this.skip0 = binaryReader.ReadBytes(2304); this.path = binaryReader.ReadString256(); this.sortOrder = binaryReader.ReadInt32(); this.flags = (Flags)binaryReader.ReadByte(); this.padding1 = binaryReader.ReadBytes(3); this.maxTeamsNone = binaryReader.ReadByte(); this.maxTeamsCTF = binaryReader.ReadByte(); this.maxTeamsSlayer = binaryReader.ReadByte(); this.maxTeamsOddball = binaryReader.ReadByte(); this.maxTeamsKOTH = binaryReader.ReadByte(); this.maxTeamsRace = binaryReader.ReadByte(); this.maxTeamsHeadhunter = binaryReader.ReadByte(); this.maxTeamsJuggernaut = binaryReader.ReadByte(); this.maxTeamsTerritories = binaryReader.ReadByte(); this.maxTeamsAssault = binaryReader.ReadByte(); this.maxTeamsStub10 = binaryReader.ReadByte(); this.maxTeamsStub11 = binaryReader.ReadByte(); this.maxTeamsStub12 = binaryReader.ReadByte(); this.maxTeamsStub13 = binaryReader.ReadByte(); this.maxTeamsStub14 = binaryReader.ReadByte(); this.maxTeamsStub15 = binaryReader.ReadByte(); }
public GScenarioEditorFolderBlock(BinaryReader binaryReader) { this.parentFolder = binaryReader.ReadLongBlockIndex1(); this.name = binaryReader.ReadString256(); }
public EditorCommentBlock(BinaryReader binaryReader) { this.position = binaryReader.ReadVector3(); this.type = (Type)binaryReader.ReadInt32(); this.name = binaryReader.ReadString32(); this.comment = binaryReader.ReadString256(); }
public GlobalTagImportInfoBlock(BinaryReader binaryReader) { this.build = binaryReader.ReadInt32(); this.version = binaryReader.ReadString256(); this.importDate = binaryReader.ReadString32(); this.culprit = binaryReader.ReadString32(); this.padding = binaryReader.ReadBytes(96); this.importTime = binaryReader.ReadString32(); this.padding0 = binaryReader.ReadBytes(4); this.files = ReadFiles(binaryReader); this.padding1 = binaryReader.ReadBytes(128); }
public TagImportFileBlock(BinaryReader binaryReader) { this.path = binaryReader.ReadString256(); this.modificationDate = binaryReader.ReadString32(); this.skip = binaryReader.ReadBytes(8); this.padding0 = binaryReader.ReadBytes(88); this.checksumCrc32 = binaryReader.ReadInt32(); this.sizeBytes = binaryReader.ReadInt32(); this.paddingzippedData = binaryReader.ReadBytes(8); this.padding1 = binaryReader.ReadBytes(128); }
public GlobalErrorReportCategoriesBlock(BinaryReader binaryReader) { this.name = binaryReader.ReadString256(); this.reportType = (ReportType)binaryReader.ReadInt16(); this.flags = (Flags)binaryReader.ReadInt16(); this.padding = binaryReader.ReadBytes(2); this.padding0 = binaryReader.ReadBytes(2); this.padding1 = binaryReader.ReadBytes(404); this.reports = ReadReports(binaryReader); }
public GlobalTagImportInfoBlock(BinaryReader binaryReader) { this.build = binaryReader.ReadInt32(); this.version = binaryReader.ReadString256(); this.importDate = binaryReader.ReadString32(); this.culprit = binaryReader.ReadString32(); this.padding = binaryReader.ReadBytes(96); this.importTime = binaryReader.ReadString32(); this.padding0 = binaryReader.ReadBytes(4); { var elementSize = Marshal.SizeOf(typeof(TagImportFileBlock)); var blamPointer = binaryReader.ReadBlamPointer(elementSize); this.files = new TagImportFileBlock[blamPointer.Count]; using (binaryReader.BaseStream.Pin()) { for (int i = 0; i < blamPointer.Count; ++i) { binaryReader.BaseStream.Position = blamPointer[i]; this.files[i] = new TagImportFileBlock(binaryReader); } } } this.padding1 = binaryReader.ReadBytes(128); }
public GlobalErrorReportCategoriesBlock(BinaryReader binaryReader) { this.name = binaryReader.ReadString256(); this.reportType = (ReportType)binaryReader.ReadInt16(); this.flags = (Flags)binaryReader.ReadInt16(); this.padding = binaryReader.ReadBytes(2); this.padding0 = binaryReader.ReadBytes(2); this.padding1 = binaryReader.ReadBytes(404); { var elementSize = Marshal.SizeOf(typeof(ErrorReportsBlock)); var blamPointer = binaryReader.ReadBlamPointer(elementSize); this.reports = new ErrorReportsBlock[blamPointer.Count]; using (binaryReader.BaseStream.Pin()) { for (int i = 0; i < blamPointer.Count; ++i) { binaryReader.BaseStream.Position = blamPointer[i]; this.reports[i] = new ErrorReportsBlock(binaryReader); } } } }