From 5d14a378f05dcb328c265e785c94a226a7b3c10a Mon Sep 17 00:00:00 2001 From: Determinant Date: Mon, 13 Nov 2017 17:43:41 -0500 Subject: ... --- src/main.rs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src/main.rs') diff --git a/src/main.rs b/src/main.rs index 112261d..8327d1d 100644 --- a/src/main.rs +++ b/src/main.rs @@ -75,7 +75,7 @@ impl SDLWindow { } } -const PIXEL_SIZE: u32 = 2; +const PIXEL_SIZE: u32 = 4; const COLORS: [u32; 64] = [ 0x666666, 0x002A88, 0x1412A7, 0x3B00A4, 0x5C007E, 0x6E0040, 0x6C0600, 0x561D00, 0x333500, 0x0B4800, 0x005200, 0x004F08, 0x00404D, 0x000000, 0x000000, 0x000000, @@ -95,7 +95,7 @@ fn get_rgb(color: u8) -> Color { impl ppu::Screen for SDLWindow { fn put(&self, x: u8, y: u8, color: u8) { let mut canvas = self.canvas.borrow_mut(); - //println!("put {} at {}, {}", color, x, y); + println!("put {} at {}, {}", color, x, y); canvas.set_draw_color(get_rgb(color)); canvas.draw_rect(Rect::new((x as u32 * PIXEL_SIZE) as i32, (y as u32 * PIXEL_SIZE) as i32, @@ -105,6 +105,7 @@ impl ppu::Screen for SDLWindow { fn render(&self) { let mut canvas = self.canvas.borrow_mut(); canvas.present(); + canvas.set_draw_color(Color::RGB(128, 128, 128)); canvas.clear(); } } -- cgit v1.2.3-70-g09d2