public static JBSCGroup readStream(BeBinaryReader br) { var length = br.ReadInt32(); var seqPointers = Helpers.readInt32Array(br, length); var newGroup = new JBSCGroup(); newGroup.count = length; newGroup.sequences = new Dictionary <int, byte[]>(); for (int i = 0; i < seqPointers.Length; i++) { br.BaseStream.Position = seqPointers[i]; newGroup.sequences[i] = readUntilSequenceEnd(br); } return(newGroup); }
public static JBSC readStream(BeBinaryReader br, JBST jbst) { br.ReadInt32(); // skip head lol var newBSC = new JBSC(); newBSC.size = br.ReadInt32(); newBSC.groups = new JBSCGroup[jbst.sections[0].groups.Length]; var sectionPointers = Helpers.readInt32Array(br, jbst.sections[0].groups.Length); for (int i = 0; i < newBSC.groups.Length; i++) { br.BaseStream.Position = sectionPointers[i]; Console.WriteLine(sectionPointers[i]); newBSC.groups[i] = JBSCGroup.readStream(br); } return(newBSC); }