Esempio n. 1
0
        public static Formats.Animation.AnimGroup ParseAnimGroup(this SsbhParser parser)
        {
            var result = new Formats.Animation.AnimGroup();

            result.Type = (Formats.Animation.AnimType)parser.ReadUInt64();
            {
                // TODO: Extract this code to a method?
                long absoluteOffset   = parser.ReadRelativeGetAbsoluteOffset();
                long elementCount     = parser.ReadInt64();
                long previousPosition = parser.Position;
                parser.Seek(absoluteOffset);


                result.Nodes = new Formats.Animation.AnimNode[elementCount];
                for (int i = 0; i < elementCount; i++)
                {
                    result.Nodes[i] = parser.ParseAnimNode();
                }

                parser.Seek(previousPosition);
            }
            return(result);
        }