Exemplo n.º 1
0
        public static NesColorMapping FromFile(string path)
        {
            var result = new NesColorMapping();

            var bytes = File.ReadAllBytes(path);

            for (int colorId = 0; colorId < COLOR_COUNT; colorId++)
            {
                result.argbColors[colorId] = Color.FromArgb(
                    bytes[colorId * 3 + 0],
                    bytes[colorId * 3 + 1],
                    bytes[colorId * 3 + 2]
                    );
            }

            return(result);
        }
Exemplo n.º 2
0
 public Color AsArgbColor(NesColorMapping mapping)
 {
     return(mapping.Get(Id));
 }