internal static NullAnimation Read(Stream input, Endian endian)
        {
            var nullId  = input.ReadValueU32(endian);
            var visible = input.ReadValueB8();

            var frameCount = input.ReadValueU32(endian);

            if (frameCount >= 5000)
            {
                throw new FormatException("too many null frames");
            }
            var frames = new NullFrame[frameCount];

            for (uint i = 0; i < frameCount; i++)
            {
                frames[i] = NullFrame.Read(input, endian);
            }

            NullAnimation instance;

            instance.NullId  = nullId;
            instance.Visible = visible;
            instance.Frames  = frames;
            return(instance);
        }
Beispiel #2
0
        internal static RootAnimation Read(Stream input, Endian endian)
        {
            var frameCount = input.ReadValueU32(endian);

            if (frameCount >= 5000)
            {
                throw new FormatException("too many root frames");
            }

            var frames = new NullFrame[frameCount];

            for (uint i = 0; i < frameCount; i++)
            {
                frames[i] = NullFrame.Read(input, endian);
            }

            RootAnimation instance;

            instance.Frames = frames;
            return(instance);
        }