Skip to content

Commit

Permalink
Fix game display always rendering from low tile area
Browse files Browse the repository at this point in the history
  • Loading branch information
Miwgt committed Jun 14, 2024
1 parent 9eea665 commit c03df49
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/rendering/line_rendering.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ pub fn oam_scan(cpu: &CPU) {}
// Mode 3
pub fn draw_pixels(cpu: &mut CPU, game_diplay: &mut Image, palette: &[Color; 4]) {
let high_map: bool = false;
let high_addressing: bool = false;
let high_addressing: bool = !cpu.get_lcdc_bg_window_tile_data();

let scx = cpu.get_lcd_scx();
let scy = cpu.get_lcd_scy();
Expand Down Expand Up @@ -87,7 +87,7 @@ impl Ppu {
draw_pixels(cpu, final_image, &palette);
cpu.set_ppu_mode(PpuMode::HorizontalBlank);
} else if dot % DOTS_PER_LINE >= SCAN_DOTS + MIN_DRAW_DOTS {
log::warn!("dot has an invalid value");
panic!("dot has an invalid value");
}
}
PpuMode::HorizontalBlank => {
Expand Down

0 comments on commit c03df49

Please sign in to comment.