Пример #1
0
        public void SetFromTreeNodes(TreeNode Root)
        {
            InteriorColors = new CarInteriorColorsItem[Root.Nodes.Count];

            for (int i = 0; i < InteriorColors.Length; i++)
            {
                TreeNode ChildNode          = Root.Nodes[i];
                CarInteriorColorsItem Entry = (CarInteriorColorsItem)ChildNode.Tag;
                InteriorColors[i] = Entry;
            }
        }
Пример #2
0
        public void ReadFromFile(BinaryReader reader)
        {
            unk0 = reader.ReadUInt32();
            uint count0 = reader.ReadUInt32();
            uint count1 = reader.ReadUInt32();

            colors = new CarInteriorColorsItem[count0];

            for (int i = 0; i < count1; i++)
            {
                CarInteriorColorsItem item = new CarInteriorColorsItem();
                item.CarID = reader.ReadInt32();
                item.R1    = reader.ReadByte();
                item.G1    = reader.ReadByte();
                item.B1    = reader.ReadByte();
                item.R2    = reader.ReadByte();
                item.G2    = reader.ReadByte();
                item.B2    = reader.ReadByte();
                item.R3    = reader.ReadByte();
                item.G3    = reader.ReadByte();
                item.B3    = reader.ReadByte();
                item.R4    = reader.ReadByte();
                item.G4    = reader.ReadByte();
                item.B4    = reader.ReadByte();
                item.R5    = reader.ReadByte();
                item.G5    = reader.ReadByte();
                item.B5    = reader.ReadByte();

                // M1: DE only.
                if (gameVersion == GamesEnumerator.MafiaI_DE)
                {
                    item.Alpha = reader.ReadByte();
                }

                item.Desc = reader.ReadInt32();

                colors[i] = item;
            }
        }