Exemple #1
0
        internal override void Write(BinaryWriterEx bw)
        {
            Entries entries;

            entries.Models = Models.GetEntries();
            List <Event> events = Events.GetEntries();

            entries.Regions = Regions.GetEntries();
            List <Route> routes = Routes.GetEntries();

            entries.Parts = Parts.GetEntries();

            foreach (Event evt in events)
            {
                evt.GetIndices(entries);
            }
            foreach (Region region in entries.Regions)
            {
                region.GetIndices(entries);
            }
            foreach (Part part in entries.Parts)
            {
                part.GetIndices(this, entries);
            }

            bw.WriteASCII("MSB ");
            bw.WriteInt32(1);
            bw.WriteInt32(0x10);
            bw.WriteBoolean(false);
            bw.WriteBoolean(false);
            bw.WriteByte(1);
            bw.WriteByte(0xFF);

            Models.Write(bw, entries.Models);
            bw.FillInt64("NextParamOffset", bw.Position);
            Events.Write(bw, events);
            bw.FillInt64("NextParamOffset", bw.Position);
            Regions.Write(bw, entries.Regions);
            bw.FillInt64("NextParamOffset", bw.Position);
            Routes.Write(bw, routes);
            bw.FillInt64("NextParamOffset", bw.Position);
            Layers.Write(bw, Layers.GetEntries());
            bw.FillInt64("NextParamOffset", bw.Position);
            Parts.Write(bw, entries.Parts);
            bw.FillInt64("NextParamOffset", bw.Position);
            PartsPoses.Write(bw, Layers.GetEntries());
            bw.FillInt64("NextParamOffset", bw.Position);
            BoneNames.Write(bw, Layers.GetEntries());
            bw.FillInt64("NextParamOffset", 0);
        }