diff --git a/rustboyadvance-core/src/gpu/render/obj.rs b/rustboyadvance-core/src/gpu/render/obj.rs index 0bd9ebc..3f95579 100644 --- a/rustboyadvance-core/src/gpu/render/obj.rs +++ b/rustboyadvance-core/src/gpu/render/obj.rs @@ -93,6 +93,10 @@ impl Gpu { return; } + if attrs.0.objmode() == ObjMode::Forbidden { + return; + } + let tile_base = OVRAM + 0x20 * (attrs.2.tile() as u32); let (tile_size, pixel_format) = attrs.tile_format(); @@ -182,6 +186,10 @@ impl Gpu { return; } + if attrs.0.objmode() == ObjMode::Forbidden { + return; + } + let tile_base = OVRAM + 0x20 * (attrs.2.tile() as u32); let (tile_size, pixel_format) = attrs.tile_format(); @@ -273,9 +281,7 @@ impl Gpu { ObjMode::Window => { current_obj.window = true; } - ObjMode::Forbidden => { - panic!("Forbidden sprite mode!"); - } + ObjMode::Forbidden => unreachable!(), } }