示例#1
0
        private void btnTFShorties_Click(object sender, EventArgs e)
        {
            ColorPart skin      = xccDefaults.Where(x => x.name == "Skin").FirstOrDefault();
            ColorPart legbottom = xccDefaults.Where(x => x.name == "Leg Bottom").FirstOrDefault();

            legbottom.light = skin.light;
            legbottom.dark  = skin.dark;

            ApplyAllColors();
        }
示例#2
0
        private void btnTFSCCSleeves_Click(object sender, EventArgs e)
        {
            ColorPart skin = xccDefaults.Where(x => x.name == "Skin").FirstOrDefault();
            ColorPart arm  = xccDefaults.Where(x => x.name == "Arms").FirstOrDefault();

            arm.light = skin.light;
            arm.dark  = skin.dark;

            ApplyAllColors();
        }
示例#3
0
        public static void WriteColorPart(ColorPart cPart)
        {
            byte[] colors_L = new byte[4];
            byte[] colors_D = new byte[4];

            colors_L[0] = cPart.light.R;
            colors_L[1] = cPart.light.G;
            colors_L[2] = cPart.light.B;
            colors_L[3] = 0x0;

            colors_D[0] = cPart.dark.R;
            colors_D[1] = cPart.dark.G;
            colors_D[2] = cPart.dark.B;
            colors_D[3] = 0x0;

            long seg04addr = SegmentedToVirtual(0x04000000, true);

            WriteBytes(seg04addr + cPart.offset_86, SwapEndian(colors_L, 4));
            WriteBytes(seg04addr + cPart.offset_88, SwapEndian(colors_D, 4));
        }
示例#4
0
        private void btnTFShirtPants_Click(object sender, EventArgs e)
        {
            ColorPart shirt   = xccDefaults.Where(x => x.name == "Shirt").FirstOrDefault();
            ColorPart overall = xccDefaults.Where(x => x.name == "Overalls Top").FirstOrDefault();

            IEnumerable <ColorPart> shirtTransform   = xccDefaults.Where(x => x.name == "Arms" || x.name == "Shoulders" || x.name == "Overalls Top");
            IEnumerable <ColorPart> overallTransform = xccDefaults.Where(x => x.name.StartsWith("Leg") || x.name == "Overalls Bottom");

            foreach (ColorPart cp in overallTransform)
            {
                cp.light = overall.light;
                cp.dark  = overall.dark;
            }

            foreach (ColorPart cp in shirtTransform)
            {
                cp.light = shirt.light;
                cp.dark  = shirt.dark;
            }
            ApplyAllColors();
        }