Пример #1
0
        protected override Stream UnParse()
        {
            MemoryStream ms = new MemoryStream();
            BinaryWriter w  = new BinaryWriter(ms);

            w.Write(this.version);
            w.Write(this.rleInstance);
            if (this.overlayList == null)
            {
                this.overlayList = new OverlayReferenceList(OnResourceChanged);
            }
            this.overlayList.UnParse(ms);
            w.Write(this.colorizeSaturation);
            w.Write(this.colorizeHue);
            w.Write(this.colorizeOpacity);
            if (this.flagList == null)
            {
                this.flagList = new CASPartResource.FlagList(OnResourceChanged);
            }
            flagList.UnParse(ms);
            w.Write(this.makeupOpacity);
            if (this.swatchList == null)
            {
                this.swatchList = new CASPartResource.SwatchColorList(OnResourceChanged);
            }
            this.swatchList.UnParse(ms);
            w.Write(this.sortOrder);
            w.Write(this.makeupOpacity2);
            return(ms);
        }
Пример #2
0
        protected override Stream UnParse()
        {
            MemoryStream ms = new MemoryStream();
            BinaryWriter w  = new BinaryWriter(ms);

            w.Write(this.version);
            w.Write(this.rleInstance);
            if (this.overlayList == null)
            {
                this.overlayList = new OverlayReferenceList(OnResourceChanged);
            }
            this.overlayList.UnParse(ms);
            w.Write(this.unknown1);
            w.Write(this.unknown2);
            if (this.unknownList == null)
            {
                this.unknownList = new SimpleList <uint>(OnResourceChanged);
            }
            w.Write(this.unknownList.Count);
            foreach (var i in this.unknownList)
            {
                w.Write(i);
            }
            w.Write(this.unknown3);
            if (this.swatchList == null)
            {
                this.swatchList = new SwatchColorList(OnResourceChanged);
            }
            this.swatchList.UnParse(ms);
            w.Write(this.unknown4);
            w.Write(this.unknown5);
            return(ms);
        }
Пример #3
0
        void Parse(Stream s)
        {
            BinaryReader r = new BinaryReader(s);

            s.Position              = 0;
            this.version            = r.ReadUInt32();
            this.rleInstance        = r.ReadUInt64();
            this.overlayList        = new OverlayReferenceList(OnResourceChanged, s);
            this.colorizeSaturation = r.ReadUInt16();
            this.colorizeHue        = r.ReadUInt16();
            this.colorizeOpacity    = r.ReadUInt32();
            flagList            = new CASPartResource.FlagList(OnResourceChanged, s);
            this.makeupOpacity  = r.ReadSingle();
            this.swatchList     = new CASPartResource.SwatchColorList(OnResourceChanged, s);
            this.sortOrder      = r.ReadSingle();
            this.makeupOpacity2 = r.ReadSingle();
        }
Пример #4
0
        void Parse(Stream s)
        {
            BinaryReader r = new BinaryReader(s);

            s.Position       = 0;
            this.version     = r.ReadUInt32();
            this.rleInstance = r.ReadUInt64();
            this.overlayList = new OverlayReferenceList(OnResourceChanged, s);
            this.unknown1    = r.ReadUInt32();
            this.unknown2    = r.ReadUInt32();
            int count = r.ReadInt32();

            this.unknownList = new SimpleList <uint>(OnResourceChanged);
            for (int i = 0; i < count; i++)
            {
                this.unknownList.Add(r.ReadUInt32());
            }
            this.unknown3   = r.ReadUInt32();
            this.swatchList = new SwatchColorList(OnResourceChanged, s);
            this.unknown4   = r.ReadUInt32();
            this.unknown5   = r.ReadUInt32();
        }
Пример #5
0
        private void Parse(Stream s)
        {
            BinaryReader reader = new BinaryReader(s);

            s.Position              = 0;
            this.version            = reader.ReadUInt32();
            this.rleInstance        = reader.ReadUInt64();
            this.overlayList        = new OverlayReferenceList(this.OnResourceChanged, s);
            this.colorizeSaturation = reader.ReadUInt16();
            this.colorizeHue        = reader.ReadUInt16();
            this.colorizeOpacity    = reader.ReadUInt32();
            if (this.version > 6)
            {
                this.flagList = new FlagList(this.OnResourceChanged, s);
            }
            else
            {
                this.flagList = FlagList.CreateWithUInt16Flags(this.OnResourceChanged, s, SkinToneResource.recommendedApiVersion);
            }
            this.makeupOpacity  = reader.ReadSingle();
            this.swatchList     = new SwatchColorList(this.OnResourceChanged, s);
            this.sortOrder      = reader.ReadSingle();
            this.makeupOpacity2 = reader.ReadSingle();
        }