Пример #1
0
        public Animation(Stream thefile, DPOWObject dpow)
        {
            this.dpow = dpow;

            BinaryReader binfile = new BinaryReader(thefile);

            int  foff, eoff, noff;
            byte unb1, unb2;

            parent = binfile.ReadInt16();

            frames = new Frame[binfile.ReadInt16()];
            unk1   = binfile.ReadInt16();
            unb1   = binfile.ReadByte();
            unb2   = binfile.ReadByte();

            events = new Event[unb1];
            childs = new Child[unb2];

            untable = new byte[4];
            thefile.Read(untable, 0, 4);

            foff = binfile.ReadInt32();
            eoff = binfile.ReadInt32();
            noff = binfile.ReadInt32();

            thefile.Seek(foff, SeekOrigin.Begin);
            for (int j = 0; j < frames.Length; j++)
            {
                frames[j] = new Frame(binfile.ReadInt16(), binfile.ReadInt16(), this);
            }

            thefile.Seek(eoff, SeekOrigin.Begin);
            for (int j = 0; j < events.Length; j++)
            {
                events[j] = new Event(binfile.ReadInt16(), binfile.ReadInt16(), binfile.ReadInt16(), binfile.ReadInt16());
            }

            thefile.Seek(noff, SeekOrigin.Begin);
            for (int j = 0; j < childs.Length; j++)
            {
                childs[j] = new Child(binfile.ReadInt16(), binfile.ReadInt16());
            }
        }
Пример #2
0
 public void setDPOW(DPOWObject dpow)
 {
     this.dpow = dpow;
 }