public static Formats.Animation.AnimNode ParseAnimNode(this SsbhParser parser) { var result = new Formats.Animation.AnimNode(); result.Name = parser.ReadOffsetReadString(); { // TODO: Extract this code to a method? long absoluteOffset = parser.ReadRelativeGetAbsoluteOffset(); long elementCount = parser.ReadInt64(); long previousPosition = parser.Position; parser.Seek(absoluteOffset); result.Tracks = new Formats.Animation.AnimTrack[elementCount]; for (int i = 0; i < elementCount; i++) { result.Tracks[i] = parser.ParseAnimTrack(); } parser.Seek(previousPosition); } return(result); }