From 569b2b7634153735dfb753c0a322aabae959f314 Mon Sep 17 00:00:00 2001 From: Franco Colmenarez Date: Mon, 4 Nov 2024 18:51:47 -0500 Subject: [PATCH] clippy --- README.md | 2 +- snes-core/src/ppu/interface.rs | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index ff9d894..93d96a5 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,5 @@ # SNES -Work in progress experimental SNES emulator written in Rust. +Work in progress SNES emulator written in Rust. ![Emulator](screenshots/screenshot.png) diff --git a/snes-core/src/ppu/interface.rs b/snes-core/src/ppu/interface.rs index 53741a8..ecd5848 100644 --- a/snes-core/src/ppu/interface.rs +++ b/snes-core/src/ppu/interface.rs @@ -88,6 +88,7 @@ impl PPU { // 5. get the tile information from vram // 6. get character index for the tile // 7. calculate the vram address of the character + // 7.1: TODO: consider that the character vram address also depends on the background's BPP mode // TODO: consider that each tile can be mirrored either vertically or horizontally. Keep this in mind when fetching the character information from vram // 8. look up color palette // ---- @@ -176,7 +177,7 @@ impl PPU { fn get_pixel_index(&self) -> usize { let h_count = self.registers.h_count as usize; let v_count = self.registers.v_count as usize; - return ( + ( (h_count - 22) + ((v_count - 1) * MAX_TV_WIDTH) ) * 4