Пример #1
0
        public static TopBackgroundSet Read(BinaryReader br, bool typeTwo)
        {
            var tbs = new TopBackgroundSet
            {
                Main = ColorRgb888.Read(br),
                Gradient = br.ReadByte(),
                TextureOpacity = br.ReadByte(),
                AlternateOpacity = typeTwo ? br.ReadByte() : (byte)0,
                GradientColor = typeTwo ? br.ReadByte() : (byte)0,
            };

            tbs.Main.B = Inflate(tbs.Main.B);
            tbs.Main.G = Inflate(tbs.Main.G);
            tbs.Main.R = Inflate(tbs.Main.R);
            tbs.Gradient = Inflate(tbs.Gradient);
            tbs.TextureOpacity = Inflate(tbs.TextureOpacity);
            tbs.AlternateOpacity = Inflate(tbs.AlternateOpacity);
            tbs.GradientColor = Inflate(tbs.GradientColor);

            return tbs;
        }
Пример #2
0
        public static TopBackgroundSet Read(BinaryReader br, bool typeTwo)
        {
            var tbs = new TopBackgroundSet
            {
                Main             = ColorRgb888.Read(br),
                Gradient         = br.ReadByte(),
                TextureOpacity   = br.ReadByte(),
                AlternateOpacity = typeTwo ? br.ReadByte() : (byte)0,
                GradientColor    = typeTwo ? br.ReadByte() : (byte)0,
            };

            tbs.Main.B           = Inflate(tbs.Main.B);
            tbs.Main.G           = Inflate(tbs.Main.G);
            tbs.Main.R           = Inflate(tbs.Main.R);
            tbs.Gradient         = Inflate(tbs.Gradient);
            tbs.TextureOpacity   = Inflate(tbs.TextureOpacity);
            tbs.AlternateOpacity = Inflate(tbs.AlternateOpacity);
            tbs.GradientColor    = Inflate(tbs.GradientColor);

            return(tbs);
        }
 public TopSolidSetViewModel(TopBackgroundSet model, string tag) : base(model, tag) { }