public BMCParser(EndianBinaryReader reader) { colorList = new List<ByteColorAlpha>(); short numColors = reader.ReadInt16At(40); reader.BaseStream.Position += 44; //int numColors = Helpers.Read16(data, 40); for (int i = 0; i < numColors; i++) { ByteColorAlpha tempCol = new ByteColorAlpha(); tempCol.R = reader.ReadByte(); tempCol.G = reader.ReadByte(); tempCol.B = reader.ReadByte(); tempCol.A = reader.ReadByte(); colorList.Add(tempCol); } }
void colorEditor_saveTheColors(List<ByteColorAlpha> editedColorList) { for (int i = 0; i <= editedColorList.Count - 1; i++) { byte[] temp = editedColorList[i].GetBytes(); ByteColorAlpha copiedColor = new ByteColorAlpha(temp); ColorList[i] = copiedColor; } }