From a4caaa55f003b58254527b70b3ebc4eaafdc4284 Mon Sep 17 00:00:00 2001 From: Kevin Hamacher Date: Thu, 26 May 2016 20:56:07 +0200 Subject: [PATCH] Remove dead code --- src/display.rs | 22 ++-------------------- 1 file changed, 2 insertions(+), 20 deletions(-) diff --git a/src/display.rs b/src/display.rs index f77f7a5..e3cad99 100644 --- a/src/display.rs +++ b/src/display.rs @@ -57,11 +57,6 @@ pub struct Display { current_mode: DisplayMode, // TODO - - // For creating a window: -// sdl_context: sdl2::Sdl, -// video_context: sdl2::VideoSubsystem, -// window: sdl2::video::Window, renderer: sdl2::render::Renderer<'static>, } @@ -87,9 +82,6 @@ impl Display { current_ticks: 0, current_mode: DisplayMode::default(), vram: vec![0; VRAM_SIZE].into_boxed_slice(), -// sdl_context: sdl_ctx, -// video_context: video_ctx, -// window: wnd, renderer: renderer } } @@ -201,16 +193,10 @@ impl Display { if self.control & CTRL_BG_DISPLAY > 0 { // Draw borders first. + /* for t_x in 0 .. 160/8 { self.renderer.set_draw_color(sdl2::pixels::Color::RGB(0xFF, 10, 0xFF)); - // Awesome effects: - /* - let RX: i32 = (t_x as i32)*8 + map_offset_x as i32; - let RY: i32 = (render_y as i32) & 0xFFFFFFF8 + map_offset_y as i32; - let TS: u32 = 8u32 * (SCALE as u32); - */ - let RX: i32 = (t_x as i32)*8 + map_offset_x as i32; let RY: i32 = ((render_y as u32) & 0xFFFFFFF8) as i32 - map_offset_y as i32; let TS: u32 = 8u32 * (SCALE as u32); @@ -218,6 +204,7 @@ impl Display { sdl2::rect::Rect::new(RX * SCALE as i32, RY * SCALE as i32, TS, TS) ); } + */ // Render pixels (20 tiles) for render_x in 0 .. 160 { // Absolute render coordinates @@ -234,11 +221,6 @@ impl Display { // Obtain tile ID in this area let mut tile_id = self.vram[vram_offset]; - // println!("vram offset: {:04X}", vram_offset); - if tile_id != 0 { - // println!("Drawing tile {:02X}", tile_id); - // print!("{:02X} ", tile_id); - } // Obtain tile information let tile_base_addr: usize;