chore: re-enable scrolling

This commit is contained in:
Rekai Nyangadzayi Musuka 2021-03-21 02:08:29 -05:00
parent fe586d77ac
commit b548610fdb
1 changed files with 4 additions and 4 deletions

View File

@ -123,16 +123,16 @@ impl Ppu {
TileMapAddress::X9C00 => 0x9C00, TileMapAddress::X9C00 => 0x9C00,
}; };
// let y_pos = self.pos.line_y as u16 + self.pos.scroll_y as u16; let y_pos = self.pos.line_y as u16 + self.pos.scroll_y as u16;
let y_pos = self.pos.line_y as u16; // let y_pos = self.pos.line_y as u16;
// There are always 20 rows of tiles in the LCD Viewport // There are always 20 rows of tiles in the LCD Viewport
// 160 / 20 = 8, so we can figure out the row of a tile with the following // 160 / 20 = 8, so we can figure out the row of a tile with the following
let tile_row: u16 = y_pos as u16 / 8; let tile_row: u16 = y_pos as u16 / 8;
for (line_x, chunk) in scanline.chunks_mut(4).enumerate() { for (line_x, chunk) in scanline.chunks_mut(4).enumerate() {
// let x_pos = line_x as u16 + self.pos.scroll_x as u16; let x_pos = line_x as u16 + self.pos.scroll_x as u16;
let x_pos = line_x as u16; // let x_pos = line_x as u16;
// There are always 18 columns of tiles in the LCD Viewport // There are always 18 columns of tiles in the LCD Viewport
// 144 / 18 = 8, so we can figure out the column of a tile with the following // 144 / 18 = 8, so we can figure out the column of a tile with the following