ImmutableArray <HitBoxSet> LoadHitBoxSets(Ibasa.IO.BinaryReader reader, int count) { long offset = reader.BaseStream.Position; HitBoxSet[] hitBoxSets = new HitBoxSet[count]; for (int i = 0; i < count; ++i) { reader.BaseStream.Position = offset; long nameOffset = offset + reader.ReadInt32(); int hitBoxCount = reader.ReadInt32(); long hitBoxOffset = offset + reader.ReadInt32(); offset = reader.BaseStream.Position; reader.BaseStream.Position = nameOffset; string name = LoadString(reader); reader.BaseStream.Position = hitBoxOffset; ImmutableArray <HitBox> hitBoxes = LoadHitBoxes(reader, hitBoxCount); hitBoxSets[i] = new HitBoxSet(name, hitBoxes); } return(new ImmutableArray <HitBoxSet>(hitBoxSets)); }
ImmutableArray<HitBoxSet> LoadHitBoxSets(Ibasa.IO.BinaryReader reader, int count) { long offset = reader.BaseStream.Position; HitBoxSet[] hitBoxSets = new HitBoxSet[count]; for (int i = 0; i < count; ++i) { reader.BaseStream.Position = offset; long nameOffset = offset + reader.ReadInt32(); int hitBoxCount = reader.ReadInt32(); long hitBoxOffset = offset + reader.ReadInt32(); offset = reader.BaseStream.Position; reader.BaseStream.Position = nameOffset; string name = LoadString(reader); reader.BaseStream.Position = hitBoxOffset; ImmutableArray<HitBox> hitBoxes = LoadHitBoxes(reader, hitBoxCount); hitBoxSets[i] = new HitBoxSet(name, hitBoxes); } return new ImmutableArray<HitBoxSet>(hitBoxSets); }