From 047634227811c76c0d411932beee573acab9e1cc Mon Sep 17 00:00:00 2001 From: Michel Heily Date: Wed, 19 Feb 2020 01:39:47 +0200 Subject: [PATCH] bugfix: Fix a bug where sprites were not rendered in bitmap modes. I misunderstood the docs ^^ Former-commit-id: 157ae0dec037be3718b7a28314ba3b2eeb85cca0 --- src/core/gpu/render/obj.rs | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/src/core/gpu/render/obj.rs b/src/core/gpu/render/obj.rs index 23114c5..ee316d4 100644 --- a/src/core/gpu/render/obj.rs +++ b/src/core/gpu/render/obj.rs @@ -55,13 +55,6 @@ impl ObjAttrs { } impl Gpu { - fn obj_tile_base(&self) -> u32 { - match self.dispcnt.mode() { - mode if mode > 2 => OVRAM + 0x4000, - _ => OVRAM, - } - } - fn get_affine_matrix(&self, affine_index: u32) -> AffineMatrix { let mut offset = AFFINE_FILL + affine_index * 16 * 2; let pa = self.oam.read_16(offset) as i16 as i32; @@ -100,7 +93,7 @@ impl Gpu { return; } - let tile_base = self.obj_tile_base() + 0x20 * (attrs.2.tile() as u32); + let tile_base = OVRAM + 0x20 * (attrs.2.tile() as u32); let (tile_size, pixel_format) = attrs.tile_format(); let palette_bank = match pixel_format { @@ -174,7 +167,7 @@ impl Gpu { return; } - let tile_base = self.obj_tile_base() + 0x20 * (attrs.2.tile() as u32); + let tile_base = OVRAM + 0x20 * (attrs.2.tile() as u32); let (tile_size, pixel_format) = attrs.tile_format(); let palette_bank = match pixel_format {