Exemplo n.º 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);
        }
Exemplo n.º 2
0
        protected override Stream UnParse()
        {
            MemoryStream ms = new MemoryStream();
            BinaryWriter w  = new BinaryWriter(ms);

            w.Write(this.version);
            w.Write((uint)this.ageGender);
            w.Write(this.groupingID);
            w.Write(this.unknown1);
            w.Write(this.simOutfitReference);
            w.Write(this.textureReference);
            w.Write(this.simDataReference);
            w.Write(this.nameHash);
            w.Write(this.descHash);
            this.unknown2.UnParse(ms);
            w.Write(this.unknown3);
            w.Write(this.animationReference1);
            w.Write(Encoding.ASCII.GetByteCount(this.animationStateName1));
            w.Write(Encoding.ASCII.GetBytes(this.animationStateName1));
            w.Write(this.animationReference2);
            w.Write(Encoding.ASCII.GetByteCount(this.animationStateName2));
            w.Write(Encoding.ASCII.GetBytes(this.animationStateName2));
            if (this.colorList == null)
            {
                this.colorList = new CASPartResource.SwatchColorList(OnResourceChanged);
            }
            this.colorList.UnParse(ms);
            if (this.flagList == null)
            {
                this.flagList = new CASPartResource.FlagList(OnResourceChanged);
            }
            this.flagList.UnParse(ms);
            ms.Position = 0;
            return(ms);
        }
Exemplo n.º 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();
        }
Exemplo n.º 4
0
        void Parse(Stream s)
        {
            BinaryReader r = new BinaryReader(s);

            s.Position               = 0;
            this.version             = r.ReadUInt32();
            this.ageGender           = (AgeGenderFlags)r.ReadUInt32();
            this.groupingID          = r.ReadUInt64();
            this.unknown1            = r.ReadByte();
            this.simOutfitReference  = r.ReadUInt64();
            this.textureReference    = r.ReadUInt64();
            this.simDataReference    = r.ReadUInt64();
            this.nameHash            = r.ReadUInt32();
            this.descHash            = r.ReadUInt32();
            this.unknown2            = new DataBlobHandler(recommendedApiVersion, OnResourceChanged, r.ReadBytes(14));
            this.unknown3            = r.ReadUInt32();
            this.animationReference1 = r.ReadUInt64();
            this.animationStateName1 = System.Text.Encoding.ASCII.GetString(r.ReadBytes(r.ReadInt32()));
            this.animationReference2 = r.ReadUInt64();
            this.animationStateName2 = System.Text.Encoding.ASCII.GetString(r.ReadBytes(r.ReadInt32()));
            this.colorList           = new CASPartResource.SwatchColorList(OnResourceChanged, s);
            this.flagList            = new CASPartResource.FlagList(OnResourceChanged, s);
        }