protected override void ReadMembers(SR1_Reader reader, SR1_Structure parent) { foreach (KeyValuePair <uint, SR1_Pointer <SFXFileData> > pointer in reader.SFXDictionary) { data.Add(new SFXFileData()); } data.Read(reader, this, "data"); }
protected override void ReadMembers(SR1_Reader reader, SR1_Structure parent) { numPortals.Read(reader, this, "numPortals"); for (int i = 0; i < numPortals.Value; i++) { portals.Add(new StreamUnitPortal()); } portals.Read(reader, this, "portals"); pad.Read(reader, this, "pad"); }
protected override void ReadMembers(SR1_Reader reader, SR1_Structure parent) { for (int i = 0; i < _NumObjects; i++) { VMObjects.Add(new VMObject()); } VMObjects.Read(reader, this, "VMObjects"); VMOffsetTableLists.Read(reader, this, "VMOffsetTableLists"); VMVertexLists.Read(reader, this, "VMVertexLists"); VMInterpolatedLists.Read(reader, this, "VMInterpolatedLists"); uint mod = VMInterpolatedLists.End % 4; if (mod > 0) { uint padding = 4 - mod; pad0 = new SR1_PrimativeArray <byte>((int)padding); } pad0.Read(reader, this, "pad0"); VMObjectNames.Read(reader, this, "VMObjectNames"); mod = VMObjectNames.End % 4; if (mod > 0) { uint padding = 4 - mod; pad1 = new SR1_PrimativeArray <byte>((int)padding); } pad1.Read(reader, this, "pad1"); SortedDictionary <uint, SR1_PointerBase> dictionary = new SortedDictionary <uint, SR1_PointerBase>(); foreach (SR1_PointerArray tableList in VMOffsetTableLists) { foreach (SR1_PointerBase tablePointer in tableList) { if (tablePointer.Offset != 0 && !dictionary.ContainsKey(tablePointer.Offset)) { dictionary.Add(tablePointer.Offset, tablePointer); } } } foreach (SR1_PointerBase tablePointer in dictionary.Values) { VMOffsetTable vmOffsetTable = (VMOffsetTable)tablePointer.CreateObject(tablePointer, reader); VMOffsetTables.Add(vmOffsetTable); } VMOffsetTables.Read(reader, this, "VMOffsetTables"); }
protected override void ReadMembers(SR1_Reader reader, SR1_Structure parent) { numSignals.Read(reader, this, "numSignals"); signalNum.Read(reader, this, "signalNum"); flags.Read(reader, this, "flags"); for (int i = 0; i < numSignals.Value; i++) { signalList.Add(new Signal()); } signalList.Read(reader, this, "signalList"); pad.Read(reader, this, "pad"); }
protected override void ReadMembers(SR1_Reader reader, SR1_Structure parent) { PhysObDraftProperties temp = new PhysObDraftProperties(); // The first one was already added, and there will be at least that one, so skip to the next. temp.TestRange(reader); // Normally 13 in the list. while (temp.TestRange(reader)) { physObDraftProperties.Add(new PhysObDraftProperties()); } reader.BaseStream.Position = Start; physObDraftProperties.Read(reader, this, "physObDraftProperties"); }