Remove dead code

This commit is contained in:
Kevin Hamacher 2016-05-26 20:56:07 +02:00
parent 31117963e5
commit a4caaa55f0

View File

@ -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;