fn draw_fullsize(&mut self, level: &Level) {
        let (cols, rows) = level.extents();
        self.renderer.set_draw_color(Color::RGB(0, 0, 0));
        self.renderer.clear();

        for r in 0..rows {
            for c in 0..cols {
                let pos = Position::new(r, c);
                let (x, y) = self.tileset.get_coordinates(&pos);

                // First draw the floor tiles
                if level.is_square(&pos) {
                    self.draw_tile(Tile::Square, x, y);
                } else {
                    self.draw_tile(Tile::Floor, x, y);
                }

                // Add the shadows
                let flags = get_shadow_flags(&level, &pos);
                for f in &[N_EDGE, S_EDGE, E_EDGE, W_EDGE, NE_CORNER, NW_CORNER, SE_CORNER,
                           SW_CORNER] {
                    if flags.contains(*f) {
                        self.draw_tile(Tile::Shadow(*f), x, y);
                    }
                }

                // Draw the other items
                let z = y - self.tileset.tile_offset();
                if level.is_wall(&pos) {
                    self.draw_tile(Tile::Wall, x, z);
                }
                if level.is_box(&pos) {
                    self.draw_tile(Tile::Rock, x, z);
                }
                if level.is_player(&pos) {
                    self.draw_tile(Tile::Player, x, z);
                }
            }
        }
    }
/// Draws a full-size image of the given level onto the current render target.
Draws a full-size image of the given level onto the current render target.
Draws a full - size image of the given level onto the current render target .
fn draw_fullsize(&mut self, level: &Level) {
        let (cols, rows) = level.extents();
        self.renderer.set_draw_color(Color::RGB(0, 0, 0));
        self.renderer.clear();
        for r in 0..rows {
            for c in 0..cols {
                let pos = Position::new(r, c);
                let (x, y) = self.tileset.get_coordinates(&pos);
                // First draw the floor tiles
                if level.is_square(&pos) {
                    self.draw_tile(Tile::Square, x, y);
                } else {
                    self.draw_tile(Tile::Floor, x, y);
                }
                // Add the shadows
                let flags = get_shadow_flags(&level, &pos);
                for f in &[N_EDGE, S_EDGE, E_EDGE, W_EDGE, NE_CORNER, NW_CORNER, SE_CORNER,
                           SW_CORNER] {
                    if flags.contains(*f) {
                        self.draw_tile(Tile::Shadow(*f), x, y);
                    }
                }
                // Draw the other items
                let z = y - self.tileset.tile_offset();
                if level.is_wall(&pos) {
                    self.draw_tile(Tile::Wall, x, z);
                }
                if level.is_box(&pos) {
                    self.draw_tile(Tile::Rock, x, z);
                }
                if level.is_player(&pos) {
                    self.draw_tile(Tile::Player, x, z);
                }
            }
        }
    }
fn draw_fullsize ( & mut self , level : & Level ) { let ( cols , rows ) = level . extents ( ) ; self . renderer . set_draw_color ( Color :: RGB ( 0 , 0 , 0 ) ) ; self . renderer . clear ( ) ; for r in 0 .. rows { for c in 0 .. cols { let pos = Position :: new ( r , c ) ; let ( x , y ) = self . tileset . get_coordinates ( & pos ) ; // First draw the floor tiles if level . is_square ( & pos ) { self . draw_tile ( Tile :: Square , x , y ) ; } else { self . draw_tile ( Tile :: Floor , x , y ) ; } // Add the shadows let flags = get_shadow_flags ( & level , & pos ) ; for f in & [ N_EDGE , S_EDGE , E_EDGE , W_EDGE , NE_CORNER , NW_CORNER , SE_CORNER , SW_CORNER ] { if flags . contains ( * f ) { self . draw_tile ( Tile :: Shadow ( * f ) , x , y ) ; } } // Draw the other items let z = y - self . tileset . tile_offset ( ) ; if level . is_wall ( & pos ) { self . draw_tile ( Tile :: Wall , x , z ) ; } if level . is_box ( & pos ) { self . draw_tile ( Tile :: Rock , x , z ) ; } if level . is_player ( & pos ) { self . draw_tile ( Tile :: Player , x , z ) ; } } } }
Draws a full-size image of the given level onto the current render target.
Draws a full - size image of the given level onto the current render target .
&mut self
level
&Level