private void MemoryPreset(SubCode subCode) { if (this.colorTable.Count <= 0) { return; } MemoryPreset memoryPreset = new MemoryPreset(subCode.Data.ToArray(), this.colorTable); if (memoryPreset.Repeat != 0) { return; } Console.WriteLine("Clearing screen to: {0}", memoryPreset.Color); int count = 0; for (int x = 0; x < FullWidth; x++) { for (int y = 0; y < FullHeight; y++) { if (this.newPixels.Count <= count) { this.newPixels.Add(new Pixel(new Point(x, y), memoryPreset.Color)); } else { this.newPixels[count] = new Pixel(new Point(x, y), memoryPreset.Color); } count++; } } }
private void BorderPreset(SubCode subCode) { if (this.colorTable.Count > 0) { MemoryPreset memoryPreset = new MemoryPreset(subCode.Data.ToArray(), this.colorTable); Console.WriteLine("Clearing border to: {0}", memoryPreset.Color); int count = 0; for (int x = 0; x < FullWidth; x++) { for (int y = 0; y < FullHeight; y++) { Pixel pixel = new Pixel(new Point(x, y), memoryPreset.Color); if (this.innerFrame.Contains(pixel.Location)) { continue; } this.newPixels.Add(pixel); count++; } } } }